diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-10 21:20:54 +1100 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-10 21:20:54 +1100 |
commit | 6060d65277e753c73740a1129998ce61e5a60106 (patch) | |
tree | 7c66b2b0e0d3e20758f7415f66927563a6439b8c /features | |
parent | 5d952f756bcf0355fc5d86d819dfc6913c0ae351 (diff) | |
download | gitlab-ce-6060d65277e753c73740a1129998ce61e5a60106.tar.gz |
Replace the project/team_management.feature spinach test with an rspec analog
Diffstat (limited to 'features')
-rw-r--r-- | features/project/team_management.feature | 26 | ||||
-rw-r--r-- | features/steps/project/team_management.rb | 87 |
2 files changed, 0 insertions, 113 deletions
diff --git a/features/project/team_management.feature b/features/project/team_management.feature deleted file mode 100644 index aed41924cd9..00000000000 --- a/features/project/team_management.feature +++ /dev/null @@ -1,26 +0,0 @@ -Feature: Project Team Management - Background: - Given I sign in as a user - And I own project "Shop" - And gitlab user "Mike" - And gitlab user "Dmitriy" - And "Dmitriy" is "Shop" developer - And I visit project "Shop" team page - - Scenario: Cancel team member - Given I click cancel link for "Dmitriy" - Then I visit project "Shop" team page - And I should not see "Dmitriy" in team list - - Scenario: Import team from another project - Given I own project "Website" - And "Mike" is "Website" reporter - When I visit project "Shop" team page - And I click link "Import team from another project" - And I submit "Website" project for import team - Then I should see "Mike" in team list as "Reporter" - - Scenario: See all members of projects shared group - Given I share project with group "OpenSource" - And I visit project "Shop" team page - Then I should see "Opensource" group user listing diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb deleted file mode 100644 index 5c4025ace34..00000000000 --- a/features/steps/project/team_management.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - include Select2Helper - - step 'I should not see "Dmitriy" in team list' do - user = User.find_by(name: "Dmitriy") - expect(page).not_to have_content(user.name) - expect(page).not_to have_content(user.username) - 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 - expect(page).to have_content('Mike') - expect(page).to have_content('Reporter') - end - end - - step 'gitlab user "Mike"' do - create(:user, name: "Mike") - end - - step 'gitlab user "Dmitriy"' do - create(:user, name: "Dmitriy") - end - - step '"Dmitriy" is "Shop" developer' do - user = User.find_by(name: "Dmitriy") - project = Project.find_by(name: "Shop") - project.team << [user, :developer] - end - - step 'I own project "Website"' do - @project = create(:project, name: "Website", namespace: @user.namespace) - @project.team << [@user, :master] - end - - step '"Mike" is "Website" reporter' do - user = User.find_by(name: "Mike") - project = Project.find_by(name: "Website") - project.team << [user, :reporter] - end - - step 'I click link "Import team from another project"' do - page.within '.users-project-form' do - click_link "Import" - end - end - - When 'I submit "Website" project for import team' do - project = Project.find_by(name: "Website") - select project.name_with_namespace, from: 'source_project_id' - click_button 'Import' - end - - step 'I click cancel link for "Dmitriy"' do - project = Project.find_by(name: "Shop") - 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') - end - end - - step 'I share project with group "OpenSource"' do - project = Project.find_by(name: 'Shop') - os_group = create(:group, name: 'OpenSource') - create(:project, group: os_group) - @os_user1 = create(:user) - @os_user2 = create(:user) - os_group.add_owner(@os_user1) - os_group.add_user(@os_user2, Gitlab::Access::DEVELOPER) - share_link = project.project_group_links.new(group_access: Gitlab::Access::MASTER) - share_link.group_id = os_group.id - share_link.save! - end - - step 'I should see "Opensource" group user listing' do - page.within '.project-members-groups' do - expect(page).to have_content('OpenSource') - expect(first('.group_member')).to have_content('Master') - end - end -end |