diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-01-05 15:12:35 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-01-05 15:12:35 +0000 |
commit | 7c3c901ada6fc4a6d2d3ce7a2cf8188cf6615008 (patch) | |
tree | 20ce6767a9ce239b893b64fbf04d815b79f98686 /features | |
parent | 9b1270280a65cc39c8dd908a12f8dbc7847ec971 (diff) | |
parent | edd2ce38369e5a332b1b9932647d670862ffddbf (diff) | |
download | gitlab-ce-7c3c901ada6fc4a6d2d3ce7a2cf8188cf6615008.tar.gz |
Merge branch 'joshfng/gitlab-ce-fix-3802' into 'master'
Show 'New Merge Request' buttons on canonical repo. (by @joshfng)
Replaces https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2189 to run tests on our runners.
See merge request !2300
Diffstat (limited to 'features')
-rw-r--r-- | features/project/fork.feature | 11 | ||||
-rw-r--r-- | features/steps/project/fork.rb | 19 |
2 files changed, 30 insertions, 0 deletions
diff --git a/features/project/fork.feature b/features/project/fork.feature index 22f68e5b340..37cd53ee977 100644 --- a/features/project/fork.feature +++ b/features/project/fork.feature @@ -14,3 +14,14 @@ Feature: Project Fork And I click link "Fork" When I fork to my namespace Then I should see a "Name has already been taken" warning + + Scenario: Merge request on canonical repo goes to fork merge request page + Given I click link "Fork" + And I fork to my namespace + Then I should see the forked project page + When I visit project "Shop" page + Then I should see "New merge request" + And I goto the Merge Requests page + Then I should see "New merge request" + And I click link "New merge request" + Then I should see the new merge request page for my namespace diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb index b0230add34f..e98bd51ca89 100644 --- a/features/steps/project/fork.rb +++ b/features/steps/project/fork.rb @@ -30,4 +30,23 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps click_link current_user.name end end + + step 'I should see "New merge request"' do + expect(page).to have_content(/new merge request/i) + end + + step 'I goto the Merge Requests page' do + page.within '.page-sidebar-expanded' do + click_link "Merge Requests" + end + end + + step 'I click link "New merge request"' do + expect(page).to have_content(/new merge request/i) + click_link "New Merge Request" + end + + step 'I should see the new merge request page for my namespace' do + current_path.should have_content(/#{current_user.namespace.name}/i) + end end |