diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-13 16:30:36 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-15 13:55:57 +0100 |
commit | 5ad35bbe028c60c1281871b45619455a508f7b5b (patch) | |
tree | 2cd602e95a465c39ccadec5ecd3be68a276dc46d /features | |
parent | 84371de01f3ce7bab334539a93734658528736ec (diff) | |
download | gitlab-ce-5ad35bbe028c60c1281871b45619455a508f7b5b.tar.gz |
Use same layout and interactivity for project members as group members.
Diffstat (limited to 'features')
-rw-r--r-- | features/project/team_management.feature | 2 | ||||
-rw-r--r-- | features/steps/project/team_management.rb | 21 |
2 files changed, 14 insertions, 9 deletions
diff --git a/features/project/team_management.feature b/features/project/team_management.feature index 86ea6cd6e91..22393622bb9 100644 --- a/features/project/team_management.feature +++ b/features/project/team_management.feature @@ -13,7 +13,7 @@ Feature: Project Team Management @javascript Scenario: Add user to project - Given I click link "New Team Member" + Given I click link "Add members" And I select "Mike" as "Reporter" Then I should see "Mike" in team list as "Reporter" diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb index 7907f2a6fe3..304df17d6f1 100644 --- a/features/steps/project/team_management.rb +++ b/features/steps/project/team_management.rb @@ -15,18 +15,18 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps page.should have_content(user.username) end - step 'I click link "New Team Member"' do - click_link "New project member" + step 'I click link "Add members"' do + find(:css, 'a.btn-add').click end step 'I select "Mike" as "Reporter"' do user = User.find_by(name: "Mike") - select2(user.id, from: "#user_ids", multiple: true) - within "#new_project_member" do + within ".users-project-form" do + select2(user.id, from: "#user_ids", multiple: true) select "Reporter", from: "access_level" end - click_button "Add users" + click_button "Add users to project" end step 'I should see "Mike" in team list as "Reporter"' do @@ -42,8 +42,10 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps end step 'I change "Sam" role to "Reporter"' do - user = User.find_by(name: "Sam") - within "#user_#{user.id}" do + project = Project.find_by(name: "Shop") + user = User.find_by(name: 'Sam') + project_member = project.project_members.find_by(user_id: user.id) + within "#project_member_#{project_member.id}" do select "Reporter", from: "project_member_access_level" end end @@ -100,7 +102,10 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps end step 'I click cancel link for "Sam"' do - within "#user_#{User.find_by(name: 'Sam').id}" do + project = Project.find_by(name: "Shop") + user = User.find_by(name: 'Sam') + project_member = project.project_members.find_by(user_id: user.id) + within "#project_member_#{project_member.id}" do click_link('Remove user from team') end end |