diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2015-12-08 10:34:51 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2015-12-08 10:34:51 -0200 |
commit | bf0af030b6365936d2ff529e443132d7a508bfc6 (patch) | |
tree | 32de5e8e22313ecaba23293b1fb6c2d08186a75a /features | |
parent | 23c1c70bf0321941ab2b9572a5d0532ed9f58002 (diff) | |
parent | f5430e48b42227f1c1874ca27c6907f0f704be28 (diff) | |
download | gitlab-ce-bf0af030b6365936d2ff529e443132d7a508bfc6.tar.gz |
Merge branch 'master' into fix-admin-should-be-able-to-add-himself-to-group
Diffstat (limited to 'features')
-rw-r--r-- | features/project/commits/diff_comments.feature | 6 | ||||
-rw-r--r-- | features/project/issues/award_emoji.feature | 6 | ||||
-rw-r--r-- | features/project/merge_requests/accept.feature | 6 | ||||
-rw-r--r-- | features/steps/admin/labels.rb | 2 | ||||
-rw-r--r-- | features/steps/project/hooks.rb | 4 | ||||
-rw-r--r-- | features/steps/project/issues/award_emoji.rb | 31 | ||||
-rw-r--r-- | features/steps/project/issues/labels.rb | 2 | ||||
-rw-r--r-- | features/steps/project/merge_requests/acceptance.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/diff_note.rb | 17 |
9 files changed, 58 insertions, 20 deletions
diff --git a/features/project/commits/diff_comments.feature b/features/project/commits/diff_comments.feature index 4a2b870e082..d6e0c84537e 100644 --- a/features/project/commits/diff_comments.feature +++ b/features/project/commits/diff_comments.feature @@ -14,6 +14,12 @@ Feature: Project Commits Diff Comments Then I should see a diff comment saying "Typo, please fix" @javascript + Scenario: I can add a diff comment with a single emoji + Given I open a diff comment form + And I write a diff comment like ":smile:" + Then I should see a diff comment with an emoji image + + @javascript Scenario: I get a temporary form for the first comment on a diff line Given I open a diff comment form Then I should see a temporary diff comment form diff --git a/features/project/issues/award_emoji.feature b/features/project/issues/award_emoji.feature index a9bc8ffb9bb..2609f129d07 100644 --- a/features/project/issues/award_emoji.feature +++ b/features/project/issues/award_emoji.feature @@ -11,4 +11,8 @@ Feature: Award Emoji And I click to emoji in the picker Then I have award added And I can remove it by clicking to icon -
\ No newline at end of file + + @javascript + Scenario: I add award emoji using regular comment + Given I leave comment with a single emoji + Then I have award added diff --git a/features/project/merge_requests/accept.feature b/features/project/merge_requests/accept.feature index 3e6e59a3808..9bc2b7c8eca 100644 --- a/features/project/merge_requests/accept.feature +++ b/features/project/merge_requests/accept.feature @@ -8,10 +8,12 @@ Feature: Project Merge Requests Acceptance Given I am on the Merge Request detail page When I click on "Remove source branch" option And I click on Accept Merge Request - Then I should not see the Remove Source Branch button + Then I should see merge request merged + And I should not see the Remove Source Branch button @javascript Scenario: Accepting the Merge Request without removing the source branch Given I am on the Merge Request detail page When I click on Accept Merge Request - Then I should see the Remove Source Branch button + Then I should see merge request merged + And I should see the Remove Source Branch button diff --git a/features/steps/admin/labels.rb b/features/steps/admin/labels.rb index 2ea5dffdc66..55ddcc25085 100644 --- a/features/steps/admin/labels.rb +++ b/features/steps/admin/labels.rb @@ -71,7 +71,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps step 'I should see label color error message' do page.within '.label-form' do - expect(page).to have_content 'Color is invalid' + expect(page).to have_content 'Color must be a valid color code' end end diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb index df4a23a3716..be4db770948 100644 --- a/features/steps/project/hooks.rb +++ b/features/steps/project/hooks.rb @@ -70,8 +70,6 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps step 'I should see hook service down error message' do expect(page).to have_selector '.flash-alert', - text: 'Hook execution failed. '\ - 'Ensure hook URL is correct and '\ - 'service is up.' + text: 'Hook execution failed: Exception from' end end diff --git a/features/steps/project/issues/award_emoji.rb b/features/steps/project/issues/award_emoji.rb index 8f7a45dec0e..325eaf2ea6a 100644 --- a/features/steps/project/issues/award_emoji.rb +++ b/features/steps/project/issues/award_emoji.rb @@ -9,33 +9,40 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps end step 'I click to emoji-picker' do - page.within ".awards-controls" do - page.find(".add-award").click + page.within '.awards-controls' do + page.find('.add-award').click end end step 'I click to emoji in the picker' do - page.within ".awards-menu" do - page.first("img").click + page.within '.awards-menu' do + page.first('img').click end end step 'I can remove it by clicking to icon' do - page.within ".awards" do - page.first(".award").click - expect(page).to_not have_selector ".award" + page.within '.awards' do + page.first('.award').click + expect(page).to_not have_selector '.award' end end step 'I have award added' do - page.within ".awards" do - expect(page).to have_selector ".award" - expect(page.find(".award .counter")).to have_content "1" + page.within '.awards' do + expect(page).to have_selector '.award' + expect(page.find('.award .counter')).to have_content '1' end end step 'project "Shop" has issue "Bugfix"' do - @project = Project.find_by(name: "Shop") - @issue = create(:issue, title: "Bugfix", project: project) + @project = Project.find_by(name: 'Shop') + @issue = create(:issue, title: 'Bugfix', project: project) + end + + step 'I leave comment with a single emoji' do + page.within('.js-main-target-form') do + fill_in 'note[note]', with: ':smile:' + click_button 'Add Comment' + end end end diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb index e273bb391b3..2ab8956867b 100644 --- a/features/steps/project/issues/labels.rb +++ b/features/steps/project/issues/labels.rb @@ -55,7 +55,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps step 'I should see label color error message' do page.within '.label-form' do - expect(page).to have_content 'Color is invalid' + expect(page).to have_content 'Color must be a valid color code' end end diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb index 6adecaa8385..383c055c4ef 100644 --- a/features/steps/project/merge_requests/acceptance.rb +++ b/features/steps/project/merge_requests/acceptance.rb @@ -32,4 +32,8 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps step 'I am signed in as a developer of the project' do login_as(@user) end + + step 'I should see merge request merged' do + expect(page).to have_content('The changes were merged into') + end end diff --git a/features/steps/shared/diff_note.rb b/features/steps/shared/diff_note.rb index 72621911a37..dd466cde28d 100644 --- a/features/steps/shared/diff_note.rb +++ b/features/steps/shared/diff_note.rb @@ -87,6 +87,17 @@ module SharedDiffNote end end + step 'I write a diff comment like ":smile:"' do + page.within(diff_file_selector) do + click_diff_line(sample_commit.line_code) + + page.within("form[rel$='#{sample_commit.line_code}']") do + fill_in 'note[note]', with: ':smile:' + click_button('Add Comment') + end + end + end + step 'I submit the diff comment' do page.within(diff_file_selector) do click_button("Add Comment") @@ -197,6 +208,12 @@ module SharedDiffNote end end + step 'I should see a diff comment with an emoji image' do + page.within("#{diff_file_selector} .note") do + expect(page).to have_xpath("//img[@alt=':smile:']") + end + end + step 'I click side-by-side diff button' do find('#parallel-diff-btn').trigger('click') end |