summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-04-04 13:06:32 -0500
committerJose Ivan Vargas <jvargas@gitlab.com>2017-04-06 14:58:57 -0500
commit7592137f218a1a5ef0a8031846cc93ecf185dd9f (patch)
tree257e3739708f4e3996bfca07f0fbd70edd2de606 /spec
parent0e325ea6ee625ad24709dd1118e36803bbaa222e (diff)
downloadgitlab-ce-7592137f218a1a5ef0a8031846cc93ecf185dd9f.tar.gz
Fix rspec and spinach tests
Diffstat (limited to 'spec')
-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/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.rb4
-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.rb4
-rw-r--r--spec/features/projects/files/undo_template_spec.rb4
-rw-r--r--spec/features/u2f_spec.rb6
-rw-r--r--spec/javascripts/u2f/register_spec.js2
12 files changed, 18 insertions, 18 deletions
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/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 82b096c7cc9..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'))
@@ -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 kicense 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..5fd86bb07a8 100644
--- a/spec/features/projects/files/template_type_dropdown_spec.rb
+++ b/spec/features/projects/files/template_type_dropdown_spec.rb
@@ -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/u2f_spec.rb b/spec/features/u2f_spec.rb
index 60941abda14..c877cfdd978 100644
--- a/spec/features/u2f_spec.rb
+++ b/spec/features/u2f_spec.rb
@@ -7,17 +7,17 @@ feature 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do
def manage_two_factor_authentication
click_on 'Manage two-factor authentication'
- expect(page).to have_content("Setup New U2F Device")
+ 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
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");