summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/project/forked_merge_requests.feature12
-rw-r--r--features/steps/project/forked_merge_requests.rb15
2 files changed, 27 insertions, 0 deletions
diff --git a/features/project/forked_merge_requests.feature b/features/project/forked_merge_requests.feature
index d9fbb875c28..ad1160e3343 100644
--- a/features/project/forked_merge_requests.feature
+++ b/features/project/forked_merge_requests.feature
@@ -38,3 +38,15 @@ Feature: Project Forked Merge Requests
Given I visit project "Forked Shop" merge requests page
And I click link "New Merge Request"
Then the target repository should be the original repository
+
+ @javascript
+ Scenario: I see the users in the target project for a new merge request
+ Given I logout
+ And I sign in as an admin
+ And I have a project forked off of "Shop" called "Forked Shop"
+ Then I visit project "Forked Shop" merge requests page
+ And I click link "New Merge Request"
+ And I fill out a "Merge Request On Forked Project" merge request
+ When I click "Assign to" dropdown"
+ Then I should see the target project ID in the input selector
+ And I should see the users from the target project ID
diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb
index 94d21d28a0c..ebfa102cee5 100644
--- a/features/steps/project/forked_merge_requests.rb
+++ b/features/steps/project/forked_merge_requests.rb
@@ -128,6 +128,21 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
page.should have_select("merge_request_target_project_id", selected: @project.path_with_namespace)
end
+ step 'I click "Assign to" dropdown"' do
+ first('.ajax-users-select').click
+ end
+
+ step 'I should see the target project ID in the input selector' do
+ expect(page).to have_selector("input[data-project-id=\"#{@project.id}\"]")
+ end
+
+ step 'I should see the users from the target project ID' do
+ expect(page).to have_selector('.user-result', visible: true, count: 2)
+ users = page.all('.user-name')
+ users[0].text.should == 'Unassigned'
+ users[1].text.should == @project.users.first.name
+ end
+
# Verify a link is generated against the correct project
def verify_commit_link(container_div, container_project)
# This should force a wait for the javascript to execute