diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-10 12:28:45 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-10 12:28:45 +0000 |
commit | 7181fdd23e1744e1a1d794dad2d115f0d2b97f95 (patch) | |
tree | 80cd2dd1b1661748c64e528cfe1a0e878e99d0c4 /features | |
parent | 8972aef55865263833f7d30188c4a49c83e7f001 (diff) | |
parent | 746e49fee9a28f509f115074d9985830de45513d (diff) | |
download | gitlab-ce-7181fdd23e1744e1a1d794dad2d115f0d2b97f95.tar.gz |
Merge branch 'issue_3072_target_name' into 'master'
Display target branch on MR list when it is different from project's default
Fixes #3072
The screenshot below shows both previous and current UI state:
![branch-mr-both](/uploads/5c1f0519e42bae4655f3eee37edfc356/branch-mr-both.png)
First merge request has default branch as a target, second one has non default branch as target.
See merge request !1741
Diffstat (limited to 'features')
-rw-r--r-- | features/project/merge_requests.feature | 9 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 20 |
2 files changed, 29 insertions, 0 deletions
diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index f423c3ba542..6cd081c868e 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -16,6 +16,15 @@ Feature: Project Merge Requests When I visit project "Shop" merge requests page Then I should see merge request "Bug NS-05" with CI status + Scenario: I should not see target branch name when it is project's default branch + Then I should see "Bug NS-04" in merge requests + And I should not see "master" branch + + Scenario: I should see target branch when it is different from default + Given project "Shop" have "Bug NS-06" open merge request + When I visit project "Shop" merge requests page + Then I should see "other_branch" branch + Scenario: I should see rejected merge requests Given I click link "Closed" Then I should see "Feature NS-03" in merge requests diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 92ec14d0d76..d5f2c4209a1 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -40,6 +40,14 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps expect(page).to have_content "Bug NS-04" end + step 'I should not see "master" branch' do + expect(page).not_to have_content "master" + end + + step 'I should see "other_branch" branch' do + expect(page).to have_content "other_branch" + end + step 'I should see "Bug NS-04" in merge requests' do expect(page).to have_content "Bug NS-04" end @@ -93,6 +101,18 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ) end + step 'project "Shop" have "Bug NS-06" open merge request' do + create(:merge_request, + title: "Bug NS-06", + source_project: project, + target_project: project, + source_branch: 'fix', + target_branch: 'other_branch', + author: project.users.first, + description: "# Description header" + ) + end + step 'project "Shop" have "Bug NS-05" open merge request with diffs inside' do create(:merge_request_with_diffs, title: "Bug NS-05", |