summaryrefslogtreecommitdiff
path: root/features/steps
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-07-07 18:05:34 -0400
committerDouwe Maan <douwe@selenight.nl>2016-07-07 18:05:34 -0400
commit5a8f727fd5400634a99eae82e7bac5e26cf36d4e (patch)
treedde30050a8992e4ba0b5d3f0e98794d1f6089df8 /features/steps
parentd925aea9f388f8ca5c858e825e5303232fa16c1d (diff)
parent86d238e4bda6424a79eb9d8ea7cfe41af714f49f (diff)
downloadgitlab-ce-5a8f727fd5400634a99eae82e7bac5e26cf36d4e.tar.gz
Merge branch 'master' into faster-diffs
# Conflicts: # app/helpers/notes_helper.rb # app/views/projects/diffs/_line.html.haml # app/views/projects/diffs/_parallel_view.html.haml # app/views/projects/diffs/_text_file.html.haml # features/steps/shared/diff_note.rb
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/admin/groups.rb3
-rw-r--r--features/steps/admin/projects.rb9
-rw-r--r--features/steps/project/merge_requests.rb5
-rw-r--r--features/steps/shared/diff_note.rb12
4 files changed, 15 insertions, 14 deletions
diff --git a/features/steps/admin/groups.rb b/features/steps/admin/groups.rb
index 8613dc537cc..0c89a3db9ad 100644
--- a/features/steps/admin/groups.rb
+++ b/features/steps/admin/groups.rb
@@ -62,7 +62,8 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
step 'I should see "johndoe@gitlab.com" in team list in every project as "Reporter"' do
page.within ".group-users-list" do
- expect(page).to have_content "johndoe@gitlab.com – Invited by"
+ expect(page).to have_content "johndoe@gitlab.com"
+ expect(page).to have_content "Invited by"
expect(page).to have_content "Reporter"
end
end
diff --git a/features/steps/admin/projects.rb b/features/steps/admin/projects.rb
index a7a28755a6c..d77945a6b9c 100644
--- a/features/steps/admin/projects.rb
+++ b/features/steps/admin/projects.rb
@@ -18,9 +18,9 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
end
end
- step 'I check "Show archived projects"' do
- page.check 'Show archived projects'
- click_button "Search"
+ step 'I select "Show archived projects"' do
+ find(:css, '#sort-projects-dropdown').click
+ click_link 'Show archived projects'
end
step 'I should see "archived" label' do
@@ -45,7 +45,8 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
step 'I transfer project to group \'Web\'' do
allow_any_instance_of(Projects::TransferService).
to receive(:move_uploads_to_new_namespace).and_return(true)
- find(:xpath, "//input[@id='new_namespace_id']").set group.id
+ click_button 'Search for Namespace'
+ click_link 'group: web'
click_button 'Transfer'
end
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index 640f1720a6c..da848afd48e 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -272,10 +272,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'user "John Doe" leaves a comment like "Line is wrong" on diff' do
mr = MergeRequest.find_by(title: "Bug NS-05")
- create(:note_on_merge_request_diff, project: project,
+ create(:diff_note_on_merge_request, project: project,
noteable: mr,
author: user_exists("John Doe"),
- line_code: sample_commit.line_code,
note: 'Line is wrong')
end
@@ -519,7 +518,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step '"Bug NS-05" has CI status' do
project = merge_request.source_project
project.enable_ci
- pipeline = create :ci_pipeline, project: project, sha: merge_request.last_commit.id, ref: merge_request.source_branch
+ pipeline = create :ci_pipeline, project: project, sha: merge_request.diff_head_sha, ref: merge_request.source_branch
create :ci_build, pipeline: pipeline
end
diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb
index 146cbcfad5e..4df4e89f5b9 100644
--- a/features/steps/shared/diff_note.rb
+++ b/features/steps/shared/diff_note.rb
@@ -23,7 +23,7 @@ module SharedDiffNote
page.within(diff_file_selector) do
click_diff_line(sample_commit.line_code)
- page.within("form[id$='#{sample_commit.line_code}-true']") do
+ page.within("form[data-line-code='#{sample_commit.line_code}']") do
fill_in "note[note]", with: "Typo, please fix"
find(".js-comment-button").click
end
@@ -32,7 +32,7 @@ module SharedDiffNote
step 'I leave a diff comment in a parallel view on the left side like "Old comment"' do
click_parallel_diff_line(sample_commit.del_line_code, 'old')
- page.within("#{diff_file_selector} form[id$='#{sample_commit.del_line_code}-true']") do
+ page.within("#{diff_file_selector} form[data-line-code='#{sample_commit.del_line_code}']") do
fill_in "note[note]", with: "Old comment"
find(".js-comment-button").click
end
@@ -40,7 +40,7 @@ module SharedDiffNote
step 'I leave a diff comment in a parallel view on the right side like "New comment"' do
click_parallel_diff_line(sample_commit.line_code, 'new')
- page.within("#{diff_file_selector} form[id$='#{sample_commit.line_code}-true']") do
+ page.within("#{diff_file_selector} form[data-line-code='#{sample_commit.line_code}']") do
fill_in "note[note]", with: "New comment"
find(".js-comment-button").click
end
@@ -50,7 +50,7 @@ module SharedDiffNote
page.within(diff_file_selector) do
click_diff_line(sample_commit.line_code)
- page.within("form[id$='#{sample_commit.line_code}-true']") do
+ page.within("form[data-line-code='#{sample_commit.line_code}']") do
fill_in "note[note]", with: "Should fix it :smile:"
find('.js-md-preview-button').click
end
@@ -61,7 +61,7 @@ module SharedDiffNote
page.within(diff_file_selector) do
click_diff_line(sample_commit.del_line_code)
- page.within("form[id$='#{sample_commit.del_line_code}-true']") do
+ page.within("form[data-line-code='#{sample_commit.del_line_code}']") do
fill_in "note[note]", with: "DRY this up"
find('.js-md-preview-button').click
end
@@ -90,7 +90,7 @@ module SharedDiffNote
page.within(diff_file_selector) do
click_diff_line(sample_commit.line_code)
- page.within("form[id$='#{sample_commit.line_code}-true']") do
+ page.within("form[data-line-code='#{sample_commit.line_code}']") do
fill_in 'note[note]', with: ':smile:'
click_button('Comment')
end