Commit 16ca3ee6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'project-navigation-redesign' into 'master'

Project navigation redesign

Based on !3980. Part of #14838. This MR targets on desktop version. Mobile version improvements will be in separate merge request.

Part of #17522

cc @jschatz1 

See merge request !4053
parents 438b186a 510b5c5f
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 8.9.0 (unreleased) v 8.9.0 (unreleased)
- Redesign navigation for project pages
v 8.8.2 (unreleased) v 8.8.2 (unreleased)
- Fix Error 500 when accessing application settings due to nil disabled OAuth sign-in sources - Fix Error 500 when accessing application settings due to nil disabled OAuth sign-in sources
......
...@@ -119,7 +119,7 @@ class Dispatcher ...@@ -119,7 +119,7 @@ class Dispatcher
new UsersSelect() new UsersSelect()
when 'projects' when 'projects'
new NamespaceSelect() new NamespaceSelect()
when 'dashboard' when 'dashboard', 'root'
shortcut_handler = new ShortcutsDashboardNavigation() shortcut_handler = new ShortcutsDashboardNavigation()
when 'profiles' when 'profiles'
new Profile() new Profile()
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
class @ShortcutsDashboardNavigation extends Shortcuts class @ShortcutsDashboardNavigation extends Shortcuts
constructor: -> constructor: ->
super() super()
Mousetrap.bind('g a', -> ShortcutsDashboardNavigation.findAndFollowLink('.shortcuts-activity')) Mousetrap.bind('g a', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-activity'))
Mousetrap.bind('g i', -> ShortcutsDashboardNavigation.findAndFollowLink('.shortcuts-issues')) Mousetrap.bind('g i', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-issues'))
Mousetrap.bind('g m', -> ShortcutsDashboardNavigation.findAndFollowLink('.shortcuts-merge_requests')) Mousetrap.bind('g m', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-merge_requests'))
Mousetrap.bind('g p', -> ShortcutsDashboardNavigation.findAndFollowLink('.shortcuts-projects')) Mousetrap.bind('g p', -> ShortcutsDashboardNavigation.findAndFollowLink('.dashboard-shortcuts-projects'))
@findAndFollowLink: (selector) -> @findAndFollowLink: (selector) ->
link = $(selector).attr('href') link = $(selector).attr('href')
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
&.s32 { font-size: 20px; line-height: 32px; } &.s32 { font-size: 20px; line-height: 32px; }
&.s40 { font-size: 16px; line-height: 40px; } &.s40 { font-size: 16px; line-height: 40px; }
&.s60 { font-size: 32px; line-height: 60px; } &.s60 { font-size: 32px; line-height: 60px; }
&.s70 { font-size: 34px; line-height: 70px; }
&.s90 { font-size: 36px; line-height: 90px; } &.s90 { font-size: 36px; line-height: 90px; }
&.s110 { font-size: 40px; line-height: 112px; font-weight: 300; } &.s110 { font-size: 40px; line-height: 112px; font-weight: 300; }
&.s140 { font-size: 72px; line-height: 140px; } &.s140 { font-size: 72px; line-height: 140px; }
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
background-color: $background-color; background-color: $background-color;
padding: $gl-padding; padding: $gl-padding;
margin-bottom: 0; margin-bottom: 0;
border-top: 1px solid $border-color; border-top: 1px solid $white-dark;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $white-dark;
color: $gl-gray; color: $gl-gray;
&.oneline-block { &.oneline-block {
...@@ -110,9 +110,9 @@ ...@@ -110,9 +110,9 @@
.cover-title { .cover-title {
color: $gl-header-color; color: $gl-header-color;
margin: 0; margin: 0;
font-size: 23px; font-size: 24px;
font-weight: normal; font-weight: normal;
margin: 16px 0 5px; margin-bottom: 5px;
color: #4c4e54; color: #4c4e54;
font-size: 23px; font-size: 23px;
line-height: 1.1; line-height: 1.1;
...@@ -137,7 +137,6 @@ ...@@ -137,7 +137,6 @@
} }
.cover-desc { .cover-desc {
padding: 0 $gl-padding 3px;
color: $gl-text-color; color: $gl-text-color;
&.username:last-child { &.username:last-child {
...@@ -205,7 +204,7 @@ ...@@ -205,7 +204,7 @@
.content-block { .content-block {
padding: $gl-padding 0; padding: $gl-padding 0;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $white-dark;
&.oneline-block { &.oneline-block {
line-height: 36px; line-height: 36px;
......
...@@ -48,10 +48,6 @@ ...@@ -48,10 +48,6 @@
display: block; display: block;
} }
.project-home-desc {
font-size: 21px;
}
.project-repo-buttons, .project-repo-buttons,
.git-clone-holder { .git-clone-holder {
display: none; display: none;
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
position: fixed; position: fixed;
top: $header-height; top: $header-height;
width: 100%; width: 100%;
z-index: 1; z-index: 3;
background: $background-color; background: $background-color;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
transition-duration: .3s; transition-duration: .3s;
...@@ -238,6 +238,10 @@ ...@@ -238,6 +238,10 @@
@media (max-width: $screen-xs-min) { @media (max-width: $screen-xs-min) {
margin-left: 0; margin-left: 0;
} }
li.active {
font-weight: bold;
}
} }
} }
...@@ -246,6 +250,11 @@ ...@@ -246,6 +250,11 @@
height: 51px; height: 51px;
white-space: nowrap; white-space: nowrap;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar {
display: none;
}
li { li {
...@@ -279,4 +288,8 @@ ...@@ -279,4 +288,8 @@
margin-top: 96px; margin-top: 96px;
} }
} }
.right-sidebar {
top: ($header-height * 2) + 2;
}
} }
...@@ -119,8 +119,8 @@ $border-white-light: #f1f2f4; ...@@ -119,8 +119,8 @@ $border-white-light: #f1f2f4;
$border-white-normal: #d6dae2; $border-white-normal: #d6dae2;
$border-white-dark: #c6cacf; $border-white-dark: #c6cacf;
$border-gray-light: rgba(0, 0, 0, 0.06); $border-gray-light: #dcdcdc;
$border-gray-normal: rgba(0, 0, 0, 0.10);; $border-gray-normal: rgba(0, 0, 0, 0.10);
$border-gray-dark: #c6cacf; $border-gray-dark: #c6cacf;
$border-green-light: #2faa60; $border-green-light: #2faa60;
......
...@@ -26,8 +26,13 @@ ...@@ -26,8 +26,13 @@
} }
.project-home-panel { .project-home-panel {
padding-bottom: 40px; background: $white-light;
border-bottom: 1px solid $border-color; text-align: left;
padding: 24px 0;
.container-fluid {
position: relative;
}
.cover-controls { .cover-controls {
.project-settings-dropdown { .project-settings-dropdown {
...@@ -43,21 +48,55 @@ ...@@ -43,21 +48,55 @@
} }
} }
.project-identicon-holder { .cover-title {
margin-bottom: 16px; margin-bottom: 0;
}
.project-image-container {
@include make-sm-column(1);
max-width: 86px;
min-width: 86px;
padding-right: 0;
margin: 11px 0;
.avatar, .identicon { @media (max-width: $screen-md-max) {
margin: 0 auto; padding-left: 0;
float: none; margin: 0 0 10px;
max-width: none;
min-width: none;
.avatar.s70 {
margin: auto;
}
} }
}
.identicon { .project-info {
@include border-radius(50%); @include make-sm-column(10);
h1 {
font-size: 24px;
font-weight: normal;
margin: 0;
}
.project-home-desc {
p {
margin: 0;
}
} }
} }
.identicon {
float: left;
@include border-radius(50%);
}
.avatar {
float: none;
}
.notifications-btn { .notifications-btn {
margin-top: -28px;
.fa-bell { .fa-bell {
margin-right: 6px; margin-right: 6px;
...@@ -69,28 +108,45 @@ ...@@ -69,28 +108,45 @@
} }
.project-repo-buttons { .project-repo-buttons {
margin-top: 20px; font-size: 0;
margin-bottom: 0;
.count-buttons { .btn {
display: block; @include btn-gray;
margin-bottom: 20px; padding: 3px 10px;
} text-transform: none;
background-color: $background-color;
.clone-row { .fa {
.split-repo-buttons, color: $layout-link-gray;
.project-clone-holder {
display: inline-block;
} }
.split-repo-buttons { .fa-caret-down {
margin: 0 12px; margin-left: 3px;
} }
} }
.btn { .btn-group:not(:first-child):not(:last-child) > .btn {
@include btn-gray; border-top-right-radius: 3px;
text-transform: none; border-bottom-right-radius: 3px;
}
form {
margin-left: 10px;
}
.count-buttons {
display: inline-block;
vertical-align: top;
margin-top: 16px;
}
.project-clone-holder {
display: inline-block;
margin-top: 16px;
input {
height: 29px;
}
} }
.count-with-arrow { .count-with-arrow {
...@@ -140,14 +196,14 @@ ...@@ -140,14 +196,14 @@
line-height: 13px; line-height: 13px;
padding: $gl-vert-padding $gl-padding; padding: $gl-vert-padding $gl-padding;
letter-spacing: .4px; letter-spacing: .4px;
padding: 10px 14px; padding: 7px 14px;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
touch-action: manipulation; touch-action: manipulation;
cursor: pointer; cursor: pointer;
background-image: none; background-image: none;
white-space: nowrap; white-space: nowrap;
margin: 0 11px 0 4px; margin: 0 10px 0 4px;
a { a {
color: inherit; color: inherit;
...@@ -159,6 +215,30 @@ ...@@ -159,6 +215,30 @@
} }
} }
} }
.project-right-buttons {
position: absolute;
right: 16px;
bottom: 0;
.btn {
padding: 3px 10px;
background-color: $background-color;
}
@media (max-width: 1304px) {
top: 0;
}
}
@media (max-width: $screen-md-max) {
text-align: center;
.project-info,
.project-image-container {
width: 100%;
}
}
} }
.split-one { .split-one {
...@@ -289,11 +369,11 @@ a.deploy-project-label { ...@@ -289,11 +369,11 @@ a.deploy-project-label {
} }
.project-stats { .project-stats {
text-align: center;
margin-top: $gl-padding; margin-top: $gl-padding;
margin-bottom: 0; margin-bottom: 0;
padding-top: 10px; padding: 16px 0;
padding-bottom: 4px; background-color: $white-light;
font-size: 0;
ul.nav { ul.nav {
display: inline-block; display: inline-block;
...@@ -304,12 +384,11 @@ a.deploy-project-label { ...@@ -304,12 +384,11 @@ a.deploy-project-label {
} }
.nav > li > a { .nav > li > a {
@include btn-default;
@include btn-gray;
background-color: transparent; background-color: transparent;
border: 1px solid #f7f8fa; margin-right: 12px;
margin-left: 12px; padding: 0 10px;
font-size: 15px;
color: $notes-light-color;
} }
li { li {
...@@ -329,6 +408,10 @@ a.deploy-project-label { ...@@ -329,6 +408,10 @@ a.deploy-project-label {
background-color: #f0f2f5; background-color: #f0f2f5;
} }
} }
&.row-content-block.second-block {
margin-top: 0;
}
} }
pre.light-well { pre.light-well {
...@@ -446,9 +529,14 @@ pre.light-well { ...@@ -446,9 +529,14 @@ pre.light-well {
border-top: 0; border-top: 0;
.edit-project-readme { .edit-project-readme {
z-index: 100; z-index: 2;
position: relative; position: relative;
} }
.wiki h1 {
border-bottom: none;
padding: 0;
}
} }
.git-clone-holder { .git-clone-holder {
......
...@@ -95,7 +95,9 @@ module TabHelper ...@@ -95,7 +95,9 @@ module TabHelper
end end
def project_tab_class def project_tab_class
return "active" if current_page?(controller: "/projects", action: :edit, id: @project) if controller.controller_path.start_with?('projects')
return 'active'
end
if ['services', 'hooks', 'deploy_keys', 'protected_branches'].include? controller.controller_name if ['services', 'hooks', 'deploy_keys', 'protected_branches'].include? controller.controller_name
"active" "active"
......
%ul.nav.nav-sidebar %ul.nav.nav-sidebar
= nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: {class: 'home'}) do = nav_link(path: ['root#index', 'projects#trending', 'projects#starred', 'dashboard/projects#index'], html_options: {class: "#{project_tab_class} home"}) do
= link_to dashboard_projects_path, title: 'Projects' do = link_to dashboard_projects_path, title: 'Projects', class: 'dashboard-shortcuts-projects' do
= icon('bookmark fw') = icon('bookmark fw')
%span %span
Projects Projects
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
Todos Todos
%span.count.todos-pending-count= number_with_delimiter(todos_pending_count) %span.count.todos-pending-count= number_with_delimiter(todos_pending_count)
= nav_link(path: 'dashboard#activity') do = nav_link(path: 'dashboard#activity') do
= link_to activity_dashboard_path, class: 'shortcuts-activity', title: 'Activity' do = link_to activity_dashboard_path, class: 'dashboard-shortcuts-activity', title: 'Activity' do
= icon('dashboard fw') = icon('dashboard fw')
%span %span
Activity Activity
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
%span %span
Milestones Milestones
= nav_link(path: 'dashboard#issues') do = nav_link(path: 'dashboard#issues') do
= link_to assigned_issues_dashboard_path, title: 'Issues', class: 'shortcuts-issues' do = link_to assigned_issues_dashboard_path, title: 'Issues', class: 'dashboard-shortcuts-issues' do
= icon('exclamation-circle fw') = icon('exclamation-circle fw')
%span %span
Issues Issues
%span.count= number_with_delimiter(current_user.assigned_issues.opened.count) %span.count= number_with_delimiter(current_user.assigned_issues.opened.count)
= nav_link(path: 'dashboard#merge_requests') do = nav_link(path: 'dashboard#merge_requests') do
= link_to assigned_mrs_dashboard_path, title: 'Merge Requests', class: 'shortcuts-merge_requests' do = link_to assigned_mrs_dashboard_path, title: 'Merge Requests', class: 'dashboard-shortcuts-merge_requests' do
= icon('tasks fw') = icon('tasks fw')
%span %span
Merge Requests Merge Requests
......
%ul.nav.nav-sidebar - if current_user
- if @project.group .controls
= nav_link do - access = user_max_access_in_project(current_user.id, @project)
= link_to group_path(@project.group), title: 'Go to group', class: 'back-link' do - can_edit = can?(current_user, :admin_project, @project)
= icon('caret-square-o-left fw') .dropdown.project-settings-dropdown
%span %a.dropdown-new.btn.btn-default#project-settings-button{href: '#', 'data-toggle' => 'dropdown'}
Go to group = icon('cog')
- else = icon('caret-down')
= nav_link do %ul.dropdown-menu.dropdown-menu-align-right
= link_to root_path, title: 'Go to dashboard', class: 'back-link' do = render 'layouts/nav/project_settings'
= icon('caret-square-o-left fw') %li.divider
%span - if can_edit
Go to dashboard %li
= link_to edit_project_path(@project) do
%li.separate-item Edit Project
- if access
%li
= link_to leave_namespace_project_project_members_path(@project.namespace, @project),
data: { confirm: leave_project_message(@project) }, method: :delete, title: 'Leave project' do
Leave Project
%ul.nav-links
= nav_link(path: 'projects#show', html_options: {class: 'home'}) do = nav_link(path: 'projects#show', html_options: {class: 'home'}) do
= link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do = link_to project_path(@project), title: 'Project', class: 'shortcuts-project' do
= icon('bookmark fw') = icon('bookmark fw')
...@@ -44,7 +50,7 @@ ...@@ -44,7 +50,7 @@
= icon('ship fw') = icon('ship fw')
%span %span
Pipelines Pipelines
%span.count.ci_counter= number_with_delimiter(@project.ci_commits.running_or_pending.count) %span.badge.count.ci_counter= number_with_delimiter(@project.ci_commits.running_or_pending.count)
- if project_nav_tab? :builds - if project_nav_tab? :builds
= nav_link(controller: %w(builds)) do = nav_link(controller: %w(builds)) do
...@@ -52,7 +58,7 @@ ...@@ -52,7 +58,7 @@
= icon('cubes fw') = icon('cubes fw')
%span %span
Builds Builds
%span.count.builds_counter= number_with_delimiter(@project.builds.running_or_pending.count(:all)) %span.badge.count.builds_counter= number_with_delimiter(@project.builds.running_or_pending.count(:all))
- if project_nav_tab? :container_registry - if project_nav_tab? :container_registry
= nav_link(controller: %w(container_registry)) do = nav_link(controller: %w(container_registry)) do
...@@ -82,7 +88,7 @@ ...@@ -82,7 +88,7 @@
%span %span
Issues Issues
- if @project.default_issues_tracker? - if @project.default_issues_tracker?
%span.count.issue_counter= number_with_delimiter(@project.issues.visible_to_user(current_user).opened.count) %span.badge.count.issue_counter= number_with_delimiter(@project.issues.visible_to_user(current_user).opened.count)
- if project_nav_tab? :merge_requests - if project_nav_tab? :merge_requests
= nav_link(controller: :merge_requests) do = nav_link(controller: :merge_requests) do
...@@ -90,14 +96,7 @@ ...@@ -90,14 +96,7 @@
= icon('tasks fw') = icon('tasks fw')
%span %span
Merge Requests Merge Requests
%span.count.merge_counter= number_with_delimiter(@project.merge_requests.opened.count) %span.badge.count.merge_counter= number_with_delimiter(@project.merge_requests.opened.count)
- if project_nav_tab? :team
= nav_link(controller: [:project_members, :teams]) do
= link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab' do
= icon('users fw')
%span
Members
- if project_nav_tab? :labels - if project_nav_tab? :labels
= nav_link(controller: :labels) do = nav_link(controller: :labels) do
...@@ -113,13 +112,6 @@ ...@@ -113,13 +112,6 @@
%span %span
Wiki Wiki
- if project_nav_tab? :forks
= nav_link(controller: :forks, action: :index) do
= link_to namespace_project_forks_path(@project.namespace, @project), title: 'Forks' do
= icon('code-fork fw')
%span
Forks
- if project_nav_tab? :snippets - if project_nav_tab? :snippets
= nav_link(controller: :snippets) do = nav_link(controller: :snippets) do
= link_to namespace_project_snippets_path(@project.namespace, @project), title: 'Snippets', class: 'shortcuts-snippets' do = link_to namespace_project_snippets_path(@project.namespace, @project), title: 'Snippets', class: 'shortcuts-snippets' do
...@@ -127,13 +119,6 @@ ...@@ -127,13 +119,6 @@
%span %span
Snippets Snippets
- if project_nav_tab? :settings
= nav_link(html_options: {class: "#{project_tab_class} separate-item"}) do
= link_to edit_project_path(@project), title: 'Settings' do
= icon('cogs fw')
%span
Settings
-# Global shortcut to network page for compatibility -# Global shortcut to network page for compatibility
- if project_nav_tab? :network - if project_nav_tab? :network
%li.hidden %li.hidden
......
%ul.nav.nav-sidebar - if project_nav_tab? :team
= nav_link do = nav_link(controller: [:project_members, :teams]) do
= link_to project_path(@project), title: 'Go to project', class: 'back-link' do = link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab' do
= icon('caret-square-o-left fw')
%span %span
Go to project Members
%li.separate-item - if @project.allowed_to_share_with_group?
= nav_link(controller: :group_links) do
%ul.sidebar-subnav = link_to namespace_project_group_links_path(@project.namespace, @project), title: "Groups" do
= nav_link(path: 'projects#edit') do %span
= link_to edit_project_path(@project), title: 'Project Settings' do Groups
= icon('pencil-square-o fw') = nav_link(controller: :deploy_keys) do
%span = link_to namespace_project_deploy_keys_path(@project.namespace, @project), title: 'Deploy Keys' do
Project Settings %span
- if @project.allowed_to_share_with_group? Deploy Keys
= nav_link(controller: :group_links) do = nav_link(controller: :hooks) do
= link_to namespace_project_group_links_path(@project.namespace, @project), title: "Groups" do = link_to namespace_project_hooks_path(@project.namespace, @project), title: 'Webhooks' do
= icon('share-square-o fw') %span
%span Webhooks
Groups = nav_link(controller: :services) do
= nav_link(controller: :deploy_keys) do = link_to namespace_project_services_path(@project.namespace, @project), title: 'Services' do
= link_to namespace_project_deploy_keys_path(@project.namespace, @project), title: 'Deploy Keys' do %span
= icon('key fw') Services
%span = nav_link(controller: :protected_branches) do
Deploy Keys = link_to namespace_project_protected_branches_path(@project.namespace, @project), title: 'Protected Branches' do
= nav_link(controller: :hooks) do %span
= link_to namespace_project_hooks_path(@project.namespace, @project), title: 'Webhooks' do Protected Branches
= icon('link fw')
%span
Webhooks
= nav_link(controller: :services) do
= link_to namespace_project_services_path(@project.namespace, @project), title: 'Services' do
= icon('cogs fw')
%span
Services
= nav_link(controller: :protected_branches) do
= link_to namespace_project_protected_branches_path(@project.namespace, @project), title: 'Protected Branches' do
= icon('lock fw')
%span
Protected Branches
- if @project.builds_enabled? - if @project.builds_enabled?
= nav_link(controller: :runners) do = nav_link(controller: :runners) do
= link_to namespace_project_runners_path(@project.namespace, @project), title: 'Runners' do = link_to namespace_project_runners_path(@project.namespace, @project), title: 'Runners' do
= icon('cog fw') %span
%span Runners
Runners = nav_link(controller: :variables) do
= nav_link(controller: :variables) do = link_to namespace_project_variables_path(@project.namespace, @project), title: 'Variables' do
= link_to namespace_project_variables_path(@project.namespace, @project), title: 'Variables' do %span
= icon('code fw') Variables
%span = nav_link(controller: :triggers) do
Variables = link_to namespace_project_triggers_path(@project.namespace, @project), title: 'Triggers' do
= nav_link(controller: :triggers) do %span
= link_to namespace_project_triggers_path(@project.namespace, @project), title: 'Triggers' do Triggers
= icon('retweet fw') = nav_link(controller: :badges) do
%span = link_to namespace_project_badges_path(@project.namespace, @project), title: 'Badges' do
Triggers %span
= nav_link(controller: :badges) do Badges
= link_to namespace_project_badges_path(@project.namespace, @project), title: 'Badges' do
= icon('star-half-empty fw')
%span
Badges
- page_title @project.name_with_namespace - page_title @project.name_with_namespace
- page_description @project.description unless page_description - page_description @project.description unless page_description
- header_title project_title(@project) unless header_title - header_title project_title(@project) unless header_title
- sidebar "project" unless sidebar - nav "project"
- content_for :scripts_body_top do - content_for :scripts_body_top do
- project = @target_project || @project - project = @target_project || @project
......
- page_title "Settings" - page_title "Settings"
- header_title project_title(@project, "Settings", edit_project_path(@project)) - nav "project"
- sidebar "project_settings"
= render template: "layouts/project" = render template: "layouts/project"
- empty_repo = @project.empty_repo? - empty_repo = @project.empty_repo?
.project-home-panel.cover-block.clearfix{:class => ("empty-project" if empty_repo)} .project-home-panel.cover-block.clearfix{:class => ("empty-project" if empty_repo)}
.project-identicon-holder .container-fluid.container-limited
= project_icon(@project, alt: '', class: 'project-avatar avatar s90') .row
.cover-title.project-home-desc .project-image-container
%h1 = project_icon(@project, alt: '', class: 'project-avatar avatar s70')
= @project.name .project-info
%span.visibility-icon.has-tooltip{data: { container: 'body' }, title: visibility_icon_description(@project)} .cover-title.project-home-desc
= visibility_level_icon(@project.visibility_level, fw: false) %h1
= @project.name
- if @project.description.present? %span.visibility-icon.has-tooltip{data: { container: 'body' }, title: visibility_icon_description(@project)}
.cover-desc.project-home-desc = visibility_level_icon(@project.visibility_level, fw: false)
= markdown(@project.description, pipeline: :description)
- if @project.description.present?
- if forked_from_project = @project.forked_from_project .cover-desc.project-home-desc
.cover-desc = markdown(@project.description, pipeline: :description)
Forked from
= link_to project_path(forked_from_project) do - if forked_from_project = @project.forked_from_project
= forked_from_project.namespace.try(:name) .cover-desc
Forked from
.cover-controls = link_to project_path(forked_from_project) do
- if current_user = forked_from_project.namespace.try(:name)
= link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), class: 'btn btn-gray' do
= icon('rss') .project-repo-buttons
- access = user_max_access_in_project(current_user.id, @project) .count-buttons
- can_edit = can?(current_user, :admin_project, @project) = render 'projects/buttons/star'
- if access || can_edit = render 'projects/buttons/fork'
%span.dropdown.project-settings-dropdown
%a.dropdown-new.btn.btn-gray#project-settings-button{href: '#', 'data-toggle' => 'dropdown'} .project-clone-holder
= icon('cog') = render "shared/clone_panel"
= icon('angle-down')
%ul.dropdown-menu.dropdown-menu-right .project-repo-buttons.btn-group.project-right-buttons
- if can_edit = render "projects/buttons/download"
%li = render 'projects/buttons/dropdown'
= link_to edit_project_path(@project) do
Edit Project
- if access
%li
= link_to leave_namespace_project_project_members_path(@project.namespace, @project),
data: { confirm: leave_project_message(@project) }, method: :delete, title: 'Leave project' do
Leave Project
.project-repo-buttons
.split-one.count-buttons
= render 'projects/buttons/star'
= render 'projects/buttons/fork'
.clone-row
.project-clone-holder
= render "shared/clone_panel"
.split-repo-buttons
.btn-group.pull-left
= render "projects/buttons/download"
= render 'projects/buttons/dropdown'
= render 'projects/buttons/notifications' = render 'projects/buttons/notifications'
:javascript :javascript
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.btn-group .btn-group
%a.btn.dropdown-toggle{href: '#', "data-toggle" => "dropdown"} %a.btn.dropdown-toggle{href: '#', "data-toggle" => "dropdown"}
= icon('plus') = icon('plus')
%ul.dropdown-menu.dropdown-menu-right.project-home-dropdown %ul.dropdown-menu.dropdown-menu-align-right.project-home-dropdown
- can_create_issue = can?(current_user, :create_issue, @project) - can_create_issue = can?(current_user, :create_issue, @project)
- merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project)) - merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project))
- can_create_snippet = can?(current_user, :create_snippet, @project) - can_create_snippet = can?(current_user, :create_snippet, @project)
......
- if @notification_setting - if @notification_setting
= form_for @notification_setting, url: namespace_project_notification_setting_path(@project.namespace.becomes(Namespace), @project), method: :patch, remote: true, html: { class: 'inline', id: 'notification-form' } do |f| = form_for @notification_setting, url: namespace_project_notification_setting_path(@project.namespace.becomes(Namespace), @project), method: :patch, remote: true, html: { class: 'inline', id: 'notification-form' } do |f|
= f.hidden_field :level = f.hidden_field :level
%span.dropdown .dropdown
%a.dropdown-new.btn.notifications-btn#notifications-button{href: '#', "data-toggle" => "dropdown"} %a.dropdown-new.btn.notifications-btn#notifications-button{href: '#', "data-toggle" => "dropdown"}
= icon('bell') = icon('bell')
= notification_title(@notification_setting.level) = notification_title(@notification_setting.level)
= icon('angle-down') = icon('caret-down')
%ul.dropdown-menu.dropdown-menu-right.project-home-dropdown %ul.dropdown-menu.dropdown-menu-align-right.project-home-dropdown
- NotificationSetting.levels.each do |level| - NotificationSetting.levels.each do |level|
= notification_list_item(level.first, @notification_setting) = notification_list_item(level.first, @notification_setting)
...@@ -13,50 +13,50 @@ ...@@ -13,50 +13,50 @@
= render "home_panel" = render "home_panel"
.project-stats.row-content-block.second-block .project-stats.row-content-block.second-block
%ul.nav .container-fluid.container-limited
%li %ul.nav
= link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do
= pluralize(number_with_delimiter(@project.commit_count), 'commit')
%li
= link_to namespace_project_branches_path(@project.namespace, @project) do
= pluralize(number_with_delimiter(@repository.branch_names.count), 'branch')
%li
= link_to namespace_project_tags_path(@project.namespace, @project) do
= pluralize(number_with_delimiter(@repository.tag_names.count), 'tag')
%li
= link_to project_files_path(@project) do
= repository_size
- if default_project_view != 'readme' && @repository.readme
%li %li
= link_to 'Readme', readme_path(@project) = link_to project_files_path(@project) do
Files (#{repository_size})
- if @repository.changelog
%li %li
= link_to 'Changelog', changelog_path(@project) = link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do
#{'Commit'.pluralize(@project.commit_count)} (#{number_with_delimiter(@project.commit_count)})
- if @repository.license_blob
%li %li
= link_to license_short_name(@project), license_path(@project) = link_to namespace_project_branches_path(@project.namespace, @project) do
#{'Branch'.pluralize(@repository.branch_names.count)} (#{number_with_delimiter(@repository.branch_names.count)})
- if @repository.contribution_guide
%li %li
= link_to 'Contribution guide', contribution_guide_path(@project) = link_to namespace_project_tags_path(@project.namespace, @project) do
#{'Tag'.pluralize(@repository.tag_names.count)} (#{number_with_delimiter(@repository.tag_names.count)})
- if default_project_view != 'readme' && @repository.readme
%li
= link_to 'Readme', readme_path(@project)
- if @repository.changelog
%li
= link_to 'Changelog', changelog_path(@project)
- if @repository.license_blob
%li
= link_to license_short_name(@project), license_path(@project)
- if @repository.contribution_guide
%li
= link_to 'Contribution guide', contribution_guide_path(@project)
- if current_user && can_push_branch?(@project, @project.default_branch) - if current_user && can_push_branch?(@project, @project.default_branch)
- unless @repository.changelog - unless @repository.changelog
%li.missing %li.missing
= link_to add_special_file_path(@project, file_name: 'CHANGELOG') do = link_to add_special_file_path(@project, file_name: 'CHANGELOG') do
Add Changelog Add Changelog
- unless @repository.license_blob - unless @repository.license_blob
%li.missing %li.missing
= link_to add_special_file_path(@project, file_name: 'LICENSE') do = link_to add_special_file_path(@project, file_name: 'LICENSE') do
Add License Add License
- unless @repository.contribution_guide - unless @repository.contribution_guide
%li.missing %li.missing
= link_to add_special_file_path(@project, file_name: 'CONTRIBUTING.md', commit_message: 'Add contribution guide') do = link_to add_special_file_path(@project, file_name: 'CONTRIBUTING.md', commit_message: 'Add contribution guide') do
Add Contribution guide Add Contribution guide
- if @repository.commit - if @repository.commit
.content-block.second-block.white .content-block.second-block.white
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
%a#clone-dropdown.clone-dropdown-btn.btn{href: '#', 'data-toggle' => 'dropdown'} %a#clone-dropdown.clone-dropdown-btn.btn{href: '#', 'data-toggle' => 'dropdown'}
%span %span
= default_clone_protocol.upcase = default_clone_protocol.upcase
= icon('angle-down') = icon('caret-down')
%ul.dropdown-menu.dropdown-menu-right.clone-options-dropdown %ul.dropdown-menu.dropdown-menu-right.clone-options-dropdown
%li %li
= ssh_clone_button(project) = ssh_clone_button(project)
......
...@@ -30,11 +30,6 @@ Feature: Project Active Tab ...@@ -30,11 +30,6 @@ Feature: Project Active Tab
Then the active main tab should be Merge Requests Then the active main tab should be Merge Requests
And no other main tabs should be active And no other main tabs should be active
Scenario: On Project Members
Given I visit my project's members page
Then the active main tab should be Members
And no other main tabs should be active
Scenario: On Project Wiki Scenario: On Project Wiki
Given I visit my project's wiki page Given I visit my project's wiki page
Then the active main tab should be Wiki Then the active main tab should be Wiki
...@@ -49,13 +44,6 @@ Feature: Project Active Tab ...@@ -49,13 +44,6 @@ Feature: Project Active Tab
# Sub Tabs: Settings # Sub Tabs: Settings
Scenario: On Project Settings/Edit
Given I visit my project's settings page
And I click the "Edit" tab
Then the active sub nav should be Edit
And no other sub navs should be active
And the active main tab should be Settings
Scenario: On Project Settings/Hooks Scenario: On Project Settings/Hooks
Given I visit my project's settings page Given I visit my project's settings page
And I click the "Hooks" tab And I click the "Hooks" tab
...@@ -70,6 +58,12 @@ Feature: Project Active Tab ...@@ -70,6 +58,12 @@ Feature: Project Active Tab
And no other sub navs should be active And no other sub navs should be active
And the active main tab should be Settings And the active main tab should be Settings
Scenario: On Project Members
Given I visit my project's members page
Then the active sub nav should be Members
And no other sub navs should be active
And the active main tab should be Settings
# Sub Tabs: Commits # Sub Tabs: Commits
Scenario: On Project Commits/Commits Scenario: On Project Commits/Commits
......
...@@ -18,15 +18,6 @@ Feature: Project ...@@ -18,15 +18,6 @@ Feature: Project
Then I should see the default project avatar Then I should see the default project avatar
And I should not see the "Remove avatar" button And I should not see the "Remove avatar" button
Scenario: I should have back to group button
And project "Shop" belongs to group
And I visit project "Shop" page
Then I should see back to group button
Scenario: I should have back to group button
And I visit project "Shop" page
Then I should see back to dashboard button
Scenario: I should have readme on page Scenario: I should have readme on page
And I visit project "Shop" page And I visit project "Shop" page
Then I should see project "Shop" README Then I should see project "Shop" README
......
class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps
include SharedAuthentication include SharedAuthentication
include SharedPaths include SharedPaths
include SharedActiveTab include SharedSidebarActiveTab
step 'the active main tab should be Home' do step 'the active main tab should be Home' do
ensure_active_main_tab('Overview') ensure_active_main_tab('Overview')
...@@ -34,4 +34,12 @@ class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps ...@@ -34,4 +34,12 @@ class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps
step 'the active main tab should be Messages' do step 'the active main tab should be Messages' do
ensure_active_main_tab('Messages') ensure_active_main_tab('Messages')
end end
step 'no other main tabs should be active' do
expect(page).to have_selector('.nav-sidebar > li.active', count: 1)
end
def ensure_active_main_tab(content)
expect(find('.nav-sidebar > li.active')).to have_content(content)
end
end end
class Spinach::Features::DashboardActiveTab < Spinach::FeatureSteps class Spinach::Features::DashboardActiveTab < Spinach::FeatureSteps
include SharedAuthentication include SharedAuthentication
include SharedPaths include SharedPaths
include SharedActiveTab include SharedSidebarActiveTab
step 'the active main tab should be Help' do
ensure_active_main_tab('Help')
end
end end
...@@ -2,5 +2,6 @@ class Spinach::Features::DashboardShortcuts < Spinach::FeatureSteps ...@@ -2,5 +2,6 @@ class Spinach::Features::DashboardShortcuts < Spinach::FeatureSteps
include SharedAuthentication include SharedAuthentication
include SharedPaths include SharedPaths
include SharedProject include SharedProject
include SharedActiveTab include SharedSidebarActiveTab
include SharedShortcuts
end end
...@@ -22,8 +22,4 @@ class Spinach::Features::ProfileActiveTab < Spinach::FeatureSteps ...@@ -22,8 +22,4 @@ class Spinach::Features::ProfileActiveTab < Spinach::FeatureSteps
step 'the active main tab should be Audit Log' do step 'the active main tab should be Audit Log' do
ensure_active_main_tab('Audit Log') ensure_active_main_tab('Audit Log')
end end
def ensure_active_main_tab(content)
expect(find('.layout-nav li.active')).to have_content(content)
end
end end
...@@ -16,12 +16,14 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps ...@@ -16,12 +16,14 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
end end
step 'I click the "Snippets" tab' do step 'I click the "Snippets" tab' do
click_link('Snippets') page.within('.layout-nav') do
click_link('Snippets')
end
end end
step 'I click the "Edit" tab' do step 'I click the "Edit Project"' do
page.within '.sidebar-subnav' do page.within '.layout-nav .controls' do
click_link('Project Settings') click_link('Edit Project')
end end
end end
...@@ -33,14 +35,10 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps ...@@ -33,14 +35,10 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
click_link('Deploy Keys') click_link('Deploy Keys')
end end
step 'the active sub nav should be Team' do step 'the active sub nav should be Members' do
ensure_active_sub_nav('Members') ensure_active_sub_nav('Members')
end end
step 'the active sub nav should be Edit' do
ensure_active_sub_nav('Project')
end
step 'the active sub nav should be Hooks' do step 'the active sub nav should be Hooks' do
ensure_active_sub_nav('Webhooks') ensure_active_sub_nav('Webhooks')
end end
...@@ -56,7 +54,9 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps ...@@ -56,7 +54,9 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
end end
step 'I click the "Branches" tab' do step 'I click the "Branches" tab' do
click_link('Branches') page.within '.content' do
click_link('Branches')
end
end end
step 'I click the "Tags" tab' do step 'I click the "Tags" tab' do
...@@ -82,11 +82,15 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps ...@@ -82,11 +82,15 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
# Sub Tabs: Issues # Sub Tabs: Issues
step 'I click the "Milestones" tab' do step 'I click the "Milestones" tab' do
click_link('Milestones') page.within('.layout-nav') do
click_link('Milestones')
end
end end
step 'I click the "Labels" tab' do step 'I click the "Labels" tab' do
click_link('Labels') page.within('.layout-nav') do
click_link('Labels')
end
end end
step 'the active sub tab should be Issues' do step 'the active sub tab should be Issues' do
......
...@@ -36,7 +36,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps ...@@ -36,7 +36,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
end end
step 'I goto the Merge Requests page' do step 'I goto the Merge Requests page' do
page.within '.page-sidebar-expanded' do page.within '.layout-nav' do
click_link "Merge Requests" click_link "Merge Requests"
end end
end end
......
...@@ -114,7 +114,9 @@ class Spinach::Features::Project < Spinach::FeatureSteps ...@@ -114,7 +114,9 @@ class Spinach::Features::Project < Spinach::FeatureSteps
end end
step 'I should not see "Snippets" button' do step 'I should not see "Snippets" button' do
expect(page).not_to have_link 'Snippets' page.within '.content' do
expect(page).not_to have_link 'Snippets'
end
end end
step 'project "Shop" belongs to group' do step 'project "Shop" belongs to group' do
...@@ -123,14 +125,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps ...@@ -123,14 +125,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps
@project.save! @project.save!
end end
step 'I should see back to dashboard button' do
expect(page).to have_content 'Go to dashboard'
end
step 'I should see back to group button' do
expect(page).to have_content 'Go to group'
end
step 'I click notifications drop down button' do step 'I click notifications drop down button' do
click_link 'notifications-button' click_link 'notifications-button'
end end
......
...@@ -52,7 +52,7 @@ class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps ...@@ -52,7 +52,7 @@ class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps
end end
step 'I click link "Labels"' do step 'I click link "Labels"' do
page.within('.nav-links') do page.within('.layout-nav .nav-links') do
page.find(:xpath, "//a[@href='#tab-labels']").click page.find(:xpath, "//a[@href='#tab-labels']").click
end end
end end
......
...@@ -3,6 +3,7 @@ class Spinach::Features::ProjectShortcuts < Spinach::FeatureSteps ...@@ -3,6 +3,7 @@ class Spinach::Features::ProjectShortcuts < Spinach::FeatureSteps
include SharedPaths include SharedPaths
include SharedProject include SharedProject
include SharedProjectTab include SharedProjectTab
include SharedShortcuts
step 'I press "g" and "f"' do step 'I press "g" and "f"' do
find('body').native.send_key('g') find('body').native.send_key('g')
......
...@@ -337,13 +337,15 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -337,13 +337,15 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end end
step 'I should see buttons for allowed commands' do step 'I should see buttons for allowed commands' do
expect(page).to have_content 'Raw' page.within '.content' do
expect(page).to have_content 'History' expect(page).to have_content 'Raw'
expect(page).to have_content 'Permalink' expect(page).to have_content 'History'
expect(page).not_to have_content 'Edit' expect(page).to have_content 'Permalink'
expect(page).not_to have_content 'Blame' expect(page).not_to have_content 'Edit'
expect(page).to have_content 'Delete' expect(page).not_to have_content 'Blame'
expect(page).to have_content 'Replace' expect(page).to have_content 'Delete'
expect(page).to have_content 'Replace'
end
end end
step 'I should see a notice about a new fork having been created' do step 'I should see a notice about a new fork having been created' do
......
...@@ -2,7 +2,7 @@ module SharedActiveTab ...@@ -2,7 +2,7 @@ module SharedActiveTab
include Spinach::DSL include Spinach::DSL
def ensure_active_main_tab(content) def ensure_active_main_tab(content)
expect(find('.nav-sidebar > li.active')).to have_content(content) expect(find('.layout-nav li.active')).to have_content(content)
end end
def ensure_active_sub_tab(content) def ensure_active_sub_tab(content)
...@@ -10,11 +10,11 @@ module SharedActiveTab ...@@ -10,11 +10,11 @@ module SharedActiveTab
end end
def ensure_active_sub_nav(content) def ensure_active_sub_nav(content)
expect(find('.sidebar-subnav > li.active')).to have_content(content) expect(find('.layout-nav .controls li.active')).to have_content(content)
end end
step 'no other main tabs should be active' do step 'no other main tabs should be active' do
expect(page).to have_selector('.nav-sidebar > li.active', count: 1) expect(page).to have_selector('.layout-nav .nav-links > li.active', count: 1)
end end
step 'no other sub tabs should be active' do step 'no other sub tabs should be active' do
...@@ -22,26 +22,6 @@ module SharedActiveTab ...@@ -22,26 +22,6 @@ module SharedActiveTab
end end
step 'no other sub navs should be active' do step 'no other sub navs should be active' do
expect(page).to have_selector('.sidebar-subnav > li.active', count: 1) expect(page).to have_selector('.layout-nav .controls li.active', count: 1)
end
step 'the active main tab should be Home' do
ensure_active_main_tab('Projects')
end
step 'the active main tab should be Projects' do
ensure_active_main_tab('Projects')
end
step 'the active main tab should be Issues' do
ensure_active_main_tab('Issues')
end
step 'the active main tab should be Merge Requests' do
ensure_active_main_tab('Merge Requests')
end
step 'the active main tab should be Help' do
ensure_active_main_tab('Help')
end end
end end
...@@ -111,7 +111,7 @@ module SharedIssuable ...@@ -111,7 +111,7 @@ module SharedIssuable
step 'I sort the list by "Oldest updated"' do step 'I sort the list by "Oldest updated"' do
find('button.dropdown-toggle.btn').click find('button.dropdown-toggle.btn').click
page.within('ul.dropdown-menu.dropdown-menu-align-right li') do page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do
click_link "Oldest updated" click_link "Oldest updated"
end end
end end
...@@ -119,7 +119,7 @@ module SharedIssuable ...@@ -119,7 +119,7 @@ module SharedIssuable
step 'I sort the list by "Least popular"' do step 'I sort the list by "Least popular"' do
find('button.dropdown-toggle.btn').click find('button.dropdown-toggle.btn').click
page.within('ul.dropdown-menu.dropdown-menu-align-right li') do page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do
click_link 'Least popular' click_link 'Least popular'
end end
end end
...@@ -127,13 +127,13 @@ module SharedIssuable ...@@ -127,13 +127,13 @@ module SharedIssuable
step 'I sort the list by "Most popular"' do step 'I sort the list by "Most popular"' do
find('button.dropdown-toggle.btn').click find('button.dropdown-toggle.btn').click
page.within('ul.dropdown-menu.dropdown-menu-align-right li') do page.within('.content ul.dropdown-menu.dropdown-menu-align-right li') do
click_link 'Most popular' click_link 'Most popular'
end end
end end
step 'The list should be sorted by "Oldest updated"' do step 'The list should be sorted by "Oldest updated"' do
page.within('div.dropdown.inline.prepend-left-10') do page.within('.content div.dropdown.inline.prepend-left-10') do
expect(page.find('button.dropdown-toggle.btn')).to have_content('Oldest updated') expect(page.find('button.dropdown-toggle.btn')).to have_content('Oldest updated')
end end
end end
......
...@@ -41,9 +41,7 @@ module SharedProjectTab ...@@ -41,9 +41,7 @@ module SharedProjectTab
end end
step 'the active main tab should be Settings' do step 'the active main tab should be Settings' do
page.within '.nav-sidebar' do expect(page).to have_selector('.layout-nav .nav-links > li.active', count: 0)
expect(page).to have_content('Go to project')
end
end end
step 'the active main tab should be Activity' do step 'the active main tab should be Activity' do
......
module SharedActiveTab module SharedShortcuts
include Spinach::DSL include Spinach::DSL
step 'I press "g" and "p"' do step 'I press "g" and "p"' do
......
module SharedSidebarActiveTab
include Spinach::DSL
step 'the active main tab should be Help' do
ensure_active_main_tab('Help')
end
step 'no other main tabs should be active' do
expect(page).to have_selector('.nav-sidebar > li.active', count: 1)
end
def ensure_active_main_tab(content)
expect(find('.nav-sidebar li.active')).to have_content(content)
end
step 'the active main tab should be Home' do
ensure_active_main_tab('Projects')
end
step 'the active main tab should be Projects' do
ensure_active_main_tab('Projects')
end
step 'the active main tab should be Issues' do
ensure_active_main_tab('Issues')
end
step 'the active main tab should be Merge Requests' do
ensure_active_main_tab('Merge Requests')
end
step 'the active main tab should be Help' do
ensure_active_main_tab('Help')
end
end
...@@ -8,12 +8,10 @@ feature 'list of badges' do ...@@ -8,12 +8,10 @@ feature 'list of badges' do
project = create(:project) project = create(:project)
project.team << [user, :master] project.team << [user, :master]
login_as(user) login_as(user)
visit edit_namespace_project_path(project.namespace, project) visit namespace_project_badges_path(project.namespace, project)
end end
scenario 'user displays list of badges' do scenario 'user displays list of badges' do
click_link 'Badges'
expect(page).to have_content 'build status' expect(page).to have_content 'build status'
expect(page).to have_content 'Markdown' expect(page).to have_content 'Markdown'
expect(page).to have_content 'HTML' expect(page).to have_content 'HTML'
...@@ -26,7 +24,6 @@ feature 'list of badges' do ...@@ -26,7 +24,6 @@ feature 'list of badges' do
end end
scenario 'user changes current ref on badges list page', js: true do scenario 'user changes current ref on badges list page', js: true do
click_link 'Badges'
select2('improve/awesome', from: '#ref') select2('improve/awesome', from: '#ref')
expect(page).to have_content 'badges/improve/awesome/build.svg' expect(page).to have_content 'badges/improve/awesome/build.svg'
......
...@@ -12,7 +12,7 @@ feature 'Master updates tag', feature: true do ...@@ -12,7 +12,7 @@ feature 'Master updates tag', feature: true do
context 'from the tags list page' do context 'from the tags list page' do
scenario 'updates the release notes' do scenario 'updates the release notes' do
page.within(first('.controls')) do page.within(first('.content-list .controls')) do
click_link 'Edit release notes' click_link 'Edit release notes'
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment