Commit 1817f80a authored by Clement Ho's avatar Clement Ho

Merge branch 'button-capitalization-ee' into 'master'

Port of button-capitalisation for EE

See merge request !1590
parents 2e21bc12 c99ccc9c
......@@ -30,5 +30,5 @@
= link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-sm btn-block"
- else
.btn.btn-sm.disabled.btn-block
Already Blocked
Already blocked
= link_to 'Remove report', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-sm btn-block btn-close js-remove-tr"
......@@ -160,7 +160,7 @@
Sign-in enabled
- if omniauth_enabled? && button_based_providers.any?
.form-group
= f.label :enabled_oauth_sign_in_sources, 'Enabled OAuth Sign-In sources', class: 'control-label col-sm-2'
= f.label :enabled_oauth_sign_in_sources, 'Enabled OAuth sign-in sources', class: 'control-label col-sm-2'
.col-sm-10
.btn-group{ data: { toggle: 'buttons' } }
- oauth_providers_checkboxes.each do |source|
......
......@@ -4,7 +4,7 @@
%p.light
System OAuth applications don't belong to any user and can only be managed by admins
%hr
%p= link_to 'New Application', new_admin_application_path, class: 'btn btn-success'
%p= link_to 'New application', new_admin_application_path, class: 'btn btn-success'
%table.table.table-striped
%thead
%tr
......
......@@ -146,7 +146,7 @@
= link_to admin_projects_path do
%h1= number_with_delimiter(Project.cached_count)
%hr
= link_to('New Project', new_project_path, class: "btn btn-new")
= link_to('New project', new_project_path, class: "btn btn-new")
.col-sm-4
.light-well.well-centered
%h4 Users
......@@ -154,7 +154,7 @@
= link_to admin_users_path do
%h1= number_with_delimiter(User.count)
%hr
= link_to 'New User', new_admin_user_path, class: "btn btn-new"
= link_to 'New user', new_admin_user_path, class: "btn btn-new"
.col-sm-4
.light-well.well-centered
%h4 Groups
......@@ -162,7 +162,7 @@
= link_to admin_groups_path do
%h1= number_with_delimiter(Group.count)
%hr
= link_to 'New Group', new_admin_group_path, class: "btn btn-new"
= link_to 'New group', new_admin_group_path, class: "btn btn-new"
.row.prepend-top-10
.col-md-4
......
......@@ -3,7 +3,7 @@
%h3.page-title.deploy-keys-title
Public deploy keys (#{@deploy_keys.count})
.pull-right
= link_to 'New Deploy Key', new_admin_deploy_key_path, class: 'btn btn-new btn-sm btn-inverted'
= link_to 'New deploy key', new_admin_deploy_key_path, class: 'btn btn-new btn-sm btn-inverted'
- if @deploy_keys.any?
.table-holder.deploy-keys-list
......
......@@ -30,7 +30,7 @@
= link_to admin_groups_path(sort: sort_value_largest_group, name: project_name) do
= sort_title_largest_group
= link_to new_admin_group_path, class: "btn btn-new" do
New Group
New group
%ul.content-list
= render @groups
......
......@@ -129,7 +129,7 @@
group members
%span.badge= @group.members.size
.pull-right
= link_to icon('pencil-square-o', text: 'Manage Access'), polymorphic_url([@group, :members]), class: "btn btn-xs"
= link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@group, :members]), class: "btn btn-xs"
%ul.well-list.group-users-list.content-list
= render partial: 'shared/members/member', collection: @members, as: :member, locals: { show_controls: false }
.panel-footer
......
......@@ -51,7 +51,7 @@
= f.check_box :enable_ssl_verification
%strong Enable SSL verification
.form-actions
= f.submit "Add System Hook", class: "btn btn-create"
= f.submit "Add system hook", class: "btn btn-create"
%hr
- if @hooks.any?
......@@ -62,7 +62,7 @@
- @hooks.each do |hook|
%li
.controls
= link_to 'Test Hook', admin_hook_test_path(hook), class: "btn btn-sm"
= link_to 'Test hook', admin_hook_test_path(hook), class: "btn btn-sm"
= link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-sm"
.monospace= hook.url
%div
......
- page_title "Identities", @user.name, "Users"
= render 'admin/users/head'
= link_to 'New Identity', new_admin_user_identity_path, class: 'pull-right btn btn-new'
= link_to 'New identity', new_admin_user_identity_path, class: 'pull-right btn btn-new'
- if @identities.present?
.table-holder
%table.table
......
......@@ -161,7 +161,7 @@
%span.badge= @group_members.size
.pull-right
= link_to admin_group_path(@group), class: 'btn btn-xs' do
= icon('pencil-square-o', text: 'Manage Access')
= icon('pencil-square-o', text: 'Manage access')
%ul.well-list.content-list
= render partial: 'shared/members/member', collection: @group_members, as: :member, locals: { show_controls: false }
.panel-footer
......@@ -175,7 +175,7 @@
project members
%span.badge= @project.users.size
.pull-right
= link_to icon('pencil-square-o', text: 'Manage Access'), polymorphic_url([@project, :members]), class: "btn btn-xs"
= link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@project, :members]), class: "btn btn-xs"
%ul.well-list.project_members.content-list
= render partial: 'shared/members/member', collection: @project_members, as: :member, locals: { show_controls: false }
.panel-footer
......
......@@ -35,5 +35,5 @@
= link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs"
- else
.btn.btn-xs.disabled
Already Blocked
Already blocked
= link_to 'Remove log', [:admin, spam_log], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr"
......@@ -40,6 +40,6 @@
- if user.can_be_removed? && can?(current_user, :destroy_user, @user)
%li.divider
%li
= link_to 'Delete User', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Consider cancelling this deletion and blocking the user instead. Are you sure?" },
= link_to 'Delete user', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Consider cancelling this deletion and blocking the user instead. Are you sure?" },
class: 'btn btn-remove btn-block',
method: :delete
......@@ -34,7 +34,7 @@
= link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do
= sort_title_oldest_updated
= link_to 'Send email to users', admin_email_path, class: 'btn'
= link_to 'New User', new_admin_user_path, class: 'btn btn-new btn-search'
= link_to 'New user', new_admin_user_path, class: 'btn btn-new btn-search'
.nav-block
%ul.nav-links.wide.scrolling-tabs.white.scrolling-tabs
......
......@@ -11,4 +11,4 @@
= render 'shared/groups/dropdown'
- if current_user.can_create_group?
= link_to new_group_path, class: "btn btn-new" do
New Group
New group
......@@ -19,4 +19,4 @@
= render 'shared/projects/dropdown'
- if current_user.can_create_project?
= link_to new_project_path, class: 'btn btn-new' do
New Project
New project
......@@ -8,7 +8,7 @@
.nav-controls
= link_to params.merge(rss_url_options), class: 'btn has-tooltip', title: 'Subscribe' do
= icon('rss')
= render 'shared/new_project_item_select', path: 'issues/new', label: "New Issue"
= render 'shared/new_project_item_select', path: 'issues/new', label: "New issue"
= render 'shared/issuable/filter', type: :issues
= render 'shared/issues'
......@@ -4,7 +4,7 @@
.top-area
= render 'shared/issuable/nav', type: :merge_requests
.nav-controls
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New Merge Request"
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New merge request"
= render 'shared/issuable/filter', type: :merge_requests
= render 'shared/merge_requests'
......@@ -5,7 +5,7 @@
= render 'shared/milestones_filter', counts: @milestone_states
.nav-controls
= render 'shared/new_project_item_select', path: 'milestones/new', label: 'New Milestone', include_groups: true
= render 'shared/new_project_item_select', path: 'milestones/new', label: 'New milestone', include_groups: true
.milestones
%ul.content-list
......
......@@ -10,5 +10,5 @@
#{time_ago_with_tooltip(event.created_at)}
.pull-right
= link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-info btn-sm" do
Create Merge Request
= link_to new_mr_path_from_push_event(event), title: "New merge request", class: "btn btn-info btn-sm" do
Create merge request
......@@ -62,4 +62,4 @@
%strong Removed group can not be restored!
.form-actions
= link_to 'Remove Group', @group, data: {confirm: 'Removed group can not be restored! Are you sure?'}, method: :delete, class: "btn btn-remove"
= link_to 'Remove group', @group, data: {confirm: 'Removed group can not be restored! Are you sure?'}, method: :delete, class: "btn btn-remove"
......@@ -11,7 +11,7 @@
= icon('rss')
%span.icon-label
Subscribe
= render 'shared/new_project_item_select', path: 'issues/new', label: "New Issue"
= render 'shared/new_project_item_select', path: 'issues/new', label: "New issue"
= render 'shared/issuable/filter', type: :issues
......
......@@ -7,7 +7,7 @@
.nav-controls
- if can?(current_user, :admin_milestones, @group)
= link_to new_group_milestone_path(@group), class: "btn btn-new" do
New Milestone
New milestone
.row-content-block
Only milestones from
......
......@@ -39,5 +39,5 @@
= render "shared/milestones/form_dates", f: f
.form-actions
= f.submit 'Create Milestone', class: "btn-create btn"
= f.submit 'Create milestone', class: "btn-create btn"
= link_to "Cancel", group_milestones_path(@group), class: "btn btn-cancel"
......@@ -7,7 +7,7 @@
- if can? current_user, :admin_group, @group
.controls
= link_to new_project_path(namespace_id: @group.id), class: "btn btn-sm btn-success" do
New Project
New project
%ul.well-list
- @projects.each do |project|
%li
......
......@@ -225,7 +225,7 @@
%ul.dropdown-menu
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
.dropdown.inline.pull-right
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
Dropdown
......@@ -233,7 +233,7 @@
%ul.dropdown-menu.dropdown-menu-align-right
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
.example
%div
.dropdown.inline
......@@ -243,7 +243,7 @@
%ul.dropdown-menu.dropdown-menu-selectable
%li
%a.is-active{ href: "#" }
Dropdown Option
Dropdown option
.example
%div
.dropdown.inline
......@@ -262,26 +262,26 @@
%ul
%li
%a.is-active{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li.divider
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
.dropdown-footer
%strong Tip:
If an author is not a member of this project, you can still filter by his name while using the search field.
......@@ -301,26 +301,26 @@
%ul
%li
%a.is-active{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li.divider
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
%li
%a{ href: "#" }
Dropdown Option
Dropdown option
.dropdown-footer
%strong Tip:
If an author is not a member of this project, you can still filter by his name while using the search field.
......
......@@ -9,7 +9,7 @@
To import a GitHub project, you first need to authorize GitLab to access
the list of your GitHub repositories:
= link_to 'List Your GitHub Repositories', status_import_github_path, class: 'btn btn-success'
= link_to 'List your GitHub repositories', status_import_github_path, class: 'btn btn-success'
%hr
......@@ -28,7 +28,7 @@
= form_tag personal_access_token_import_github_path, method: :post, class: 'form-inline' do
.form-group
= text_field_tag :personal_access_token, '', class: 'form-control', placeholder: "Personal Access Token", size: 40
= submit_tag 'List Your GitHub Repositories', class: 'btn btn-success'
= submit_tag 'List your GitHub repositories', class: 'btn btn-success'
- unless github_import_configured?
%hr
......
......@@ -29,11 +29,11 @@
- if current_user
- if session[:impersonator_id]
%li.impersonation
= link_to admin_impersonation_path, method: :delete, title: "Stop Impersonation", aria: { label: 'Stop Impersonation' }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do
= link_to admin_impersonation_path, method: :delete, title: "Stop impersonation", aria: { label: 'Stop impersonation' }, data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do
= icon('user-secret fw')
- if current_user.is_admin?
%li
= link_to admin_root_path, title: 'Admin Area', aria: { label: "Admin Area" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= link_to admin_root_path, title: 'Admin area', aria: { label: "Admin area" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= icon('wrench fw')
- if current_user.can_create_project?
%li
......
......@@ -49,14 +49,14 @@
%p
Status: #{current_user.two_factor_enabled? ? 'Enabled' : 'Disabled'}
- if current_user.two_factor_enabled?
= link_to 'Manage Two-Factor Authentication', profile_two_factor_auth_path, class: 'btn btn-info'
= link_to 'Manage two-factor authentication', profile_two_factor_auth_path, class: 'btn btn-info'
= link_to 'Disable', profile_two_factor_auth_path,
method: :delete,
data: { confirm: "Are you sure? This will invalidate your registered applications and U2F devices." },
class: 'btn btn-danger'
- else
.append-bottom-10
= link_to 'Enable Two-Factor Authentication', profile_two_factor_auth_path, class: 'btn btn-success'
= link_to 'Enable two-factor authentication', profile_two_factor_auth_path, class: 'btn btn-success'
%hr
- if button_based_providers.any?
......
......@@ -33,17 +33,17 @@
%li
= @primary
%span.pull-right
%span.label.label-success Primary Email
%span.label.label-success Primary email
- if @primary === current_user.public_email
%span.label.label-info Public Email
%span.label.label-info Public email
- if @primary === current_user.notification_email
%span.label.label-info Notification Email
%span.label.label-info Notification email
- @emails.each do |email|
%li
= email.email
%span.pull-right
- if email.email === current_user.public_email
%span.label.label-info Public Email
%span.label.label-info Public email
- if email.email === current_user.notification_email
%span.label.label-info Notification Email
%span.label.label-info Notification email
= link_to 'Remove', profile_email_path(email), data: { confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-sm btn-warning prepend-left-10'
......@@ -44,7 +44,7 @@
= label_tag :pin_code, nil, class: "label-light"
= text_field_tag :pin_code, nil, class: "form-control", required: true
.prepend-top-default
= submit_tag 'Register with Two-Factor App', class: 'btn btn-success'
= submit_tag 'Register with two-factor app', class: 'btn btn-success'
%hr
......
.form-actions
= button_tag 'Commit Changes', class: 'btn commit-btn js-commit-button btn-create'
= button_tag 'Commit changes', class: 'btn commit-btn js-commit-button btn-create'
= link_to 'Cancel', cancel_path,
class: 'btn btn-cancel', data: {confirm: leave_edit_message}
......
......@@ -5,7 +5,7 @@
.template-type-selector.js-template-type-selector-wrap.hidden
= dropdown_tag("Choose type", options: { toggle_class: 'btn js-template-type-selector', title: "Choose a template type" } )
.license-selector.js-license-selector-wrap.js-template-selector-wrap.hidden
= dropdown_tag("Apply a License template", options: { toggle_class: 'btn js-license-selector', title: "Apply a license", filter: true, placeholder: "Filter", data: { data: licenses_for_select, project: @project.name, fullname: @project.namespace.human_name } } )
= dropdown_tag("Apply a license template", options: { toggle_class: 'btn js-license-selector', title: "Apply a license", filter: true, placeholder: "Filter", data: { data: licenses_for_select, project: @project.name, fullname: @project.namespace.human_name } } )
.gitignore-selector.js-gitignore-selector-wrap.js-template-selector-wrap.hidden
= dropdown_tag("Apply a .gitignore template", options: { toggle_class: 'btn js-gitignore-selector', title: "Apply a template", filter: true, placeholder: "Filter", data: { data: gitignore_names } } )
.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden
......
- type = impersonation ? "Impersonation" : "Personal Access"
- type = impersonation ? "impersonation" : "personal access"
%h5.prepend-top-0
Add a #{type} Token
......@@ -22,7 +22,7 @@
= render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes
.prepend-top-default
= f.submit "Create #{type} Token", class: "btn btn-create"
= f.submit "Create #{type} token", class: "btn btn-create"
:javascript
var $dateField = $('.datepicker');
......
......@@ -7,13 +7,13 @@
- if current_user.two_factor_otp_enabled?
.row.append-bottom-10
.col-md-3
%button#js-setup-u2f-device.btn.btn-info Setup New U2F Device
%button#js-setup-u2f-device.btn.btn-info Setup new U2F device
.col-md-9
%p Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left.
- else
.row.append-bottom-10
.col-md-3
%button#js-setup-u2f-device.btn.btn-info{ disabled: true } Setup New U2F Device
%button#js-setup-u2f-device.btn.btn-info{ disabled: true } Setup new U2F device
.col-md-9
%p.text-warning You need to register a two-factor authentication app before you can set up a U2F device.
......@@ -36,7 +36,7 @@
= text_field_tag 'u2f_registration[name]', nil, class: 'form-control', placeholder: "Pick a name"
.col-md-3
= hidden_field_tag 'u2f_registration[device_response]', nil, class: 'form-control', required: true, id: "js-device-response"
= submit_tag "Register U2F Device", class: "btn btn-success"
= submit_tag "Register U2F device", class: "btn btn-success"
:javascript
var u2fRegister = new U2FRegister($("#js-register-u2f"), gon.u2f);
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -108,8 +108,8 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
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
......
......@@ -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
......
......@@ -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"
......
......@@ -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) }
......
......@@ -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'
......
......@@ -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')
......
......@@ -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
......
......@@ -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'
......
......@@ -130,7 +130,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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment