From 5677cb0114de78559bb626aa3b0bb456271429df Mon Sep 17 00:00:00 2001 From: Tim Zallmann Date: Fri, 26 May 2017 17:59:45 +0200 Subject: Seperated Dropdown in new partial Fixed different issues from discussion Fixed a Spinach Test which had now 2 New buttons --- features/steps/project/fork.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb index 14932491daa..35df403a85f 100644 --- a/features/steps/project/fork.rb +++ b/features/steps/project/fork.rb @@ -42,7 +42,9 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps end step 'I click link "New merge request"' do - page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') + page.within '#content-body' do + page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') + end end step 'I should see the new merge request page for my namespace' do -- cgit v1.2.1 From 6709e65cfc9fcfbe90427645cd1cf679a28ebddd Mon Sep 17 00:00:00 2001 From: Tim Zallmann Date: Mon, 29 May 2017 10:24:53 +0200 Subject: Externalised Dropdown Checks for creating new issue Styling of .dropdown-bold-header Fixed Spinach Tests to limit them to the main content area for clicking 'New Project' etc. so that they don't click the dropdown menu --- features/steps/project/create.rb | 4 +++- features/steps/project/forked_merge_requests.rb | 4 +++- features/steps/project/issues/issues.rb | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/create.rb b/features/steps/project/create.rb index 5f5f806df36..28be9c6df5b 100644 --- a/features/steps/project/create.rb +++ b/features/steps/project/create.rb @@ -5,7 +5,9 @@ class Spinach::Features::ProjectCreate < Spinach::FeatureSteps step 'fill project form with valid data' do fill_in 'project_path', with: 'Empty' - click_button "Create project" + page.within '#content-body' do + click_button "Create project" + end end step 'I should see project page' do diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb index 25514eb9ef2..2d9d3efd9d4 100644 --- a/features/steps/project/forked_merge_requests.rb +++ b/features/steps/project/forked_merge_requests.rb @@ -17,7 +17,9 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps end step 'I click link "New Merge Request"' do - page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') + page.within '#content-body' do + page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') + end end step 'I should see merge request "Merge Request On Forked Project"' do diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 637e6568267..b376c5049c1 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -62,7 +62,9 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end step 'I click link "New issue"' do - page.has_link?('New Issue') ? click_link('New Issue') : click_link('New issue') + page.within '#content-body' do + page.has_link?('New Issue') ? click_link('New Issue') : click_link('New issue') + end end step 'I click "author" dropdown' do -- cgit v1.2.1 From 33748960716916f0e6c6bbc168d4ad7f76120102 Mon Sep 17 00:00:00 2001 From: Tim Zallmann Date: Mon, 29 May 2017 11:28:20 +0200 Subject: Check for Merge Request fixed Fixed couple of spinach test --- features/steps/project/merge_requests.rb | 4 +++- features/steps/project/snippets.rb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 54b6352c952..17d190711f5 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -14,7 +14,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end step 'I click link "New Merge Request"' do - page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') + page.within '#content-body' do + page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') + end end step 'I click link "Bug NS-04"' do diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb index e3f5e9e3ef3..dd49701a3d9 100644 --- a/features/steps/project/snippets.rb +++ b/features/steps/project/snippets.rb @@ -23,7 +23,9 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps end step 'I click link "New snippet"' do - first(:link, "New snippet").click + page.within '#content-body' do + first(:link, "New snippet").click + end end step 'I click link "Snippet one"' do -- cgit v1.2.1 From 32cac597275706930b221b19fb20b29ccebc7130 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Wed, 7 Jun 2017 18:33:50 +0000 Subject: Added more actions and report as abuse to all notes --- features/steps/project/merge_requests.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'features/steps/project') diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 7f1e9e693af..ce6d1a6b8d0 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -297,6 +297,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I change the comment "Line is wrong" to "Typo, please fix" on diff' do page.within('.diff-file:nth-of-type(5) .note') do + find('.more-actions').click + find('.more-actions .dropdown-menu li', match: :first) + find('.js-note-edit').click page.within('.current-note-edit-form', visible: true) do @@ -322,6 +325,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I delete the comment "Line is wrong" on diff' do page.within('.diff-file:nth-of-type(5) .note') do + find('.more-actions').click + find('.more-actions .dropdown-menu li', match: :first) + find('.js-note-delete').click end end -- cgit v1.2.1