summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-05-19 20:46:48 -0700
committerStan Hu <stanhu@gmail.com>2015-05-22 09:52:09 -0400
commit7a7ce701692d4048a7f5ab2767aa30a8f5eb05c8 (patch)
tree20b4bf58667c30bf3c0ccf848bab19325fd6877b /features
parent2b1b026a1e8c7654b475aa0aaacf3121e86ee2a5 (diff)
downloadgitlab-ce-7a7ce701692d4048a7f5ab2767aa30a8f5eb05c8.tar.gz
Use the user list from the target project in a merge request
Closes #1535
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