summaryrefslogtreecommitdiff
path: root/features/steps
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-07 12:09:20 +0100
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-07 12:09:20 +0100
commit2f22890d4223c0b524ee1f27e222a24a8f0c9a87 (patch)
tree79609a077a37cc49d95463b649ff4098cea10b4d /features/steps
parent907b754173ed4185574c38ded0a173360d073085 (diff)
parentfb7b0d6e710d462f5bef1df3195fa8b051668bfc (diff)
downloadgitlab-ce-2f22890d4223c0b524ee1f27e222a24a8f0c9a87.tar.gz
Merge branch 'update-droplab-to-webpack-version' into new-resolvable-discussion
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/dashboard/dashboard.rb6
-rw-r--r--features/steps/dashboard/new_project.rb4
-rw-r--r--features/steps/group/milestones.rb4
-rw-r--r--features/steps/project/builds/summary.rb2
-rw-r--r--features/steps/project/commits/commits.rb8
-rw-r--r--features/steps/project/deploy_keys.rb2
-rw-r--r--features/steps/project/hooks.rb4
-rw-r--r--features/steps/project/issues/issues.rb2
-rw-r--r--features/steps/project/issues/labels.rb6
-rw-r--r--features/steps/project/issues/milestones.rb2
-rw-r--r--features/steps/project/merge_requests.rb8
-rw-r--r--features/steps/project/merge_requests/acceptance.rb6
-rw-r--r--features/steps/project/merge_requests/revert.rb2
-rw-r--r--features/steps/project/project_find_file.rb2
-rw-r--r--features/steps/project/project_shortcuts.rb4
-rw-r--r--features/steps/project/source/browse_files.rb6
-rw-r--r--features/steps/project/source/markdown_render.rb8
-rw-r--r--features/steps/project/wiki.rb28
-rw-r--r--features/steps/shared/note.rb2
19 files changed, 59 insertions, 47 deletions
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 a67b3222af3..3985fe8f2f7 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
@@ -381,7 +381,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
@@ -395,7 +395,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/project_shortcuts.rb b/features/steps/project/project_shortcuts.rb
index 8143b01ca40..cebf09750b0 100644
--- a/features/steps/project/project_shortcuts.rb
+++ b/features/steps/project/project_shortcuts.rb
@@ -20,9 +20,9 @@ class Spinach::Features::ProjectShortcuts < Spinach::FeatureSteps
find('body').native.send_key('n')
end
- step 'I press "g" and "g"' do
- find('body').native.send_key('g')
+ step 'I press "g" and "d"' do
find('body').native.send_key('g')
+ find('body').native.send_key('d')
end
step 'I press "g" and "s"' 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