summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-06-16 12:59:07 +0200
committerJames Lopez <james@jameslopez.es>2016-06-16 12:59:07 +0200
commit452c076a34cc11cc97f4b1c3113e86ce4367e055 (patch)
treea503b33dc6dd181e2cf56d5965fc1eb822b4d9f9 /features
parent13e37a3ee5c943525a99481b855d654e97e8597c (diff)
downloadgitlab-ce-452c076a34cc11cc97f4b1c3113e86ce4367e055.tar.gz
Revert "squashed merge and fixed conflicts"
This reverts commit 13e37a3ee5c943525a99481b855d654e97e8597c.
Diffstat (limited to 'features')
-rw-r--r--features/admin/active_tab.feature22
-rw-r--r--features/steps/admin/active_tab.rb36
-rw-r--r--features/steps/dashboard/group.rb2
-rw-r--r--features/steps/dashboard/new_project.rb3
-rw-r--r--features/steps/group/members.rb14
-rw-r--r--features/steps/project/source/browse_files.rb6
-rw-r--r--features/steps/project/team_management.rb26
7 files changed, 50 insertions, 59 deletions
diff --git a/features/admin/active_tab.feature b/features/admin/active_tab.feature
index f5bb06dea7d..5de07e90e28 100644
--- a/features/admin/active_tab.feature
+++ b/features/admin/active_tab.feature
@@ -5,36 +5,28 @@ Feature: Admin Active Tab
Scenario: On Admin Home
Given I visit admin page
- Then the active main tab should be Overview
+ Then the active main tab should be Home
And no other main tabs should be active
Scenario: On Admin Projects
Given I visit admin projects page
- Then the active main tab should be Overview
- And the active sub tab should be Projects
+ Then the active main tab should be Projects
And no other main tabs should be active
- And no other sub tabs should be active
Scenario: On Admin Groups
Given I visit admin groups page
- Then the active main tab should be Overview
- And the active sub tab should be Groups
+ Then the active main tab should be Groups
And no other main tabs should be active
- And no other sub tabs should be active
Scenario: On Admin Users
Given I visit admin users page
- Then the active main tab should be Overview
- And the active sub tab should be Users
+ Then the active main tab should be Users
And no other main tabs should be active
- And no other sub tabs should be active
Scenario: On Admin Logs
Given I visit admin logs page
- Then the active main tab should be Monitoring
- And the active sub tab should be Logs
+ Then the active main tab should be Logs
And no other main tabs should be active
- And no other sub tabs should be active
Scenario: On Admin Messages
Given I visit admin messages page
@@ -48,7 +40,5 @@ Feature: Admin Active Tab
Scenario: On Admin Resque
Given I visit admin Resque page
- Then the active main tab should be Monitoring
- And the active sub tab should be Resque
+ Then the active main tab should be Resque
And no other main tabs should be active
- And no other sub tabs should be active
diff --git a/features/steps/admin/active_tab.rb b/features/steps/admin/active_tab.rb
index 9b1689a8198..f2db1801389 100644
--- a/features/steps/admin/active_tab.rb
+++ b/features/steps/admin/active_tab.rb
@@ -1,41 +1,45 @@
class Spinach::Features::AdminActiveTab < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
- include SharedActiveTab
+ include SharedSidebarActiveTab
- step 'the active main tab should be Overview' do
+ step 'the active main tab should be Home' do
ensure_active_main_tab('Overview')
end
- step 'the active sub tab should be Projects' do
- ensure_active_sub_tab('Projects')
+ step 'the active main tab should be Projects' do
+ ensure_active_main_tab('Projects')
end
- step 'the active sub tab should be Groups' do
- ensure_active_sub_tab('Groups')
+ step 'the active main tab should be Groups' do
+ ensure_active_main_tab('Groups')
end
- step 'the active sub tab should be Users' do
- ensure_active_sub_tab('Users')
+ step 'the active main tab should be Users' do
+ ensure_active_main_tab('Users')
+ end
+
+ step 'the active main tab should be Logs' do
+ ensure_active_main_tab('Logs')
end
step 'the active main tab should be Hooks' do
ensure_active_main_tab('Hooks')
end
- step 'the active main tab should be Monitoring' do
- ensure_active_main_tab('Monitoring')
+ step 'the active main tab should be Resque' do
+ ensure_active_main_tab('Background Jobs')
end
- step 'the active sub tab should be Resque' do
- ensure_active_sub_tab('Background Jobs')
+ step 'the active main tab should be Messages' do
+ ensure_active_main_tab('Messages')
end
- step 'the active sub tab should be Logs' do
- ensure_active_sub_tab('Logs')
+ step 'no other main tabs should be active' do
+ expect(page).to have_selector('.nav-sidebar > li.active', count: 1)
end
- step 'the active main tab should be Messages' do
- ensure_active_main_tab('Messages')
+ def ensure_active_main_tab(content)
+ expect(find('.nav-sidebar > li.active')).to have_content(content)
end
end
diff --git a/features/steps/dashboard/group.rb b/features/steps/dashboard/group.rb
index 9b79a3be49b..0c6a0ae3725 100644
--- a/features/steps/dashboard/group.rb
+++ b/features/steps/dashboard/group.rb
@@ -62,6 +62,6 @@ class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
end
step 'I should see the "Can not leave message"' do
- expect(page).to have_content "You can not leave the \"Owned\" group."
+ expect(page).to have_content "You can not leave Owned group because you're the last owner"
end
end
diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb
index 5308e77fb19..a0aad66184d 100644
--- a/features/steps/dashboard/new_project.rb
+++ b/features/steps/dashboard/new_project.rb
@@ -10,8 +10,7 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
end
step 'I see "New Project" page' do
- expect(page).to have_content('Project owner')
- expect(page).to have_content('Project name')
+ expect(page).to have_content('Project path')
end
step 'I see all possible import optios' do
diff --git a/features/steps/group/members.rb b/features/steps/group/members.rb
index dfa2fa75def..0706df3aec5 100644
--- a/features/steps/group/members.rb
+++ b/features/steps/group/members.rb
@@ -53,7 +53,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
step 'I should see "sjobs@apple.com" in team list as invited "Reporter"' do
page.within '.content-list' do
expect(page).to have_content('sjobs@apple.com')
- expect(page).to have_content('Invited')
+ expect(page).to have_content('invited')
expect(page).to have_content('Reporter')
end
end
@@ -116,9 +116,11 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
member = mary_jane_member
page.within "#group_member_#{member.id}" do
- click_button "Edit access level"
- select 'Developer', from: 'group_member_access_level'
- click_on 'Save'
+ find(".js-toggle-button").click
+ page.within "#edit_group_member_#{member.id}" do
+ select 'Developer', from: 'group_member_access_level'
+ click_on 'Save'
+ end
end
end
@@ -126,7 +128,9 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
member = mary_jane_member
page.within "#group_member_#{member.id}" do
- expect(page).to have_content "Developer"
+ page.within '.member-access-level' do
+ expect(page).to have_content "Developer"
+ end
end
end
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index 79a3ed8197e..2c0498de3b9 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -202,8 +202,8 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I see Browse dir link' do
- expect(page).to have_link 'Browse Directory'
- expect(page).not_to have_link 'Browse Code'
+ expect(page).to have_link 'Browse Directory »'
+ expect(page).not_to have_link 'Browse Code »'
end
step 'I click on readme file' do
@@ -219,7 +219,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step 'I see Browse code link' do
expect(page).to have_link 'Browse Files'
- expect(page).not_to have_link 'Browse Directory'
+ expect(page).not_to have_link 'Browse Directory »'
end
step 'I click on Permalink' do
diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb
index f32576d2cb1..c6ced747370 100644
--- a/features/steps/project/team_management.rb
+++ b/features/steps/project/team_management.rb
@@ -26,11 +26,8 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I should see "Mike" in team list as "Reporter"' do
- user = User.find_by(name: 'Mike')
- project_member = project.project_members.find_by(user_id: user.id)
- page.within "#project_member_#{project_member.id}" do
+ page.within ".access-reporter" do
expect(page).to have_content('Mike')
- expect(page).to have_content('Reporter')
end
end
@@ -43,20 +40,16 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I should see "sjobs@apple.com" in team list as invited "Reporter"' do
- project_member = project.project_members.find_by(invite_email: 'sjobs@apple.com')
- page.within "#project_member_#{project_member.id}" do
+ page.within ".access-reporter" do
expect(page).to have_content('sjobs@apple.com')
- expect(page).to have_content('Invited')
+ expect(page).to have_content('invited')
expect(page).to have_content('Reporter')
end
end
step 'I should see "Dmitriy" in team list as "Developer"' do
- user = User.find_by(name: 'Dmitriy')
- project_member = project.project_members.find_by(user_id: user.id)
- page.within "#project_member_#{project_member.id}" do
+ page.within ".access-developer" do
expect(page).to have_content('Dmitriy')
- expect(page).to have_content('Developer')
end
end
@@ -72,14 +65,15 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I should see "Dmitriy" in team list as "Reporter"' do
- user = User.find_by(name: 'Dmitriy')
- project_member = project.project_members.find_by(user_id: user.id)
- page.within "#project_member_#{project_member.id}" do
+ page.within ".access-reporter" do
expect(page).to have_content('Dmitriy')
- expect(page).to have_content('Reporter')
end
end
+ step 'I click link "Remove from team"' do
+ click_link "Remove from team"
+ end
+
step 'I should not see "Dmitriy" in team list' do
user = User.find_by(name: "Dmitriy")
expect(page).not_to have_content(user.name)
@@ -126,7 +120,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
user = User.find_by(name: 'Dmitriy')
project_member = project.project_members.find_by(user_id: user.id)
page.within "#project_member_#{project_member.id}" do
- click_link('Remove user from project')
+ click_link('Remove user from team')
end
end