diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-05-09 23:08:34 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-05-09 23:08:34 +0000 |
commit | f5c8bfeacb3eeaeb07899328a580e390107b69a7 (patch) | |
tree | 14d1d4c309601209e4736d99f040f3fead3e2711 /features | |
parent | f4c36fac60e56ec3e50bb08581b5fababa05c693 (diff) | |
download | gitlab-ce-f5c8bfeacb3eeaeb07899328a580e390107b69a7.tar.gz |
Replace the `project/issues/references.feature` spinach test with an rspec analog
Diffstat (limited to 'features')
-rw-r--r-- | features/project/issues/references.feature | 33 | ||||
-rw-r--r-- | features/steps/shared/issuable.rb | 28 |
2 files changed, 0 insertions, 61 deletions
diff --git a/features/project/issues/references.feature b/features/project/issues/references.feature deleted file mode 100644 index 4ae2d653337..00000000000 --- a/features/project/issues/references.feature +++ /dev/null @@ -1,33 +0,0 @@ -@project_issues -Feature: Project Issues 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 issue" open issue - 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 issue" - And I visit merge request page "Enterprise fix" - And I leave a comment referencing issue "Community issue" - 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 issue" - Then I should not see any related merge requests - And 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 issue" - Then I should see the "Enterprise fix" related merge request - 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/issuable.rb b/features/steps/shared/issuable.rb index a9174efd334..8d9cd3db9d9 100644 --- a/features/steps/shared/issuable.rb +++ b/features/steps/shared/issuable.rb @@ -5,13 +5,6 @@ module SharedIssuable find('.js-issuable-edit', visible: true).click end - step 'project "Community" has "Community issue" open issue' do - create_issuable_for_project( - project_name: 'Community', - title: 'Community issue' - ) - end - step 'project "Community" has "Community fix" open merge request' do create_issuable_for_project( project_name: 'Community', @@ -59,32 +52,11 @@ module SharedIssuable visit project_merge_request_path(mr.target_project, mr) end - step 'I visit issue page "Community issue"' do - issue = Issue.find_by(title: 'Community issue') - visit project_issue_path(issue.project, issue) - 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 not see any related merge requests' do - page.within '.issue-details' do - expect(page).not_to have_content('#merge-requests .merge-requests-title') - end - end - - step 'I should see the "Enterprise fix" related merge request' do - page.within '#merge-requests .merge-requests-title' do - expect(page).to have_content('1 Related Merge Request') - end - - page.within '#merge-requests ul' do - expect(page).to have_content('Enterprise fix') - end - end - step 'I should see a note linking to "Enterprise fix" merge request' do visible_note( issuable: MergeRequest.find_by(title: 'Enterprise fix'), |