diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/project/merge_requests/references.feature | 31 | ||||
-rw-r--r-- | features/steps/shared/authentication.rb | 12 | ||||
-rw-r--r-- | features/steps/shared/issuable.rb | 61 | ||||
-rw-r--r-- | features/steps/shared/note.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/project.rb | 23 |
5 files changed, 0 insertions, 131 deletions
diff --git a/features/project/merge_requests/references.feature b/features/project/merge_requests/references.feature deleted file mode 100644 index 571612261a9..00000000000 --- a/features/project/merge_requests/references.feature +++ /dev/null @@ -1,31 +0,0 @@ -@project_merge_requests -Feature: Project Merge Requests References - Background: - Given I sign in as "John Doe" - And public project "Community" - And "John Doe" owns public project "Community" - And project "Community" has "Community fix" open merge request - And I logout - And I sign in as "Mary Jane" - And private project "Enterprise" - And "Mary Jane" owns private project "Enterprise" - And project "Enterprise" has "Enterprise issue" open issue - And project "Enterprise" has "Enterprise fix" open merge request - And I visit issue page "Enterprise issue" - And I leave a comment referencing issue "Community fix" - And I visit merge request page "Enterprise fix" - And I leave a comment referencing issue "Community fix" - And I logout - - @javascript - Scenario: Viewing the public issue as a "John Doe" - Given I sign in as "John Doe" - When I visit issue page "Community fix" - Then I should see no notes at all - - @javascript - Scenario: Viewing the public issue as "Mary Jane" - Given I sign in as "Mary Jane" - When I visit issue page "Community fix" - And I should see a note linking to "Enterprise fix" merge request - And I should see a note linking to "Enterprise issue" issue diff --git a/features/steps/shared/authentication.rb b/features/steps/shared/authentication.rb index 97fac595d8e..27dd391b83d 100644 --- a/features/steps/shared/authentication.rb +++ b/features/steps/shared/authentication.rb @@ -22,22 +22,10 @@ module SharedAuthentication sign_in(@user) end - step 'I sign in as "John Doe"' do - gitlab_sign_in(user_exists("John Doe")) - end - - step 'I sign in as "Mary Jane"' do - gitlab_sign_in(user_exists("Mary Jane")) - end - step 'I should be redirected to sign in page' do expect(current_path).to eq new_user_session_path end - step "I logout" do - gitlab_sign_out - end - step "I logout directly" do gitlab_sign_out end diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb index 8d9cd3db9d9..cc6fd48935f 100644 --- a/features/steps/shared/issuable.rb +++ b/features/steps/shared/issuable.rb @@ -5,29 +5,6 @@ module SharedIssuable find('.js-issuable-edit', visible: true).click end - step 'project "Community" has "Community fix" open merge request' do - create_issuable_for_project( - project_name: 'Community', - type: :merge_request, - title: 'Community fix' - ) - end - - step 'project "Enterprise" has "Enterprise issue" open issue' do - create_issuable_for_project( - project_name: 'Enterprise', - title: 'Enterprise issue' - ) - end - - step 'project "Enterprise" has "Enterprise fix" open merge request' do - create_issuable_for_project( - project_name: 'Enterprise', - type: :merge_request, - title: 'Enterprise fix' - ) - end - step 'I leave a comment referencing issue "Community issue"' do leave_reference_comment( issuable: Issue.find_by(title: 'Community issue'), @@ -35,44 +12,6 @@ module SharedIssuable ) end - step 'I leave a comment referencing issue "Community fix"' do - leave_reference_comment( - issuable: MergeRequest.find_by(title: 'Community fix'), - from_project_name: 'Enterprise' - ) - end - - step 'I visit issue page "Enterprise issue"' do - issue = Issue.find_by(title: 'Enterprise issue') - visit project_issue_path(issue.project, issue) - end - - step 'I visit merge request page "Enterprise fix"' do - mr = MergeRequest.find_by(title: 'Enterprise fix') - visit project_merge_request_path(mr.target_project, mr) - end - - step 'I visit issue page "Community fix"' do - mr = MergeRequest.find_by(title: 'Community fix') - visit project_merge_request_path(mr.target_project, mr) - end - - step 'I should see a note linking to "Enterprise fix" merge request' do - visible_note( - issuable: MergeRequest.find_by(title: 'Enterprise fix'), - from_project_name: 'Community', - user_name: 'Mary Jane' - ) - end - - step 'I should see a note linking to "Enterprise issue" issue' do - visible_note( - issuable: Issue.find_by(title: 'Enterprise issue'), - from_project_name: 'Community', - user_name: 'Mary Jane' - ) - end - step 'I click link "Edit" for the merge request' do edit_issuable end diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb index bf1b88c60d7..4a6dee3c7b8 100644 --- a/features/steps/shared/note.rb +++ b/features/steps/shared/note.rb @@ -18,8 +18,4 @@ module SharedNote expect(find('.js-md-preview')).to have_content('Nothing to preview.') end end - - step 'I should see no notes at all' do - expect(page).not_to have_css('.note') - end end diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index a1945cf5f3d..dbfb90fcc48 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -42,10 +42,6 @@ module SharedProject # Visibility level # ---------------------------------------- - step 'private project "Enterprise"' do - create(:project, :private, :repository, name: 'Enterprise') - end - step 'I should see project "Enterprise"' do expect(page).to have_content "Enterprise" end @@ -70,10 +66,6 @@ module SharedProject end end - step 'public project "Community"' do - create(:project, :public, :repository, name: 'Community') - end - step 'I should see project "Community"' do expect(page).to have_content "Community" end @@ -89,13 +81,6 @@ module SharedProject ) end - step '"Mary Jane" owns private project "Enterprise"' do - user_owns_project( - user_name: 'Mary Jane', - project_name: 'Enterprise' - ) - end - step '"John Doe" owns internal project "Internal"' do user_owns_project( user_name: 'John Doe', @@ -104,14 +89,6 @@ module SharedProject ) end - step '"John Doe" owns public project "Community"' do - user_owns_project( - user_name: 'John Doe', - project_name: 'Community', - visibility: :public - ) - end - step 'public empty project "Empty Public Project"' do create :project_empty_repo, :public, name: "Empty Public Project" end |