Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-04-07 02:30:19 +0300
committerClement Ho <clemmakesapps@gmail.com>2017-04-07 02:30:19 +0300
commit8a574030eadd1794294543639a5dd471741d8c6e (patch)
tree363b40823cc5e18334b2e21af9d810ed1fabed9b /spec
parentd2aea4cde0574b1dfbfc3d8d85ab80195fc29e3f (diff)
parent745058c0529b4eb719c730d3067594b681cb0694 (diff)
Merge branch 'button-capitalization' into 'master'
Button capitalisation Closes #18931 See merge request !10418
Diffstat (limited to 'spec')
-rw-r--r--spec/features/admin/admin_deploy_keys_spec.rb2
-rw-r--r--spec/features/admin/admin_groups_spec.rb2
-rw-r--r--spec/features/admin/admin_hooks_spec.rb4
-rw-r--r--spec/features/admin/admin_manage_applications_spec.rb2
-rw-r--r--spec/features/admin/admin_users_impersonation_tokens_spec.rb2
-rw-r--r--spec/features/auto_deploy_spec.rb2
-rw-r--r--spec/features/dashboard/group_spec.rb2
-rw-r--r--spec/features/groups_spec.rb2
-rw-r--r--spec/features/merge_requests/check_if_mergeable_with_unresolved_discussions_spec.rb8
-rw-r--r--spec/features/merge_requests/create_new_mr_spec.rb2
-rw-r--r--spec/features/merge_requests/merge_immediately_with_pipeline_spec.rb2
-rw-r--r--spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb38
-rw-r--r--spec/features/merge_requests/only_allow_merge_if_build_succeeds_spec.rb24
-rw-r--r--spec/features/merge_requests/widget_spec.rb2
-rw-r--r--spec/features/profiles/personal_access_tokens_spec.rb4
-rw-r--r--spec/features/projects/blobs/edit_spec.rb2
-rw-r--r--spec/features/projects/blobs/user_create_spec.rb2
-rw-r--r--spec/features/projects/files/creating_a_file_spec.rb2
-rw-r--r--spec/features/projects/files/editing_a_file_spec.rb2
-rw-r--r--spec/features/projects/files/project_owner_creates_license_file_spec.rb6
-rw-r--r--spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb4
-rw-r--r--spec/features/projects/files/template_type_dropdown_spec.rb6
-rw-r--r--spec/features/projects/files/undo_template_spec.rb4
-rw-r--r--spec/features/projects/merge_request_button_spec.rb24
-rw-r--r--spec/features/projects/wiki/markdown_preview_spec.rb60
-rw-r--r--spec/features/projects/wiki/user_creates_wiki_page_spec.rb65
-rw-r--r--spec/features/tags/master_views_tags_spec.rb2
-rw-r--r--spec/features/u2f_spec.rb20
-rw-r--r--spec/javascripts/u2f/register_spec.js2
29 files changed, 168 insertions, 131 deletions
diff --git a/spec/features/admin/admin_deploy_keys_spec.rb b/spec/features/admin/admin_deploy_keys_spec.rb
index 7ce6cce0a5c..c0b6995a84a 100644
--- a/spec/features/admin/admin_deploy_keys_spec.rb
+++ b/spec/features/admin/admin_deploy_keys_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe 'admin deploy keys', type: :feature do
describe 'create new deploy key' do
before do
visit admin_deploy_keys_path
- click_link 'New Deploy Key'
+ click_link 'New deploy key'
end
it 'creates new deploy key' do
diff --git a/spec/features/admin/admin_groups_spec.rb b/spec/features/admin/admin_groups_spec.rb
index a871e370ba2..56d5c7c327e 100644
--- a/spec/features/admin/admin_groups_spec.rb
+++ b/spec/features/admin/admin_groups_spec.rb
@@ -24,7 +24,7 @@ feature 'Admin Groups', feature: true do
it 'creates new group' do
visit admin_groups_path
- click_link "New Group"
+ click_link "New group"
fill_in 'group_path', with: 'gitlab'
fill_in 'group_description', with: 'Group description'
click_button "Create group"
diff --git a/spec/features/admin/admin_hooks_spec.rb b/spec/features/admin/admin_hooks_spec.rb
index 570c374a89b..fb519a9bf12 100644
--- a/spec/features/admin/admin_hooks_spec.rb
+++ b/spec/features/admin/admin_hooks_spec.rb
@@ -33,7 +33,7 @@ describe "Admin::Hooks", feature: true do
fill_in 'hook_url', with: url
check 'Enable SSL verification'
- expect { click_button 'Add System Hook' }.to change(SystemHook, :count).by(1)
+ expect { click_button 'Add system hook' }.to change(SystemHook, :count).by(1)
expect(page).to have_content 'SSL Verification: enabled'
expect(current_path).to eq(admin_hooks_path)
expect(page).to have_content(url)
@@ -44,7 +44,7 @@ describe "Admin::Hooks", feature: true do
before do
WebMock.stub_request(:post, @system_hook.url)
visit admin_hooks_path
- click_link "Test Hook"
+ click_link "Test hook"
end
it { expect(current_path).to eq(admin_hooks_path) }
diff --git a/spec/features/admin/admin_manage_applications_spec.rb b/spec/features/admin/admin_manage_applications_spec.rb
index c2c618b5659..0079125889b 100644
--- a/spec/features/admin/admin_manage_applications_spec.rb
+++ b/spec/features/admin/admin_manage_applications_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe 'admin manage applications', feature: true do
it do
visit admin_applications_path
- click_on 'New Application'
+ click_on 'New application'
expect(page).to have_content('New application')
fill_in :doorkeeper_application_name, with: 'test'
diff --git a/spec/features/admin/admin_users_impersonation_tokens_spec.rb b/spec/features/admin/admin_users_impersonation_tokens_spec.rb
index ff23d486355..0fb4baeb71c 100644
--- a/spec/features/admin/admin_users_impersonation_tokens_spec.rb
+++ b/spec/features/admin/admin_users_impersonation_tokens_spec.rb
@@ -30,7 +30,7 @@ describe 'Admin > Users > Impersonation Tokens', feature: true, js: true do
check "api"
check "read_user"
- expect { click_on "Create Impersonation Token" }.to change { PersonalAccessTokensFinder.new(impersonation: true).execute.count }
+ expect { click_on "Create impersonation token" }.to change { PersonalAccessTokensFinder.new(impersonation: true).execute.count }
expect(active_impersonation_tokens).to have_text(name)
expect(active_impersonation_tokens).to have_text('In')
expect(active_impersonation_tokens).to have_text('api')
diff --git a/spec/features/auto_deploy_spec.rb b/spec/features/auto_deploy_spec.rb
index 009e9c6b04c..6f36c74c911 100644
--- a/spec/features/auto_deploy_spec.rb
+++ b/spec/features/auto_deploy_spec.rb
@@ -56,7 +56,7 @@ describe 'Auto deploy' do
click_on 'OpenShift'
end
wait_for_ajax
- click_button 'Commit Changes'
+ click_button 'Commit changes'
expect(page).to have_content('New Merge Request From auto-deploy into master')
end
diff --git a/spec/features/dashboard/group_spec.rb b/spec/features/dashboard/group_spec.rb
index d5f8470fab0..19f5d1b0f30 100644
--- a/spec/features/dashboard/group_spec.rb
+++ b/spec/features/dashboard/group_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe 'Dashboard Group', feature: true do
it 'creates new grpup' do
visit dashboard_groups_path
- click_link 'New Group'
+ click_link 'New group'
fill_in 'group_path', with: 'Samurai'
fill_in 'group_description', with: 'Tokugawa Shogunate'
diff --git a/spec/features/groups_spec.rb b/spec/features/groups_spec.rb
index 8bfe6f4d54b..7670c4caea4 100644
--- a/spec/features/groups_spec.rb
+++ b/spec/features/groups_spec.rb
@@ -153,7 +153,7 @@ feature 'Group', feature: true do
end
it 'removes group' do
- click_link 'Remove Group'
+ click_link 'Remove group'
expect(page).to have_content "scheduled for deletion"
end
diff --git a/spec/features/merge_requests/check_if_mergeable_with_unresolved_discussions_spec.rb b/spec/features/merge_requests/check_if_mergeable_with_unresolved_discussions_spec.rb
index 7f11db3c417..77b7ba4ac7a 100644
--- a/spec/features/merge_requests/check_if_mergeable_with_unresolved_discussions_spec.rb
+++ b/spec/features/merge_requests/check_if_mergeable_with_unresolved_discussions_spec.rb
@@ -19,7 +19,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it 'does not allow to merge' do
visit_merge_request(merge_request)
- expect(page).not_to have_button 'Accept Merge Request'
+ expect(page).not_to have_button 'Accept merge request'
expect(page).to have_content('This merge request has unresolved discussions')
end
end
@@ -32,7 +32,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it 'allows MR to be merged' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept merge request'
end
end
end
@@ -46,7 +46,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it 'does not allow to merge' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept merge request'
end
end
@@ -58,7 +58,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it 'allows MR to be merged' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept merge request'
end
end
end
diff --git a/spec/features/merge_requests/create_new_mr_spec.rb b/spec/features/merge_requests/create_new_mr_spec.rb
index d4fe67c224f..3a4ec07b2b0 100644
--- a/spec/features/merge_requests/create_new_mr_spec.rb
+++ b/spec/features/merge_requests/create_new_mr_spec.rb
@@ -26,7 +26,7 @@ feature 'Create New Merge Request', feature: true, js: true do
end
it 'selects the target branch sha when a tag with the same name exists' do
- visit namespace_project_merge_requests_path(project.namespace, project)
+ visit namespace_project_merge_requests_path(project.namespace, project)
click_link 'New merge request'
diff --git a/spec/features/merge_requests/merge_immediately_with_pipeline_spec.rb b/spec/features/merge_requests/merge_immediately_with_pipeline_spec.rb
index 79105b1ee46..497240803d4 100644
--- a/spec/features/merge_requests/merge_immediately_with_pipeline_spec.rb
+++ b/spec/features/merge_requests/merge_immediately_with_pipeline_spec.rb
@@ -32,7 +32,7 @@ feature 'Merge immediately', :feature, :js do
page.within '.mr-widget-body' do
find('.dropdown-toggle').click
- click_link 'Merge Immediately'
+ click_link 'Merge immediately'
expect(find('.js-merge-when-pipeline-succeeds-button')).to have_content('Merge in progress')
diff --git a/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb b/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
index ed7193b9777..646e7bab265 100644
--- a/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
+++ b/spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb
@@ -28,25 +28,25 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
visit_merge_request(merge_request)
end
- it 'displays the Merge When Pipeline Succeeds button' do
- expect(page).to have_button "Merge When Pipeline Succeeds"
+ it 'displays the Merge when pipeline succeeds button' do
+ expect(page).to have_button "Merge when pipeline succeeds"
end
- describe 'enabling Merge When Pipeline Succeeds' do
- shared_examples 'Merge When Pipeline Succeeds activator' do
- it 'activates the Merge When Pipeline Succeeds feature' do
- click_button "Merge When Pipeline Succeeds"
+ describe 'enabling Merge when pipeline succeeds' do
+ shared_examples 'Merge when pipeline succeeds activator' do
+ it 'activates the Merge when pipeline succeeds feature' do
+ click_button "Merge when pipeline succeeds"
expect(page).to have_content "Set by #{user.name} to be merged automatically when the pipeline succeeds."
expect(page).to have_content "The source branch will not be removed."
- expect(page).to have_link "Cancel Automatic Merge"
+ expect(page).to have_link "Cancel automatic merge"
visit_merge_request(merge_request) # Needed to refresh the page
expect(page).to have_content /enabled an automatic merge when the pipeline for \h{8} succeeds/i
end
end
context "when enabled immediately" do
- it_behaves_like 'Merge When Pipeline Succeeds activator'
+ it_behaves_like 'Merge when pipeline succeeds activator'
end
context 'when enabled after pipeline status changed' do
@@ -60,16 +60,16 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
expect(page).to have_content "Pipeline ##{pipeline.id} running"
end
- it_behaves_like 'Merge When Pipeline Succeeds activator'
+ it_behaves_like 'Merge when pipeline succeeds activator'
end
context 'when enabled after it was previously canceled' do
before do
- click_button "Merge When Pipeline Succeeds"
- click_link "Cancel Automatic Merge"
+ click_button "Merge when pipeline succeeds"
+ click_link "Cancel automatic merge"
end
- it_behaves_like 'Merge When Pipeline Succeeds activator'
+ it_behaves_like 'Merge when pipeline succeeds activator'
end
context 'when it was enabled and then canceled' do
@@ -83,10 +83,10 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
end
before do
- click_link "Cancel Automatic Merge"
+ click_link "Cancel automatic merge"
end
- it_behaves_like 'Merge When Pipeline Succeeds activator'
+ it_behaves_like 'Merge when pipeline succeeds activator'
end
end
end
@@ -110,18 +110,18 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
end
it 'allows to cancel the automatic merge' do
- click_link "Cancel Automatic Merge"
+ click_link "Cancel automatic merge"
- expect(page).to have_button "Merge When Pipeline Succeeds"
+ expect(page).to have_button "Merge when pipeline succeeds"
visit_merge_request(merge_request) # refresh the page
expect(page).to have_content "canceled the automatic merge"
end
it "allows the user to remove the source branch" do
- expect(page).to have_link "Remove Source Branch When Merged"
+ expect(page).to have_link "Remove source branch when merged"
- click_link "Remove Source Branch When Merged"
+ click_link "Remove source branch when merged"
expect(page).to have_content "The source branch will be removed"
end
@@ -141,7 +141,7 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
it "does not allow to enable merge when pipeline succeeds" do
visit_merge_request(merge_request)
- expect(page).not_to have_link 'Merge When Pipeline Succeeds'
+ expect(page).not_to have_link 'Merge when pipeline succeeds'
end
end
diff --git a/spec/features/merge_requests/only_allow_merge_if_build_succeeds_spec.rb b/spec/features/merge_requests/only_allow_merge_if_build_succeeds_spec.rb
index 447764566e0..4a590e3bf68 100644
--- a/spec/features/merge_requests/only_allow_merge_if_build_succeeds_spec.rb
+++ b/spec/features/merge_requests/only_allow_merge_if_build_succeeds_spec.rb
@@ -14,7 +14,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept merge request'
end
end
@@ -38,8 +38,8 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'does not allow to merge immediately' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Merge When Pipeline Succeeds'
- expect(page).not_to have_button 'Select Merge Moment'
+ expect(page).to have_button 'Merge when pipeline succeeds'
+ expect(page).not_to have_button 'Select merge moment'
end
end
@@ -49,7 +49,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'does not allow MR to be merged' do
visit_merge_request(merge_request)
- expect(page).not_to have_button 'Accept Merge Request'
+ expect(page).not_to have_button 'Accept merge request'
expect(page).to have_content('Please retry the job or push a new commit to fix the failure.')
end
end
@@ -60,7 +60,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'does not allow MR to be merged' do
visit_merge_request(merge_request)
- expect(page).not_to have_button 'Accept Merge Request'
+ expect(page).not_to have_button 'Accept merge request'
expect(page).to have_content('Please retry the job or push a new commit to fix the failure.')
end
end
@@ -71,7 +71,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept merge request'
end
end
@@ -81,7 +81,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept merge request'
end
end
end
@@ -97,10 +97,10 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged immediately', js: true do
visit_merge_request(merge_request)
- expect(page).to have_button 'Merge When Pipeline Succeeds'
+ expect(page).to have_button 'Merge when pipeline succeeds'
- click_button 'Select Merge Moment'
- expect(page).to have_content 'Merge Immediately'
+ click_button 'Select merge moment'
+ expect(page).to have_content 'Merge immediately'
end
end
@@ -110,7 +110,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept merge request'
end
end
@@ -120,7 +120,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do
visit_merge_request(merge_request)
- expect(page).to have_button 'Accept Merge Request'
+ expect(page).to have_button 'Accept merge request'
end
end
end
diff --git a/spec/features/merge_requests/widget_spec.rb b/spec/features/merge_requests/widget_spec.rb
index c2db7d8da3c..a62c5435748 100644
--- a/spec/features/merge_requests/widget_spec.rb
+++ b/spec/features/merge_requests/widget_spec.rb
@@ -145,7 +145,7 @@ describe 'Merge request', :feature, :js do
before do
allow_any_instance_of(Repository).to receive(:merge).and_return(false)
visit namespace_project_merge_request_path(project.namespace, project, merge_request)
- click_button 'Accept Merge Request'
+ click_button 'Accept merge request'
wait_for_ajax
end
diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb
index 99fba594651..27a20e78a43 100644
--- a/spec/features/profiles/personal_access_tokens_spec.rb
+++ b/spec/features/profiles/personal_access_tokens_spec.rb
@@ -41,7 +41,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do
check "api"
check "read_user"
- click_on "Create Personal Access Token"
+ click_on "Create personal access token"
expect(active_personal_access_tokens).to have_text(name)
expect(active_personal_access_tokens).to have_text('In')
expect(active_personal_access_tokens).to have_text('api')
@@ -54,7 +54,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do
visit profile_personal_access_tokens_path
fill_in "Name", with: 'My PAT'
- expect { click_on "Create Personal Access Token" }.not_to change { PersonalAccessToken.count }
+ expect { click_on "Create personal access token" }.not_to change { PersonalAccessToken.count }
expect(page).to have_content("Name cannot be nil")
end
end
diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb
index 46f2f487e0c..aab5a72678e 100644
--- a/spec/features/projects/blobs/edit_spec.rb
+++ b/spec/features/projects/blobs/edit_spec.rb
@@ -22,7 +22,7 @@ feature 'Editing file blob', feature: true, js: true do
wait_for_ajax
find('.js-edit-blob').click
execute_script('ace.edit("editor").setValue("class NextFeature\nend\n")')
- click_button 'Commit Changes'
+ click_button 'Commit changes'
end
context 'from MR diff' do
diff --git a/spec/features/projects/blobs/user_create_spec.rb b/spec/features/projects/blobs/user_create_spec.rb
index d214a531138..fa1a753afcb 100644
--- a/spec/features/projects/blobs/user_create_spec.rb
+++ b/spec/features/projects/blobs/user_create_spec.rb
@@ -22,7 +22,7 @@ feature 'New blob creation', feature: true, js: true do
end
def commit_file
- click_button 'Commit Changes'
+ click_button 'Commit changes'
end
context 'with default target branch' do
diff --git a/spec/features/projects/files/creating_a_file_spec.rb b/spec/features/projects/files/creating_a_file_spec.rb
index ae448706130..5d7bd3dc4ce 100644
--- a/spec/features/projects/files/creating_a_file_spec.rb
+++ b/spec/features/projects/files/creating_a_file_spec.rb
@@ -19,7 +19,7 @@ feature 'User wants to create a file', feature: true do
file_content = find('#file-content')
file_content.set options[:file_content] || 'Some content'
- click_button 'Commit Changes'
+ click_button 'Commit changes'
end
scenario 'file name contains Chinese characters' do
diff --git a/spec/features/projects/files/editing_a_file_spec.rb b/spec/features/projects/files/editing_a_file_spec.rb
index 36a80d7575d..3e544316f28 100644
--- a/spec/features/projects/files/editing_a_file_spec.rb
+++ b/spec/features/projects/files/editing_a_file_spec.rb
@@ -27,7 +27,7 @@ feature 'User wants to edit a file', feature: true do
scenario 'file has been updated since the user opened the edit page' do
Files::UpdateService.new(project, user, commit_params).execute
- click_button 'Commit Changes'
+ click_button 'Commit changes'
expect(page).to have_content 'Someone edited the file the same time you did.'
end
diff --git a/spec/features/projects/files/project_owner_creates_license_file_spec.rb b/spec/features/projects/files/project_owner_creates_license_file_spec.rb
index 6b281e6d21d..8ff0f5898ec 100644
--- a/spec/features/projects/files/project_owner_creates_license_file_spec.rb
+++ b/spec/features/projects/files/project_owner_creates_license_file_spec.rb
@@ -29,7 +29,7 @@ feature 'project owner creates a license file', feature: true, js: true do
expect(file_content).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}")
fill_in :commit_message, with: 'Add a LICENSE file', visible: true
- click_button 'Commit Changes'
+ click_button 'Commit changes'
expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE'))
@@ -53,7 +53,7 @@ feature 'project owner creates a license file', feature: true, js: true do
expect(file_content).to have_content("Copyright (c) #{Time.now.year} #{project.namespace.human_name}")
fill_in :commit_message, with: 'Add a LICENSE file', visible: true
- click_button 'Commit Changes'
+ click_button 'Commit changes'
expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE'))
@@ -63,7 +63,7 @@ feature 'project owner creates a license file', feature: true, js: true do
def select_template(template)
page.within('.js-license-selector-wrap') do
- click_button 'Apply a License template'
+ click_button 'Apply a license template'
click_link template
wait_for_ajax
end
diff --git a/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb b/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
index 87322ac2584..1a1910455a1 100644
--- a/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
+++ b/spec/features/projects/files/project_owner_sees_link_to_create_license_file_in_empty_project_spec.rb
@@ -30,7 +30,7 @@ feature 'project owner sees a link to create a license file in empty project', f
fill_in :commit_message, with: 'Add a LICENSE file', visible: true
# Remove pre-receive hook so we can push without auth
FileUtils.rm_f(File.join(project.repository.path, 'hooks', 'pre-receive'))
- click_button 'Commit Changes'
+ click_button 'Commit changes'
expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE'))
@@ -40,7 +40,7 @@ feature 'project owner sees a link to create a license file in empty project', f
def select_template(template)
page.within('.js-license-selector-wrap') do
- click_button 'Apply a License template'
+ click_button 'Apply a license template'
click_link template
wait_for_ajax
end
diff --git a/spec/features/projects/files/template_type_dropdown_spec.rb b/spec/features/projects/files/template_type_dropdown_spec.rb
index 5ee5e5b4c4e..9fcf12e6cb9 100644
--- a/spec/features/projects/files/template_type_dropdown_spec.rb
+++ b/spec/features/projects/files/template_type_dropdown_spec.rb
@@ -48,7 +48,7 @@ feature 'Template type dropdown selector', js: true do
context 'user previews changes' do
before do
- click_link 'Preview Changes'
+ click_link 'Preview changes'
end
scenario 'type selector is hidden and shown correctly' do
@@ -102,7 +102,7 @@ def check_type_selector_display(is_visible)
end
def try_selecting_all_types
- try_selecting_template_type('LICENSE', 'Apply a License template')
+ try_selecting_template_type('LICENSE', 'Apply a license template')
try_selecting_template_type('Dockerfile', 'Apply a Dockerfile template')
try_selecting_template_type('.gitlab-ci.yml', 'Apply a GitLab CI Yaml template')
try_selecting_template_type('.gitignore', 'Apply a .gitignore template')
@@ -130,6 +130,6 @@ end
def create_and_edit_file(file_name)
visit namespace_project_new_blob_path(project.namespace, project, 'master', file_name: file_name)
- click_button "Commit Changes"
+ click_button "Commit changes"
visit namespace_project_edit_blob_path(project.namespace, project, File.join(project.default_branch, file_name))
end
diff --git a/spec/features/projects/files/undo_template_spec.rb b/spec/features/projects/files/undo_template_spec.rb
index 5479ea34610..c51851d3f94 100644
--- a/spec/features/projects/files/undo_template_spec.rb
+++ b/spec/features/projects/files/undo_template_spec.rb
@@ -17,7 +17,7 @@ feature 'Template Undo Button', js: true do
end
scenario 'reverts template application' do
- try_template_undo('http://www.apache.org/licenses/', 'Apply a License template')
+ try_template_undo('http://www.apache.org/licenses/', 'Apply a license template')
end
end
@@ -29,7 +29,7 @@ feature 'Template Undo Button', js: true do
end
scenario 'reverts template application' do
- try_template_undo('http://www.apache.org/licenses/', 'Apply a License template')
+ try_template_undo('http://www.apache.org/licenses/', 'Apply a license template')
end
end
end
diff --git a/spec/features/projects/merge_request_button_spec.rb b/spec/features/projects/merge_request_button_spec.rb
index b6728960fb8..05f3162f13c 100644
--- a/spec/features/projects/merge_request_button_spec.rb
+++ b/spec/features/projects/merge_request_button_spec.rb
@@ -1,13 +1,13 @@
require 'spec_helper'
feature 'Merge Request button', feature: true do
- shared_examples 'Merge Request button only shown when allowed' do
+ shared_examples 'Merge request button only shown when allowed' do
let(:user) { create(:user) }
let(:project) { create(:project, :public) }
let(:forked_project) { create(:project, :public, forked_from_project: project) }
context 'not logged in' do
- it 'does not show Create Merge Request button' do
+ it 'does not show Create merge request button' do
visit url
within("#content-body") do
@@ -22,7 +22,7 @@ feature 'Merge Request button', feature: true do
project.team << [user, :developer]
end
- it 'shows Create Merge Request button' do
+ it 'shows Create merge request button' do
href = new_namespace_project_merge_request_path(project.namespace,
project,
merge_request: { source_branch: 'feature',
@@ -40,7 +40,7 @@ feature 'Merge Request button', feature: true do
project.project_feature.update!(merge_requests_access_level: ProjectFeature::DISABLED)
end
- it 'does not show Create Merge Request button' do
+ it 'does not show Create merge request button' do
visit url
within("#content-body") do
@@ -55,7 +55,7 @@ feature 'Merge Request button', feature: true do
login_as(user)
end
- it 'does not show Create Merge Request button' do
+ it 'does not show Create merge request button' do
visit url
within("#content-body") do
@@ -66,7 +66,7 @@ feature 'Merge Request button', feature: true do
context 'on own fork of project' do
let(:user) { forked_project.owner }
- it 'shows Create Merge Request button' do
+ it 'shows Create merge request button' do
href = new_namespace_project_merge_request_path(forked_project.namespace,
forked_project,
merge_request: { source_branch: 'feature',
@@ -83,24 +83,24 @@ feature 'Merge Request button', feature: true do
end
context 'on branches page' do
- it_behaves_like 'Merge Request button only shown when allowed' do
- let(:label) { 'Merge Request' }
+ it_behaves_like 'Merge request button only shown when allowed' do
+ let(:label) { 'Merge request' }
let(:url) { namespace_project_branches_path(project.namespace, project) }
let(:fork_url) { namespace_project_branches_path(forked_project.namespace, forked_project) }
end
end
context 'on compare page' do
- it_behaves_like 'Merge Request button only shown when allowed' do
- let(:label) { 'Create Merge Request' }
+ it_behaves_like 'Merge request button only shown when allowed' do
+ let(:label) { 'Create merge request' }
let(:url) { namespace_project_compare_path(project.namespace, project, from: 'master', to: 'feature') }
let(:fork_url) { namespace_project_compare_path(forked_project.namespace, forked_project, from: 'master', to: 'feature') }
end
end
context 'on commits page' do
- it_behaves_like 'Merge Request button only shown when allowed' do
- let(:label) { 'Create Merge Request' }
+ it_behaves_like 'Merge request button only shown when allowed' do
+ let(:label) { 'Create merge request' }
let(:url) { namespace_project_commits_path(project.namespace, project, 'feature') }
let(:fork_url) { namespace_project_commits_path(forked_project.namespace, forked_project, 'feature') }
end
diff --git a/spec/features/projects/wiki/markdown_preview_spec.rb b/spec/features/projects/wiki/markdown_preview_spec.rb
index a1c386ddc18..43d8b45669e 100644
--- a/spec/features/projects/wiki/markdown_preview_spec.rb
+++ b/spec/features/projects/wiki/markdown_preview_spec.rb
@@ -24,12 +24,16 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context "while creating a new wiki page" do
context "when there are no spaces or hyphens in the page name" do
it "rewrites relative links as expected" do
- click_link 'New Page'
- fill_in :new_wiki_path, with: 'a/b/c/d'
- click_button 'Create Page'
+ click_link 'New page'
+ page.within '#modal-new-wiki' do
+ fill_in :new_wiki_path, with: 'a/b/c/d'
+ click_button 'Create page'
+ end
- fill_in :wiki_content, with: wiki_content
- click_on "Preview"
+ page.within '.wiki-form' do
+ fill_in :wiki_content, with: wiki_content
+ click_on "Preview"
+ end
expect(page).to have_content("regular link")
@@ -42,12 +46,16 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context "when there are spaces in the page name" do
it "rewrites relative links as expected" do
- click_link 'New Page'
- fill_in :new_wiki_path, with: 'a page/b page/c page/d page'
- click_button 'Create Page'
+ click_link 'New page'
+ page.within '#modal-new-wiki' do
+ fill_in :new_wiki_path, with: 'a page/b page/c page/d page'
+ click_button 'Create page'
+ end
- fill_in :wiki_content, with: wiki_content
- click_on "Preview"
+ page.within '.wiki-form' do
+ fill_in :wiki_content, with: wiki_content
+ click_on "Preview"
+ end
expect(page).to have_content("regular link")
@@ -60,12 +68,16 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context "when there are hyphens in the page name" do
it "rewrites relative links as expected" do
- click_link 'New Page'
- fill_in :new_wiki_path, with: 'a-page/b-page/c-page/d-page'
- click_button 'Create Page'
-
- fill_in :wiki_content, with: wiki_content
- click_on "Preview"
+ click_link 'New page'
+ page.within '#modal-new-wiki' do
+ fill_in :new_wiki_path, with: 'a-page/b-page/c-page/d-page'
+ click_button 'Create page'
+ end
+
+ page.within '.wiki-form' do
+ fill_in :wiki_content, with: wiki_content
+ click_on "Preview"
+ end
expect(page).to have_content("regular link")
@@ -79,11 +91,17 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context "while editing a wiki page" do
def create_wiki_page(path)
- click_link 'New Page'
- fill_in :new_wiki_path, with: path
- click_button 'Create Page'
- fill_in :wiki_content, with: 'content'
- click_on "Create page"
+ click_link 'New page'
+
+ page.within '#modal-new-wiki' do
+ fill_in :new_wiki_path, with: path
+ click_button 'Create page'
+ end
+
+ page.within '.wiki-form' do
+ fill_in :wiki_content, with: 'content'
+ click_on "Create page"
+ end
end
context "when there are no spaces or hyphens in the page name" do
diff --git a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb
index 7bdaafd1beb..1ffac8cd542 100644
--- a/spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_creates_wiki_page_spec.rb
@@ -21,8 +21,9 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
scenario 'directly from the wiki home page' do
fill_in :wiki_content, with: 'My awesome wiki!'
- click_button 'Create page'
-
+ page.within '.wiki-form' do
+ click_button 'Create page'
+ end
expect(page).to have_content('Home')
expect(page).to have_content("Last edited by #{user.name}")
expect(page).to have_content('My awesome wiki!')
@@ -36,16 +37,20 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
context 'via the "new wiki page" page' do
scenario 'when the wiki page has a single word name', js: true do
- click_link 'New Page'
+ click_link 'New page'
- fill_in :new_wiki_path, with: 'foo'
- click_button 'Create Page'
+ page.within '#modal-new-wiki' do
+ fill_in :new_wiki_path, with: 'foo'
+ click_button 'Create page'
+ end
# Commit message field should have correct value.
expect(page).to have_field('wiki[message]', with: 'Create foo')
- fill_in :wiki_content, with: 'My awesome wiki!'
- click_button 'Create page'
+ page.within '.wiki-form' do
+ fill_in :wiki_content, with: 'My awesome wiki!'
+ click_button 'Create page'
+ end
expect(page).to have_content('Foo')
expect(page).to have_content("Last edited by #{user.name}")
@@ -53,16 +58,20 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
end
scenario 'when the wiki page has spaces in the name', js: true do
- click_link 'New Page'
+ click_link 'New page'
- fill_in :new_wiki_path, with: 'Spaces in the name'
- click_button 'Create Page'
+ page.within '#modal-new-wiki' do
+ fill_in :new_wiki_path, with: 'Spaces in the name'
+ click_button 'Create page'
+ end
# Commit message field should have correct value.
expect(page).to have_field('wiki[message]', with: 'Create spaces in the name')
- fill_in :wiki_content, with: 'My awesome wiki!'
- click_button 'Create page'
+ page.within '.wiki-form' do
+ fill_in :wiki_content, with: 'My awesome wiki!'
+ click_button 'Create page'
+ end
expect(page).to have_content('Spaces in the name')
expect(page).to have_content("Last edited by #{user.name}")
@@ -70,16 +79,20 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
end
scenario 'when the wiki page has hyphens in the name', js: true do
- click_link 'New Page'
+ click_link 'New page'
- fill_in :new_wiki_path, with: 'hyphens-in-the-name'
- click_button 'Create Page'
+ page.within '#modal-new-wiki' do
+ fill_in :new_wiki_path, with: 'hyphens-in-the-name'
+ click_button 'Create page'
+ end
# Commit message field should have correct value.
expect(page).to have_field('wiki[message]', with: 'Create hyphens in the name')
- fill_in :wiki_content, with: 'My awesome wiki!'
- click_button 'Create page'
+ page.within '.wiki-form' do
+ fill_in :wiki_content, with: 'My awesome wiki!'
+ click_button 'Create page'
+ end
expect(page).to have_content('Hyphens in the name')
expect(page).to have_content("Last edited by #{user.name}")
@@ -99,7 +112,9 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
scenario 'directly from the wiki home page' do
fill_in :wiki_content, with: 'My awesome wiki!'
- click_button 'Create page'
+ page.within '.wiki-form' do
+ click_button 'Create page'
+ end
expect(page).to have_content('Home')
expect(page).to have_content("Last edited by #{user.name}")
@@ -113,16 +128,20 @@ feature 'Projects > Wiki > User creates wiki page', feature: true do
end
scenario 'via the "new wiki page" page', js: true do
- click_link 'New Page'
+ click_link 'New page'
- fill_in :new_wiki_path, with: 'foo'
- click_button 'Create Page'
+ page.within '#modal-new-wiki' do
+ fill_in :new_wiki_path, with: 'foo'
+ click_button 'Create page'
+ end
# Commit message field should have correct value.
expect(page).to have_field('wiki[message]', with: 'Create foo')
- fill_in :wiki_content, with: 'My awesome wiki!'
- click_button 'Create page'
+ page.within '.wiki-form' do
+ fill_in :wiki_content, with: 'My awesome wiki!'
+ click_button 'Create page'
+ end
expect(page).to have_content('Foo')
expect(page).to have_content("Last edited by #{user.name}")
diff --git a/spec/features/tags/master_views_tags_spec.rb b/spec/features/tags/master_views_tags_spec.rb
index 555f84c4772..922ac15a2eb 100644
--- a/spec/features/tags/master_views_tags_spec.rb
+++ b/spec/features/tags/master_views_tags_spec.rb
@@ -16,7 +16,7 @@ feature 'Master views tags', feature: true do
fill_in :commit_message, with: 'Add a README file', visible: true
# Remove pre-receive hook so we can push without auth
FileUtils.rm_f(File.join(project.repository.path, 'hooks', 'pre-receive'))
- click_button 'Commit Changes'
+ click_button 'Commit changes'
visit namespace_project_tags_path(project.namespace, project)
end
diff --git a/spec/features/u2f_spec.rb b/spec/features/u2f_spec.rb
index 28373098123..c877cfdd978 100644
--- a/spec/features/u2f_spec.rb
+++ b/spec/features/u2f_spec.rb
@@ -6,18 +6,18 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
before { allow_any_instance_of(U2fHelper).to receive(:inject_u2f_api?).and_return(true) }
def manage_two_factor_authentication
- click_on 'Manage Two-Factor Authentication'
- expect(page).to have_content("Setup New U2F Device")
+ click_on 'Manage two-factor authentication'
+ expect(page).to have_content("Setup new U2F device")
wait_for_ajax
end
def register_u2f_device(u2f_device = nil, name: 'My device')
u2f_device ||= FakeU2fDevice.new(page, name)
u2f_device.respond_to_u2f_registration
- click_on 'Setup New U2F Device'
+ click_on 'Setup new U2F device'
expect(page).to have_content('Your device was successfully set up')
fill_in "Pick a name", with: name
- click_on 'Register U2F Device'
+ click_on 'Register U2F device'
u2f_device
end
@@ -34,9 +34,9 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
it 'does not allow registering a new device' do
visit profile_account_path
- click_on 'Enable Two-Factor Authentication'
+ click_on 'Enable two-factor authentication'
- expect(page).to have_button('Setup New U2F Device', disabled: true)
+ expect(page).to have_button('Setup new U2F device', disabled: true)
end
end
@@ -111,9 +111,9 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
# Have the "u2f device" respond with bad data
page.execute_script("u2f.register = function(_,_,_,callback) { callback('bad response'); };")
- click_on 'Setup New U2F Device'
+ click_on 'Setup new U2F device'
expect(page).to have_content('Your device was successfully set up')
- click_on 'Register U2F Device'
+ click_on 'Register U2F device'
expect(U2fRegistration.count).to eq(0)
expect(page).to have_content("The form contains the following error")
@@ -126,9 +126,9 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
# Failed registration
page.execute_script("u2f.register = function(_,_,_,callback) { callback('bad response'); };")
- click_on 'Setup New U2F Device'
+ click_on 'Setup new U2F device'
expect(page).to have_content('Your device was successfully set up')
- click_on 'Register U2F Device'
+ click_on 'Register U2F device'
expect(page).to have_content("The form contains the following error")
# Successful registration
diff --git a/spec/javascripts/u2f/register_spec.js b/spec/javascripts/u2f/register_spec.js
index 0f390c8b980..3960759f7cb 100644
--- a/spec/javascripts/u2f/register_spec.js
+++ b/spec/javascripts/u2f/register_spec.js
@@ -22,7 +22,7 @@ require('./mock_u2f_device');
it('allows registering a U2F device', function() {
var deviceResponse, inProgressMessage, registeredMessage, setupButton;
setupButton = this.container.find("#js-setup-u2f-device");
- expect(setupButton.text()).toBe('Setup New U2F Device');
+ expect(setupButton.text()).toBe('Setup new U2F device');
setupButton.trigger('click');
inProgressMessage = this.container.children("p");
expect(inProgressMessage.text()).toContain("Trying to communicate with your device");