summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-10-14 12:25:23 +0000
committerFatih Acet <acetfatih@gmail.com>2016-10-14 12:25:23 +0000
commit66855f62622e9fb87ae12de53c7912c4b79baa47 (patch)
treec61c2e1bfc4e13db98db59f28865d866ebb1e613 /features
parentfd2b79b6646f9b621a5e30058a09423a8cdb6c49 (diff)
parent9ec7aeac2362151e15e59531f347f2d7924437f8 (diff)
downloadgitlab-ce-66855f62622e9fb87ae12de53c7912c4b79baa47.tar.gz
Merge branch 'members-ui' into 'master'
Project members UI ## What does this MR do? New UI for project members that includes groups. ## Screenshots (if relevant) ### Project members ![Screen_Shot_2016-09-02_at_15.13.27](/uploads/b9d4a634d44b7b7bbb6eddb10aee86bd/Screen_Shot_2016-09-02_at_15.13.27.png) ### Group members ![Screen_Shot_2016-09-02_at_15.13.36](/uploads/c15c173e68b2c0b49bcd06ca560269d3/Screen_Shot_2016-09-02_at_15.13.36.png) ## What are the relevant issue numbers? Part of #19868 Closes #21320 See merge request !6148
Diffstat (limited to 'features')
-rw-r--r--features/steps/admin/groups.rb2
-rw-r--r--features/steps/admin/projects.rb2
-rw-r--r--features/steps/group/members.rb14
-rw-r--r--features/steps/project/team_management.rb17
4 files changed, 17 insertions, 18 deletions
diff --git a/features/steps/admin/groups.rb b/features/steps/admin/groups.rb
index 0c89a3db9ad..9396a76f0a2 100644
--- a/features/steps/admin/groups.rb
+++ b/features/steps/admin/groups.rb
@@ -105,7 +105,7 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
select "Developer", from: "access_level"
end
- click_button "Add users to group"
+ click_button "Add to group"
end
step 'I should see current user as "Developer"' do
diff --git a/features/steps/admin/projects.rb b/features/steps/admin/projects.rb
index d77945a6b9c..2b8cd030ace 100644
--- a/features/steps/admin/projects.rb
+++ b/features/steps/admin/projects.rb
@@ -70,7 +70,7 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
select "Developer", from: "access_level"
end
- click_button "Add users to project"
+ click_button "Add to project"
end
step 'I should see current user as "Developer"' do
diff --git a/features/steps/group/members.rb b/features/steps/group/members.rb
index e9b45823c67..cefc55d07ab 100644
--- a/features/steps/group/members.rb
+++ b/features/steps/group/members.rb
@@ -1,4 +1,5 @@
class Spinach::Features::GroupMembers < Spinach::FeatureSteps
+ include WaitForAjax
include SharedAuthentication
include SharedPaths
include SharedGroup
@@ -13,7 +14,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
select "Reporter", from: "access_level"
end
- click_button "Add users to group"
+ click_button "Add to group"
end
step 'I select "Mike" as "Master"' do
@@ -24,7 +25,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
select "Master", from: "access_level"
end
- click_button "Add users to group"
+ click_button "Add to group"
end
step 'I should see "Mike" in team list as "Reporter"' do
@@ -47,7 +48,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
select "Reporter", from: "access_level"
end
- click_button "Add users to group"
+ click_button "Add to group"
end
step 'I should see "sjobs@apple.com" in team list as invited "Reporter"' do
@@ -66,7 +67,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
select "Reporter", from: "access_level"
end
- click_button "Add users to group"
+ click_button "Add to group"
end
step 'I should see user "John Doe" in team list' do
@@ -108,7 +109,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
step 'I search for \'Mary\' member' do
page.within '.member-search-form' do
fill_in 'search', with: 'Mary'
- click_button 'Search'
+ find('.member-search-btn').click
end
end
@@ -116,9 +117,8 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
member = mary_jane_member
page.within "#group_member_#{member.id}" do
- click_button 'Edit'
select 'Developer', from: "member_access_level_#{member.id}"
- click_on 'Save'
+ wait_for_ajax
end
end
diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb
index e920f5a706b..b21d0849ad1 100644
--- a/features/steps/project/team_management.rb
+++ b/features/steps/project/team_management.rb
@@ -22,7 +22,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
select2(user.id, from: "#user_ids", multiple: true)
select "Reporter", from: "access_level"
end
- click_button "Add users to project"
+ click_button "Add to project"
end
step 'I should see "Mike" in team list as "Reporter"' do
@@ -36,10 +36,10 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
step 'I select "sjobs@apple.com" as "Reporter"' do
page.within ".users-project-form" do
- select2("sjobs@apple.com", from: "#user_ids", multiple: true)
+ find('#user_ids', visible: false).set('sjobs@apple.com')
select "Reporter", from: "access_level"
end
- click_button "Add users to project"
+ click_button "Add to project"
end
step 'I should see "sjobs@apple.com" in team list as invited "Reporter"' do
@@ -65,9 +65,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_button 'Edit'
select "Reporter", from: "member_access_level_#{project_member.id}"
- click_button "Save"
end
end
@@ -112,7 +110,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I click link "Import team from another project"' do
- click_link "Import members from another project"
+ click_link "Import"
end
When 'I submit "Website" project for import team' do
@@ -144,8 +142,9 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I should see "Opensource" group user listing' do
- expect(page).to have_content("Shared with OpenSource group, members with Master role (2)")
- expect(page).to have_content(@os_user1.name)
- expect(page).to have_content(@os_user2.name)
+ page.within '.project-members-groups' do
+ expect(page).to have_content('OpenSource')
+ expect(find('select').value).to eq('40')
+ end
end
end