diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/project/source/browse_files.feature | 14 | ||||
-rw-r--r-- | features/steps/dashboard/dashboard.rb | 6 | ||||
-rw-r--r-- | features/steps/dashboard/new_project.rb | 4 | ||||
-rw-r--r-- | features/steps/group/milestones.rb | 4 | ||||
-rw-r--r-- | features/steps/project/builds/summary.rb | 2 | ||||
-rw-r--r-- | features/steps/project/commits/commits.rb | 8 | ||||
-rw-r--r-- | features/steps/project/deploy_keys.rb | 2 | ||||
-rw-r--r-- | features/steps/project/hooks.rb | 4 | ||||
-rw-r--r-- | features/steps/project/issues/issues.rb | 2 | ||||
-rw-r--r-- | features/steps/project/issues/labels.rb | 6 | ||||
-rw-r--r-- | features/steps/project/issues/milestones.rb | 2 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 8 | ||||
-rw-r--r-- | features/steps/project/merge_requests/acceptance.rb | 6 | ||||
-rw-r--r-- | features/steps/project/merge_requests/revert.rb | 2 | ||||
-rw-r--r-- | features/steps/project/project_find_file.rb | 2 | ||||
-rw-r--r-- | features/steps/project/source/browse_files.rb | 6 | ||||
-rw-r--r-- | features/steps/project/source/markdown_render.rb | 8 | ||||
-rw-r--r-- | features/steps/project/wiki.rb | 28 | ||||
-rw-r--r-- | features/steps/shared/note.rb | 2 |
19 files changed, 64 insertions, 52 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature index 5ede935c562..894c4a96bb8 100644 --- a/features/project/source/browse_files.feature +++ b/features/project/source/browse_files.feature @@ -36,7 +36,7 @@ Feature: Project Source Browse Files And I edit code And I fill the new file name And I fill the commit message - And I click on "Commit Changes" + And I click on "Commit changes" Then I am redirected to the new file And I should see its new content @@ -47,7 +47,7 @@ Feature: Project Source Browse Files And I edit code And I fill the new file name And I fill the commit message - And I click on "Commit Changes" + And I click on "Commit changes" Then I am redirected to the fork's new merge request page And I can see the new commit message @@ -57,7 +57,7 @@ Feature: Project Source Browse Files And I edit code with new lines at end of file And I fill the new file name And I fill the commit message - And I click on "Commit Changes" + And I click on "Commit changes" Then I am redirected to the new file And I click button "Edit" And I should see its content with new lines preserved at end of file @@ -69,7 +69,7 @@ Feature: Project Source Browse Files And I fill the new file name And I fill the commit message And I fill the new branch name - And I click on "Commit Changes" + And I click on "Commit changes" Then I am redirected to the new merge request page When I click on "Changes" tab And I should see its new content @@ -173,7 +173,7 @@ Feature: Project Source Browse Files And I click button "Edit" And I edit code And I fill the commit message - And I click on "Commit Changes" + And I click on "Commit changes" Then I am redirected to the ".gitignore" And I should see its new content @@ -186,7 +186,7 @@ Feature: Project Source Browse Files And I click button "Fork" And I edit code And I fill the commit message - And I click on "Commit Changes" + And I click on "Commit changes" Then I am redirected to the fork's new merge request page And I can see the new commit message @@ -197,7 +197,7 @@ Feature: Project Source Browse Files And I edit code And I fill the commit message And I fill the new branch name - And I click on "Commit Changes" + And I click on "Commit changes" Then I am redirected to the new merge request page Then I click on "Changes" tab And I should see its new content diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb index 33a1c88e33c..c715c85c43c 100644 --- a/features/steps/dashboard/dashboard.rb +++ b/features/steps/dashboard/dashboard.rb @@ -18,11 +18,11 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps step 'I should see last push widget' do expect(page).to have_content "You pushed to fix" - expect(page).to have_link "Create Merge Request" + expect(page).to have_link "Create merge request" end - step 'I click "Create Merge Request" link' do - click_link "Create Merge Request" + step 'I click "Create merge request" link' do + click_link "Create merge request" end step 'I see prefilled new Merge Request page' do diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb index d4a04f693b8..4fb16d3bb57 100644 --- a/features/steps/dashboard/new_project.rb +++ b/features/steps/dashboard/new_project.rb @@ -3,9 +3,9 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps include SharedPaths include SharedProject - step 'I click "New Project" link' do + step 'I click "New project" link' do page.within('.content') do - click_link "New Project" + click_link "New project" end end diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb index 9996f3baf0d..f8f5e3f2382 100644 --- a/features/steps/group/milestones.rb +++ b/features/steps/group/milestones.rb @@ -46,11 +46,11 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps end step 'I click new milestone button' do - click_link "New Milestone" + click_link "New milestone" end step 'I press create mileston button' do - click_button "Create Milestone" + click_button "Create milestone" end step 'milestone in each project should be created' do diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb index 124582de6b9..229e5d7cdf4 100644 --- a/features/steps/project/builds/summary.rb +++ b/features/steps/project/builds/summary.rb @@ -12,7 +12,7 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps step 'I see button to CI Lint' do page.within('.nav-controls') do - ci_lint_tool_link = page.find_link('CI Lint') + ci_lint_tool_link = page.find_link('CI lint') expect(ci_lint_tool_link[:href]).to eq ci_lint_path end end diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index cf75fac8ac6..97ffd4b4ea2 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -13,7 +13,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'I click atom feed link' do - click_link "Commits Feed" + click_link "Commits feed" end step 'I see commits atom feed' do @@ -110,16 +110,16 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'I see button to create a new merge request' do - expect(page).to have_link 'Create Merge Request' + expect(page).to have_link 'Create merge request' end step 'I should not see button to create a new merge request' do - expect(page).not_to have_link 'Create Merge Request' + expect(page).not_to have_link 'Create merge request' end step 'I should see button to the merge request' do merge_request = MergeRequest.find_by(title: 'Feature') - expect(page).to have_link "View Open Merge Request", href: namespace_project_merge_request_path(@project.namespace, @project, merge_request) + expect(page).to have_link "View open merge request", href: namespace_project_merge_request_path(@project.namespace, @project, merge_request) end step 'I see breadcrumb links' do diff --git a/features/steps/project/deploy_keys.rb b/features/steps/project/deploy_keys.rb index 580a19494c2..ec59a2c094e 100644 --- a/features/steps/project/deploy_keys.rb +++ b/features/steps/project/deploy_keys.rb @@ -26,7 +26,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps end step 'I click \'New Deploy Key\'' do - click_link 'New Deploy Key' + click_link 'New deploy key' end step 'I submit new deploy key' do diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb index 0a71833a8a1..945d58a6458 100644 --- a/features/steps/project/hooks.rb +++ b/features/steps/project/hooks.rb @@ -25,14 +25,14 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps step 'I submit new hook' do @url = 'http://example.org/1' fill_in "hook_url", with: @url - expect { click_button "Add Webhook" }.to change(ProjectHook, :count).by(1) + expect { click_button "Add webhook" }.to change(ProjectHook, :count).by(1) end step 'I submit new hook with SSL verification enabled' do @url = 'http://example.org/2' fill_in "hook_url", with: @url check "hook_enable_ssl_verification" - expect { click_button "Add Webhook" }.to change(ProjectHook, :count).by(1) + expect { click_button "Add webhook" }.to change(ProjectHook, :count).by(1) end step 'I should see newly created hook' do diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index aaf0ede67e6..c0dc48f1bb2 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -61,7 +61,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps expect(page).to have_content "Tweet control" end - step 'I click link "New Issue"' do + step 'I click link "New issue"' do page.has_link?('New Issue') ? click_link('New Issue') : click_link('New issue') end diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb index 4a35b71af2f..2828e41f731 100644 --- a/features/steps/project/issues/labels.rb +++ b/features/steps/project/issues/labels.rb @@ -31,19 +31,19 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps step 'I submit new label \'support\'' do fill_in 'Title', with: 'support' fill_in 'Background color', with: '#F95610' - click_button 'Create Label' + click_button 'Create label' end step 'I submit new label \'bug\'' do fill_in 'Title', with: 'bug' fill_in 'Background color', with: '#F95610' - click_button 'Create Label' + click_button 'Create label' end step 'I submit new label with invalid color' do fill_in 'Title', with: 'support' fill_in 'Background color', with: '#12' - click_button 'Create Label' + click_button 'Create label' end step 'I should see label label exist error message' do diff --git a/features/steps/project/issues/milestones.rb b/features/steps/project/issues/milestones.rb index 4faa0f4707c..fe94eb03acd 100644 --- a/features/steps/project/issues/milestones.rb +++ b/features/steps/project/issues/milestones.rb @@ -16,7 +16,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps end step 'I click link "New Milestone"' do - click_link "New Milestone" + click_link "New milestone" end step 'I submit new milestone "v2.3"' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 5510c65265a..263ec321a34 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -300,10 +300,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps page.within('.current-note-edit-form', visible: true) do fill_in 'note_note', with: 'Typo, please fix' - click_button 'Save Comment' + click_button 'Save comment' end - expect(page).not_to have_button 'Save Comment', disabled: true, visible: true + expect(page).not_to have_button 'Save comment', disabled: true, visible: true end end @@ -378,7 +378,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end step 'merge request is mergeable' do - expect(page).to have_button 'Accept Merge Request' + expect(page).to have_button 'Accept merge request' end step 'I modify merge commit message' do @@ -392,7 +392,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I accept this merge request' do page.within '.mr-state-widget' do - click_button "Accept Merge Request" + click_button "Accept merge request" end end diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb index 0a3f4649870..bdc7a616ba9 100644 --- a/features/steps/project/merge_requests/acceptance.rb +++ b/features/steps/project/merge_requests/acceptance.rb @@ -15,15 +15,15 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps end step 'I click on Accept Merge Request' do - click_button('Accept Merge Request') + click_button('Accept merge request') end step 'I should see the Remove Source Branch button' do - expect(page).to have_link('Remove Source Branch') + expect(page).to have_link('Remove source branch') end step 'I should not see the Remove Source Branch button' do - expect(page).not_to have_link('Remove Source Branch') + expect(page).not_to have_link('Remove source branch') end step 'There is an open Merge Request' do diff --git a/features/steps/project/merge_requests/revert.rb b/features/steps/project/merge_requests/revert.rb index 31f95b524b3..a8f4e4ef027 100644 --- a/features/steps/project/merge_requests/revert.rb +++ b/features/steps/project/merge_requests/revert.rb @@ -26,7 +26,7 @@ class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps end step 'I click on Accept Merge Request' do - click_button('Accept Merge Request') + click_button('Accept merge request') end step 'I am signed in as a developer of the project' do diff --git a/features/steps/project/project_find_file.rb b/features/steps/project/project_find_file.rb index b8da5e6435d..461160b8430 100644 --- a/features/steps/project/project_find_file.rb +++ b/features/steps/project/project_find_file.rb @@ -9,7 +9,7 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps end step 'I click Find File button' do - click_link 'Find File' + click_link 'Find file' end step 'I should see "find file" page' do diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 29f628763db..5bd3c1a1246 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -105,11 +105,11 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps end step 'I click link "Diff"' do - click_link 'Preview Changes' + click_link 'Preview changes' end - step 'I click on "Commit Changes"' do - click_button 'Commit Changes' + step 'I click on "Commit changes"' do + click_button 'Commit changes' end step 'I click on "Changes" tab' do diff --git a/features/steps/project/source/markdown_render.rb b/features/steps/project/source/markdown_render.rb index 9183de76881..115b67d98fb 100644 --- a/features/steps/project/source/markdown_render.rb +++ b/features/steps/project/source/markdown_render.rb @@ -214,7 +214,9 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps step 'I add various links to the wiki page' do fill_in "wiki[content]", with: "[test](test)\n[GitLab API doc](api)\n[Rake tasks](raketasks)\n" fill_in "wiki[message]", with: "Adding links to wiki" - click_button "Create page" + page.within '.wiki-form' do + click_button "Create page" + end end step 'Wiki page should have added links' do @@ -225,7 +227,9 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps step 'I add a header to the wiki page' do fill_in "wiki[content]", with: "# Wiki header\n" fill_in "wiki[message]", with: "Add header to wiki" - click_button "Create page" + page.within '.wiki-form' do + click_button "Create page" + end end step 'Wiki header should have correct id and link' do diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 4cb0a21fbb4..517c257d892 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -16,12 +16,16 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps step 'I create the Wiki Home page' do fill_in "wiki_content", with: '[link test](test)' - click_on "Create page" + page.within '.wiki-form' do + click_on "Create page" + end end step 'I create the Wiki Home page with no content' do fill_in "wiki_content", with: '' - click_on "Create page" + page.within '.wiki-form' do + click_on "Create page" + end end step 'I should see the newly created wiki page' do @@ -29,7 +33,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps expect(page).to have_content "link test" click_link "link test" - expect(page).to have_content "Create Page" + expect(page).to have_content "Create page" end step 'I have an existing Wiki page' do @@ -63,7 +67,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I click the History button' do - click_on "History" + click_on 'Page history' end step 'I should see both revisions' do @@ -121,15 +125,19 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps step 'I should see the new wiki page form' do expect(current_path).to match('wikis/image.jpg') expect(page).to have_content('New Wiki Page') - expect(page).to have_content('Create Page') + expect(page).to have_content('Create page') end step 'I create a New page with paths' do - click_on 'New Page' + click_on 'New page' fill_in 'Page slug', with: 'one/two/three-test' - click_on 'Create Page' + page.within '#modal-new-wiki' do + click_on 'Create page' + end fill_in "wiki_content", with: 'wiki content' - click_on "Create page" + page.within '.wiki-form' do + click_on "Create page" + end expect(current_path).to include 'one/two/three-test' end @@ -154,11 +162,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps step 'I view the page history of a Wiki page that has a path' do click_on 'Three' - click_on 'Page History' + click_on 'Page history' end step 'I click on Page History' do - click_on 'Page History' + click_on 'Page history' end step 'I should see the page history' do diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb index fd925e0d447..7885cc7ab77 100644 --- a/features/steps/shared/note.rb +++ b/features/steps/shared/note.rb @@ -141,7 +141,7 @@ module SharedNote page.within(".current-note-edit-form") do fill_in 'note[note]', with: '+1 Awesome!' - click_button 'Save Comment' + click_button 'Save comment' end end |