Commit 8a574030 authored by Clement Ho's avatar Clement Ho

Merge branch 'button-capitalization' into 'master'

Button capitalisation

Closes #18931

See merge request !10418
parents d2aea4cd 745058c0
...@@ -102,7 +102,7 @@ module BlobHelper ...@@ -102,7 +102,7 @@ module BlobHelper
if Gitlab::MarkupHelper.previewable?(filename) if Gitlab::MarkupHelper.previewable?(filename)
'Preview' 'Preview'
else else
'Preview Changes' 'Preview changes'
end end
end end
......
...@@ -30,5 +30,5 @@ ...@@ -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" = 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 - else
.btn.btn-sm.disabled.btn-block .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" = link_to 'Remove report', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-sm btn-block btn-close js-remove-tr"
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
Sign-in enabled Sign-in enabled
- if omniauth_enabled? && button_based_providers.any? - if omniauth_enabled? && button_based_providers.any?
.form-group .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 .col-sm-10
.btn-group{ data: { toggle: 'buttons' } } .btn-group{ data: { toggle: 'buttons' } }
- oauth_providers_checkboxes.each do |source| - oauth_providers_checkboxes.each do |source|
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%p.light %p.light
System OAuth applications don't belong to any user and can only be managed by admins System OAuth applications don't belong to any user and can only be managed by admins
%hr %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 %table.table.table-striped
%thead %thead
%tr %tr
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
= link_to admin_projects_path do = link_to admin_projects_path do
%h1= number_with_delimiter(Project.cached_count) %h1= number_with_delimiter(Project.cached_count)
%hr %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 .col-sm-4
.light-well.well-centered .light-well.well-centered
%h4 Users %h4 Users
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
= link_to admin_users_path do = link_to admin_users_path do
%h1= number_with_delimiter(User.count) %h1= number_with_delimiter(User.count)
%hr %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 .col-sm-4
.light-well.well-centered .light-well.well-centered
%h4 Groups %h4 Groups
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
= link_to admin_groups_path do = link_to admin_groups_path do
%h1= number_with_delimiter(Group.count) %h1= number_with_delimiter(Group.count)
%hr %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 .row.prepend-top-10
.col-md-4 .col-md-4
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
%h3.page-title.deploy-keys-title %h3.page-title.deploy-keys-title
Public deploy keys (#{@deploy_keys.count}) Public deploy keys (#{@deploy_keys.count})
.pull-right .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? - if @deploy_keys.any?
.table-holder.deploy-keys-list .table-holder.deploy-keys-list
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
= link_to admin_groups_path(sort: sort_value_largest_group, name: project_name) do = link_to admin_groups_path(sort: sort_value_largest_group, name: project_name) do
= sort_title_largest_group = sort_title_largest_group
= link_to new_admin_group_path, class: "btn btn-new" do = link_to new_admin_group_path, class: "btn btn-new" do
New Group New group
%ul.content-list %ul.content-list
= render @groups = render @groups
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
group members group members
%span.badge= @group.members.size %span.badge= @group.members.size
.pull-right .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 %ul.well-list.group-users-list.content-list
= render partial: 'shared/members/member', collection: @members, as: :member, locals: { show_controls: false } = render partial: 'shared/members/member', collection: @members, as: :member, locals: { show_controls: false }
.panel-footer .panel-footer
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
= f.check_box :enable_ssl_verification = f.check_box :enable_ssl_verification
%strong Enable SSL verification %strong Enable SSL verification
.form-actions .form-actions
= f.submit "Add System Hook", class: "btn btn-create" = f.submit "Add system hook", class: "btn btn-create"
%hr %hr
- if @hooks.any? - if @hooks.any?
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
- @hooks.each do |hook| - @hooks.each do |hook|
%li %li
.controls .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" = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-sm"
.monospace= hook.url .monospace= hook.url
%div %div
......
- page_title "Identities", @user.name, "Users" - page_title "Identities", @user.name, "Users"
= render 'admin/users/head' = 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? - if @identities.present?
.table-holder .table-holder
%table.table %table.table
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
%span.badge= @group_members.size %span.badge= @group_members.size
.pull-right .pull-right
= link_to admin_group_path(@group), class: 'btn btn-xs' do = 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 %ul.well-list.content-list
= render partial: 'shared/members/member', collection: @group_members, as: :member, locals: { show_controls: false } = render partial: 'shared/members/member', collection: @group_members, as: :member, locals: { show_controls: false }
.panel-footer .panel-footer
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
project members project members
%span.badge= @project.users.size %span.badge= @project.users.size
.pull-right .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 %ul.well-list.project_members.content-list
= render partial: 'shared/members/member', collection: @project_members, as: :member, locals: { show_controls: false } = render partial: 'shared/members/member', collection: @project_members, as: :member, locals: { show_controls: false }
.panel-footer .panel-footer
......
...@@ -35,5 +35,5 @@ ...@@ -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" = 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 - else
.btn.btn-xs.disabled .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" = link_to 'Remove log', [:admin, spam_log], remote: true, method: :delete, class: "btn btn-xs btn-close js-remove-tr"
...@@ -37,6 +37,6 @@ ...@@ -37,6 +37,6 @@
- if user.can_be_removed? && can?(current_user, :destroy_user, @user) - if user.can_be_removed? && can?(current_user, :destroy_user, @user)
%li.divider %li.divider
%li %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', class: 'btn btn-remove btn-block',
method: :delete method: :delete
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
= sort_title_recently_updated = sort_title_recently_updated
= link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do = link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do
= sort_title_oldest_updated = sort_title_oldest_updated
= 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 .nav-block
%ul.nav-links.wide.scrolling-tabs.white.scrolling-tabs %ul.nav-links.wide.scrolling-tabs.white.scrolling-tabs
......
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
= render 'shared/groups/dropdown' = render 'shared/groups/dropdown'
- if current_user.can_create_group? - if current_user.can_create_group?
= link_to new_group_path, class: "btn btn-new" do = link_to new_group_path, class: "btn btn-new" do
New Group New group
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
= render 'shared/projects/dropdown' = render 'shared/projects/dropdown'
- if current_user.can_create_project? - if current_user.can_create_project?
= link_to new_project_path, class: 'btn btn-new' do = link_to new_project_path, class: 'btn btn-new' do
New Project New project
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
.nav-controls .nav-controls
= link_to params.merge(rss_url_options), class: 'btn has-tooltip', title: 'Subscribe' do = link_to params.merge(rss_url_options), class: 'btn has-tooltip', title: 'Subscribe' do
= icon('rss') = 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/issuable/filter', type: :issues
= render 'shared/issues' = render 'shared/issues'
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.top-area .top-area
= render 'shared/issuable/nav', type: :merge_requests = render 'shared/issuable/nav', type: :merge_requests
.nav-controls .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/issuable/filter', type: :merge_requests
= render 'shared/merge_requests' = render 'shared/merge_requests'
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
= render 'shared/milestones_filter', counts: @milestone_states = render 'shared/milestones_filter', counts: @milestone_states
.nav-controls .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 .milestones
%ul.content-list %ul.content-list
......
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
#{time_ago_with_tooltip(event.created_at)} #{time_ago_with_tooltip(event.created_at)}
.pull-right .pull-right
= link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-info btn-sm" do = link_to new_mr_path_from_push_event(event), title: "New merge request", class: "btn btn-info btn-sm" do
Create Merge Request Create merge request
...@@ -51,4 +51,4 @@ ...@@ -51,4 +51,4 @@
%strong Removed group can not be restored! %strong Removed group can not be restored!
.form-actions .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 @@ ...@@ -11,7 +11,7 @@
= icon('rss') = icon('rss')
%span.icon-label %span.icon-label
Subscribe 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 = render 'shared/issuable/filter', type: :issues
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
.nav-controls .nav-controls
- if can?(current_user, :admin_milestones, @group) - if can?(current_user, :admin_milestones, @group)
= link_to new_group_milestone_path(@group), class: "btn btn-new" do = link_to new_group_milestone_path(@group), class: "btn btn-new" do
New Milestone New milestone
.row-content-block .row-content-block
Only milestones from Only milestones from
......
...@@ -39,5 +39,5 @@ ...@@ -39,5 +39,5 @@
= render "shared/milestones/form_dates", f: f = render "shared/milestones/form_dates", f: f
.form-actions .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" = link_to "Cancel", group_milestones_path(@group), class: "btn btn-cancel"
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
- if can? current_user, :admin_group, @group - if can? current_user, :admin_group, @group
.controls .controls
= link_to new_project_path(namespace_id: @group.id), class: "btn btn-sm btn-success" do = link_to new_project_path(namespace_id: @group.id), class: "btn btn-sm btn-success" do
New Project New project
%ul.well-list %ul.well-list
- @projects.each do |project| - @projects.each do |project|
%li %li
......
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
%ul.dropdown-menu %ul.dropdown-menu
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
.dropdown.inline.pull-right .dropdown.inline.pull-right
%button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } } %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown' } }
Dropdown Dropdown
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
%ul.dropdown-menu.dropdown-menu-align-right %ul.dropdown-menu.dropdown-menu-align-right
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
.example .example
%div %div
.dropdown.inline .dropdown.inline
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
%ul.dropdown-menu.dropdown-menu-selectable %ul.dropdown-menu.dropdown-menu-selectable
%li %li
%a.is-active{ href: "#" } %a.is-active{ href: "#" }
Dropdown Option Dropdown option
.example .example
%div %div
.dropdown.inline .dropdown.inline
...@@ -262,26 +262,26 @@ ...@@ -262,26 +262,26 @@
%ul %ul
%li %li
%a.is-active{ href: "#" } %a.is-active{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li.divider %li.divider
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
.dropdown-footer .dropdown-footer
%strong Tip: %strong Tip:
If an author is not a member of this project, you can still filter by his name while using the search field. 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 @@ ...@@ -301,26 +301,26 @@
%ul %ul
%li %li
%a.is-active{ href: "#" } %a.is-active{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li.divider %li.divider
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
%li %li
%a{ href: "#" } %a{ href: "#" }
Dropdown Option Dropdown option
.dropdown-footer .dropdown-footer
%strong Tip: %strong Tip:
If an author is not a member of this project, you can still filter by his name while using the search field. 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 @@ ...@@ -9,7 +9,7 @@
To import a GitHub project, you first need to authorize GitLab to access To import a GitHub project, you first need to authorize GitLab to access
the list of your GitHub repositories: 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 %hr
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
= form_tag personal_access_token_import_github_path, method: :post, class: 'form-inline' do = form_tag personal_access_token_import_github_path, method: :post, class: 'form-inline' do
.form-group .form-group
= text_field_tag :personal_access_token, '', class: 'form-control', placeholder: "Personal Access Token", size: 40 = 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? - unless github_import_configured?
%hr %hr
......
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
- if current_user - if current_user
- if session[:impersonator_id] - if session[:impersonator_id]
%li.impersonation %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') = icon('user-secret fw')
- if current_user.is_admin? - if current_user.is_admin?
%li %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') = icon('wrench fw')
- if current_user.can_create_project? - if current_user.can_create_project?
%li %li
......
...@@ -49,14 +49,14 @@ ...@@ -49,14 +49,14 @@
%p %p
Status: #{current_user.two_factor_enabled? ? 'Enabled' : 'Disabled'} Status: #{current_user.two_factor_enabled? ? 'Enabled' : 'Disabled'}
- if current_user.two_factor_enabled? - 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, = link_to 'Disable', profile_two_factor_auth_path,
method: :delete, method: :delete,
data: { confirm: "Are you sure? This will invalidate your registered applications and U2F devices." }, data: { confirm: "Are you sure? This will invalidate your registered applications and U2F devices." },
class: 'btn btn-danger' class: 'btn btn-danger'
- else - else
.append-bottom-10 .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 %hr
- if button_based_providers.any? - if button_based_providers.any?
......
...@@ -33,17 +33,17 @@ ...@@ -33,17 +33,17 @@
%li %li
= @primary = @primary
%span.pull-right %span.pull-right
%span.label.label-success Primary Email %span.label.label-success Primary email
- if @primary === current_user.public_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 - if @primary === current_user.notification_email
%span.label.label-info Notification Email %span.label.label-info Notification email
- @emails.each do |email| - @emails.each do |email|
%li %li
= email.email = email.email
%span.pull-right %span.pull-right
- if email.email === current_user.public_email - 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 - 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' = 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 @@ ...@@ -44,7 +44,7 @@
= label_tag :pin_code, nil, class: "label-light" = label_tag :pin_code, nil, class: "label-light"
= text_field_tag :pin_code, nil, class: "form-control", required: true = text_field_tag :pin_code, nil, class: "form-control", required: true
.prepend-top-default .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 %hr
......
.form-actions .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, = link_to 'Cancel', cancel_path,
class: 'btn btn-cancel', data: {confirm: leave_edit_message} class: 'btn btn-cancel', data: {confirm: leave_edit_message}
......
= link_to namespace_project_find_file_path(@project.namespace, @project, @ref), class: 'btn btn-grouped shortcuts-find-file', rel: 'nofollow' do = link_to namespace_project_find_file_path(@project.namespace, @project, @ref), class: 'btn btn-grouped shortcuts-find-file', rel: 'nofollow' do
= icon('search') = icon('search')
%span Find File %span Find file
...@@ -14,5 +14,5 @@ ...@@ -14,5 +14,5 @@
#{time_ago_with_tooltip(event.created_at)} #{time_ago_with_tooltip(event.created_at)}
.pull-right .pull-right
= link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-info btn-sm" do = link_to new_mr_path_from_push_event(event), title: "New merge request", class: "btn btn-info btn-sm" do
Create Merge Request Create merge request
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
-# only show normal/blame view links for text files -# only show normal/blame view links for text files
- if blob_text_viewable?(blob) - if blob_text_viewable?(blob)
- if current_page? namespace_project_blame_path(@project.namespace, @project, @id) - if current_page? namespace_project_blame_path(@project.namespace, @project, @id)
= link_to 'Normal View', namespace_project_blob_path(@project.namespace, @project, @id), = link_to 'Normal view', namespace_project_blob_path(@project.namespace, @project, @id),
class: 'btn btn-sm' class: 'btn btn-sm'
- else - else
= link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id), = link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id),
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.template-type-selector.js-template-type-selector-wrap.hidden .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" } ) = 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 .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 .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 } } ) = 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 .gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
.controls.hidden-xs< .controls.hidden-xs<
- if merge_project && create_mr_button?(@repository.root_ref, branch.name) - if merge_project && create_mr_button?(@repository.root_ref, branch.name)
= link_to create_mr_path(@repository.root_ref, branch.name), class: 'btn btn-default' do = link_to create_mr_path(@repository.root_ref, branch.name), class: 'btn btn-default' do
Merge Request Merge request
- if branch.name != @repository.root_ref - if branch.name != @repository.root_ref
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: "btn btn-default #{'prepend-left-10' unless merge_project}", method: :post, title: "Compare" do = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: "btn btn-default #{'prepend-left-10' unless merge_project}", method: :post, title: "Compare" do
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
= link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' = link_to 'Get started with CI/CD Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info'
= link_to ci_lint_path, class: 'btn btn-default' do = link_to ci_lint_path, class: 'btn btn-default' do
%span CI Lint %span CI lint
.content-list.builds-content-list .content-list.builds-content-list
= render "table", builds: @builds, project: @project = render "table", builds: @builds, project: @project
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
= icon('comment') = icon('comment')
= @notes_count = @notes_count
= link_to namespace_project_tree_path(@project.namespace, @project, @commit), class: "btn btn-default append-right-10 hidden-xs hidden-sm" do = link_to namespace_project_tree_path(@project.namespace, @project, @commit), class: "btn btn-default append-right-10 hidden-xs hidden-sm" do
Browse Files Browse files
.dropdown.inline .dropdown.inline
%a.btn.btn-default.dropdown-toggle{ data: { toggle: "dropdown" } } %a.btn.btn-default.dropdown-toggle{ data: { toggle: "dropdown" } }
%span Options %span Options
......
...@@ -18,16 +18,16 @@ ...@@ -18,16 +18,16 @@
.block-controls.hidden-xs.hidden-sm .block-controls.hidden-xs.hidden-sm
- if @merge_request.present? - if @merge_request.present?
.control .control
= link_to "View Open Merge Request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn' = link_to "View open merge request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn'
- elsif create_mr_button?(@repository.root_ref, @ref) - elsif create_mr_button?(@repository.root_ref, @ref)
.control .control
= link_to "Create Merge Request", create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success' = link_to "Create merge request", create_mr_path(@repository.root_ref, @ref), class: 'btn btn-success'
.control .control
= form_tag(namespace_project_commits_path(@project.namespace, @project, @id), method: :get, class: 'commits-search-form') do = form_tag(namespace_project_commits_path(@project.namespace, @project, @id), method: :get, class: 'commits-search-form') do
= search_field_tag :search, params[:search], { placeholder: 'Filter by commit message', id: 'commits-search', class: 'form-control search-text-input input-short', spellcheck: false } = search_field_tag :search, params[:search], { placeholder: 'Filter by commit message', id: 'commits-search', class: 'form-control search-text-input input-short', spellcheck: false }
.control .control
= link_to namespace_project_commits_path(@project.namespace, @project, @ref, rss_url_options), title: "Commits Feed", class: 'btn' do = link_to namespace_project_commits_path(@project.namespace, @project, @ref, rss_url_options), title: "Commits feed", class: 'btn' do
= icon("rss") = icon("rss")
%div{ id: dom_id(@project) } %div{ id: dom_id(@project) }
......
...@@ -21,6 +21,6 @@ ...@@ -21,6 +21,6 @@
&nbsp; &nbsp;
= button_tag "Compare", class: "btn btn-create commits-compare-btn" = button_tag "Compare", class: "btn btn-create commits-compare-btn"
- if @merge_request.present? - if @merge_request.present?
= link_to "View Open Merge Request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'prepend-left-10 btn' = link_to "View open merge request", namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'prepend-left-10 btn'
- elsif create_mr_button? - elsif create_mr_button?
= link_to "Create Merge Request", create_mr_path, class: 'prepend-left-10 btn' = link_to "Create merge request", create_mr_path, class: 'prepend-left-10 btn'
...@@ -22,4 +22,4 @@ ...@@ -22,4 +22,4 @@
%p %p
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork", class: "btn" do = link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork", class: "btn" do
%i.fa.fa-code-fork %i.fa.fa-code-fork
Try to Fork again Try to fork again
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
issue: { assignee_id: issues_finder.assignee.try(:id), issue: { assignee_id: issues_finder.assignee.try(:id),
milestone_id: issues_finder.milestones.first.try(:id) }), milestone_id: issues_finder.milestones.first.try(:id) }),
class: "btn btn-new", class: "btn btn-new",
title: "New Issue", title: "New issue",
id: "new_issue_link" do id: "new_issue_link" do
New Issue New issue
= render 'shared/issuable/search_bar', type: :issues = render 'shared/issuable/search_bar', type: :issues
.issues-holder .issues-holder
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
- if can_remove_source_branch - if can_remove_source_branch
= link_to namespace_project_branch_path(@merge_request.source_project.namespace, @merge_request.source_project, @merge_request.source_branch), remote: true, method: :delete, class: "btn btn-default remove_source_branch" do = link_to namespace_project_branch_path(@merge_request.source_project.namespace, @merge_request.source_project, @merge_request.source_branch), remote: true, method: :delete, class: "btn btn-default remove_source_branch" do
= icon('trash-o') = icon('trash-o')
Remove Source Branch Remove source branch
- if mr_can_be_reverted - if mr_can_be_reverted
= revert_commit_link(@merge_request.merge_commit, namespace_project_merge_request_path(@project.namespace, @project, @merge_request), btn_class: "close") = revert_commit_link(@merge_request.merge_commit, namespace_project_merge_request_path(@project.namespace, @project, @merge_request), btn_class: "close")
- if mr_can_be_cherry_picked - if mr_can_be_cherry_picked
......
...@@ -10,24 +10,24 @@ ...@@ -10,24 +10,24 @@
- if @pipeline && @pipeline.active? - if @pipeline && @pipeline.active?
%span.btn-group %span.btn-group
= button_tag class: "btn btn-info js-merge-when-pipeline-succeeds-button merge-when-pipeline-succeeds" do = button_tag class: "btn btn-info js-merge-when-pipeline-succeeds-button merge-when-pipeline-succeeds" do
Merge When Pipeline Succeeds Merge when pipeline succeeds
- unless @project.only_allow_merge_if_pipeline_succeeds? - unless @project.only_allow_merge_if_pipeline_succeeds?
= button_tag class: "btn btn-info dropdown-toggle", 'data-toggle' => 'dropdown' do = button_tag class: "btn btn-info dropdown-toggle", 'data-toggle' => 'dropdown' do
= icon('caret-down') = icon('caret-down')
%span.sr-only %span.sr-only
Select Merge Moment Select merge moment
%ul.js-merge-dropdown.dropdown-menu.dropdown-menu-right{ role: 'menu' } %ul.js-merge-dropdown.dropdown-menu.dropdown-menu-right{ role: 'menu' }
%li %li
= link_to "#", class: "merge_when_pipeline_succeeds" do = link_to "#", class: "merge_when_pipeline_succeeds" do
= icon('check fw') = icon('check fw')
Merge When Pipeline Succeeds Merge when pipeline succeeds
%li %li
= link_to "#", class: "accept-merge-request" do = link_to "#", class: "accept-merge-request" do
= icon('warning fw') = icon('warning fw')
Merge Immediately Merge immediately
- else - else
= f.button class: "btn btn-grouped js-merge-button accept-merge-request" do = f.button class: "btn btn-grouped js-merge-button accept-merge-request" do
Accept Merge Request Accept merge request
- if @merge_request.force_remove_source_branch? - if @merge_request.force_remove_source_branch?
.accept-control .accept-control
The source branch will be removed. The source branch will be removed.
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
- if remove_source_branch_button - if remove_source_branch_button
= link_to merge_namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request, merge_params(@merge_request)), remote: true, method: :post, class: "btn btn-grouped btn-primary btn-sm remove_source_branch" do = link_to merge_namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request, merge_params(@merge_request)), remote: true, method: :post, class: "btn btn-grouped btn-primary btn-sm remove_source_branch" do
= icon('times') = icon('times')
Remove Source Branch When Merged Remove source branch when merged
- if user_can_cancel_automatic_merge - if user_can_cancel_automatic_merge
= link_to cancel_merge_when_pipeline_succeeds_namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request), remote: true, method: :post, class: "btn btn-grouped btn-sm" do = link_to cancel_merge_when_pipeline_succeeds_namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request), remote: true, method: :post, class: "btn btn-grouped btn-sm" do
Cancel Automatic Merge Cancel automatic merge
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
.nav-controls .nav-controls
= render 'shared/milestones_sort_dropdown' = render 'shared/milestones_sort_dropdown'
- if can?(current_user, :admin_milestone, @project) - if can?(current_user, :admin_milestone, @project)
= link_to new_namespace_project_milestone_path(@project.namespace, @project), class: 'btn btn-new', title: 'New Milestone' do = link_to new_namespace_project_milestone_path(@project.namespace, @project), class: 'btn btn-new', title: 'New milestone' do
New Milestone New milestone
.milestones .milestones
%ul.content-list %ul.content-list
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
.milestone-buttons .milestone-buttons
- if can?(current_user, :admin_milestone, @project) - if can?(current_user, :admin_milestone, @project)
- if @milestone.active? - if @milestone.active?
= link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped" = link_to 'Close milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped"
- else - else
= link_to 'Reopen Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped" = link_to 'Reopen milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped"
= link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped btn-nr" do = link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped btn-nr" do
Edit Edit
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
.note-form-actions.clearfix .note-form-actions.clearfix
.settings-message.note-edit-warning.js-edit-warning .settings-message.note-edit-warning.js-edit-warning
Finish editing this message first! Finish editing this message first!
= submit_tag 'Save Comment', class: 'btn btn-nr btn-save js-comment-button' = submit_tag 'Save comment', class: 'btn btn-nr btn-save js-comment-button'
%button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' } %button.btn.btn-nr.btn-cancel.note-edit-cancel{ type: 'button' }
Cancel Cancel
- if (@page && @page.persisted?) - if (@page && @page.persisted?)
- if can?(current_user, :create_wiki, @project) - if can?(current_user, :create_wiki, @project)
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do = link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
New Page New page
= link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do
Page History Page history
- if can?(current_user, :create_wiki, @project) && @page.latest? - if can?(current_user, :create_wiki, @project) && @page.latest?
= link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn" do = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn" do
Edit Edit
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
Tip: You can specify the full path for the new file. Tip: You can specify the full path for the new file.
We will automatically create any missing directories. We will automatically create any missing directories.
.form-actions .form-actions
= button_tag 'Create Page', class: 'build-new-wiki btn btn-create' = button_tag 'Create page', class: 'build-new-wiki btn btn-create'
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
.nav-controls .nav-controls
- if can?(current_user, :create_wiki, @project) - if can?(current_user, :create_wiki, @project)
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do = link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
New Page New page
- if @page.persisted? - if @page.persisted?
= link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do
Page History Page history
- if can?(current_user, :admin_wiki, @project) - if can?(current_user, :admin_wiki, @project)
= link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-danger" do = link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-danger" do
Delete Delete
......
- type = impersonation ? "Impersonation" : "Personal Access" - type = impersonation ? "impersonation" : "personal access"
%h5.prepend-top-0 %h5.prepend-top-0
Add a #{type} Token Add a #{type} Token
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
= render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes = render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes
.prepend-top-default .prepend-top-default
= f.submit "Create #{type} Token", class: "btn btn-create" = f.submit "Create #{type} token", class: "btn btn-create"
:javascript :javascript
var $dateField = $('.datepicker'); var $dateField = $('.datepicker');
......
...@@ -29,5 +29,5 @@ ...@@ -29,5 +29,5 @@
- if @label.persisted? - if @label.persisted?
= f.submit 'Save changes', class: 'btn btn-save js-save-button' = f.submit 'Save changes', class: 'btn btn-save js-save-button'
- else - else
= f.submit 'Create Label', class: 'btn btn-create js-save-button' = f.submit 'Create label', class: 'btn btn-create js-save-button'
= link_to 'Cancel', back_path, class: 'btn btn-cancel' = link_to 'Cancel', back_path, class: 'btn btn-cancel'
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
= f.label :enable_ssl_verification do = f.label :enable_ssl_verification do
= f.check_box :enable_ssl_verification = f.check_box :enable_ssl_verification
%strong Enable SSL verification %strong Enable SSL verification
= f.submit "Add Webhook", class: "btn btn-create" = f.submit "Add webhook", class: "btn btn-create"
%hr %hr
%h5.prepend-top-default %h5.prepend-top-default
Webhooks (#{hooks.count}) Webhooks (#{hooks.count})
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
- if current_user.two_factor_otp_enabled? - if current_user.two_factor_otp_enabled?
.row.append-bottom-10 .row.append-bottom-10
.col-md-3 .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 .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. %p Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left.
- else - else
.row.append-bottom-10 .row.append-bottom-10
.col-md-3 .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 .col-md-9
%p.text-warning You need to register a two-factor authentication app before you can set up a U2F device. %p.text-warning You need to register a two-factor authentication app before you can set up a U2F device.
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
= text_field_tag 'u2f_registration[name]', nil, class: 'form-control', placeholder: "Pick a name" = text_field_tag 'u2f_registration[name]', nil, class: 'form-control', placeholder: "Pick a name"
.col-md-3 .col-md-3
= hidden_field_tag 'u2f_registration[device_response]', nil, class: 'form-control', required: true, id: "js-device-response" = 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 :javascript
var u2fRegister = new U2FRegister($("#js-register-u2f"), gon.u2f); var u2fRegister = new U2FRegister($("#js-register-u2f"), gon.u2f);
......
---
title: Changed capitalisation of buttons across GitLab
merge_request: 10418
author:
...@@ -36,7 +36,7 @@ Feature: Project Source Browse Files ...@@ -36,7 +36,7 @@ Feature: Project Source Browse Files
And I edit code And I edit code
And I fill the new file name And I fill the new file name
And I fill the commit message 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 Then I am redirected to the new file
And I should see its new content And I should see its new content
...@@ -47,7 +47,7 @@ Feature: Project Source Browse Files ...@@ -47,7 +47,7 @@ Feature: Project Source Browse Files
And I edit code And I edit code
And I fill the new file name And I fill the new file name
And I fill the commit message 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 Then I am redirected to the fork's new merge request page
And I can see the new commit message And I can see the new commit message
...@@ -57,7 +57,7 @@ Feature: Project Source Browse Files ...@@ -57,7 +57,7 @@ Feature: Project Source Browse Files
And I edit code with new lines at end of file And I edit code with new lines at end of file
And I fill the new file name And I fill the new file name
And I fill the commit message 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 Then I am redirected to the new file
And I click button "Edit" And I click button "Edit"
And I should see its content with new lines preserved at end of file And I should see its content with new lines preserved at end of file
...@@ -69,7 +69,7 @@ Feature: Project Source Browse Files ...@@ -69,7 +69,7 @@ Feature: Project Source Browse Files
And I fill the new file name And I fill the new file name
And I fill the commit message And I fill the commit message
And I fill the new branch name 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 am redirected to the new merge request page
When I click on "Changes" tab When I click on "Changes" tab
And I should see its new content And I should see its new content
...@@ -173,7 +173,7 @@ Feature: Project Source Browse Files ...@@ -173,7 +173,7 @@ Feature: Project Source Browse Files
And I click button "Edit" And I click button "Edit"
And I edit code And I edit code
And I fill the commit message 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" Then I am redirected to the ".gitignore"
And I should see its new content And I should see its new content
...@@ -186,7 +186,7 @@ Feature: Project Source Browse Files ...@@ -186,7 +186,7 @@ Feature: Project Source Browse Files
And I click button "Fork" And I click button "Fork"
And I edit code And I edit code
And I fill the commit message 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 Then I am redirected to the fork's new merge request page
And I can see the new commit message And I can see the new commit message
...@@ -197,7 +197,7 @@ Feature: Project Source Browse Files ...@@ -197,7 +197,7 @@ Feature: Project Source Browse Files
And I edit code And I edit code
And I fill the commit message And I fill the commit message
And I fill the new branch name 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 am redirected to the new merge request page
Then I click on "Changes" tab Then I click on "Changes" tab
And I should see its new content And I should see its new content
......
...@@ -18,11 +18,11 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps ...@@ -18,11 +18,11 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
step 'I should see last push widget' do step 'I should see last push widget' do
expect(page).to have_content "You pushed to fix" 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 end
step 'I click "Create Merge Request" link' do step 'I click "Create merge request" link' do
click_link "Create Merge Request" click_link "Create merge request"
end end
step 'I see prefilled new Merge Request page' do step 'I see prefilled new Merge Request page' do
......
...@@ -3,9 +3,9 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps ...@@ -3,9 +3,9 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
include SharedPaths include SharedPaths
include SharedProject include SharedProject
step 'I click "New Project" link' do step 'I click "New project" link' do
page.within('.content') do page.within('.content') do
click_link "New Project" click_link "New project"
end end
end end
......
...@@ -46,11 +46,11 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps ...@@ -46,11 +46,11 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
end end
step 'I click new milestone button' do step 'I click new milestone button' do
click_link "New Milestone" click_link "New milestone"
end end
step 'I press create mileston button' do step 'I press create mileston button' do
click_button "Create Milestone" click_button "Create milestone"
end end
step 'milestone in each project should be created' do step 'milestone in each project should be created' do
......
...@@ -12,7 +12,7 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps ...@@ -12,7 +12,7 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
step 'I see button to CI Lint' do step 'I see button to CI Lint' do
page.within('.nav-controls') 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 expect(ci_lint_tool_link[:href]).to eq ci_lint_path
end end
end end
......
...@@ -13,7 +13,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps ...@@ -13,7 +13,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end end
step 'I click atom feed link' do step 'I click atom feed link' do
click_link "Commits Feed" click_link "Commits feed"
end end
step 'I see commits atom feed' do step 'I see commits atom feed' do
...@@ -110,16 +110,16 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps ...@@ -110,16 +110,16 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end end
step 'I see button to create a new merge request' do 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 end
step 'I should not see button to create a new merge request' do 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 end
step 'I should see button to the merge request' do step 'I should see button to the merge request' do
merge_request = MergeRequest.find_by(title: 'Feature') 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 end
step 'I see breadcrumb links' do step 'I see breadcrumb links' do
......
...@@ -26,7 +26,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps ...@@ -26,7 +26,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end end
step 'I click \'New Deploy Key\'' do step 'I click \'New Deploy Key\'' do
click_link 'New Deploy Key' click_link 'New deploy key'
end end
step 'I submit new deploy key' do step 'I submit new deploy key' do
......
...@@ -25,14 +25,14 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps ...@@ -25,14 +25,14 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
step 'I submit new hook' do step 'I submit new hook' do
@url = 'http://example.org/1' @url = 'http://example.org/1'
fill_in "hook_url", with: @url 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 end
step 'I submit new hook with SSL verification enabled' do step 'I submit new hook with SSL verification enabled' do
@url = 'http://example.org/2' @url = 'http://example.org/2'
fill_in "hook_url", with: @url fill_in "hook_url", with: @url
check "hook_enable_ssl_verification" 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 end
step 'I should see newly created hook' do step 'I should see newly created hook' do
......
...@@ -61,7 +61,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps ...@@ -61,7 +61,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
expect(page).to have_content "Tweet control" expect(page).to have_content "Tweet control"
end 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') page.has_link?('New Issue') ? click_link('New Issue') : click_link('New issue')
end end
......
...@@ -31,19 +31,19 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps ...@@ -31,19 +31,19 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
step 'I submit new label \'support\'' do step 'I submit new label \'support\'' do
fill_in 'Title', with: 'support' fill_in 'Title', with: 'support'
fill_in 'Background color', with: '#F95610' fill_in 'Background color', with: '#F95610'
click_button 'Create Label' click_button 'Create label'
end end
step 'I submit new label \'bug\'' do step 'I submit new label \'bug\'' do
fill_in 'Title', with: 'bug' fill_in 'Title', with: 'bug'
fill_in 'Background color', with: '#F95610' fill_in 'Background color', with: '#F95610'
click_button 'Create Label' click_button 'Create label'
end end
step 'I submit new label with invalid color' do step 'I submit new label with invalid color' do
fill_in 'Title', with: 'support' fill_in 'Title', with: 'support'
fill_in 'Background color', with: '#12' fill_in 'Background color', with: '#12'
click_button 'Create Label' click_button 'Create label'
end end
step 'I should see label label exist error message' do step 'I should see label label exist error message' do
......
...@@ -16,7 +16,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps ...@@ -16,7 +16,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps
end end
step 'I click link "New Milestone"' do step 'I click link "New Milestone"' do
click_link "New Milestone" click_link "New milestone"
end end
step 'I submit new milestone "v2.3"' do step 'I submit new milestone "v2.3"' do
......
...@@ -300,10 +300,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -300,10 +300,10 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
page.within('.current-note-edit-form', visible: true) do page.within('.current-note-edit-form', visible: true) do
fill_in 'note_note', with: 'Typo, please fix' fill_in 'note_note', with: 'Typo, please fix'
click_button 'Save Comment' click_button 'Save comment'
end 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
end end
...@@ -378,7 +378,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -378,7 +378,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end end
step 'merge request is mergeable' do step 'merge request is mergeable' do
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
step 'I modify merge commit message' do step 'I modify merge commit message' do
...@@ -392,7 +392,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -392,7 +392,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I accept this merge request' do step 'I accept this merge request' do
page.within '.mr-state-widget' do page.within '.mr-state-widget' do
click_button "Accept Merge Request" click_button "Accept merge request"
end end
end end
......
...@@ -15,15 +15,15 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps ...@@ -15,15 +15,15 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
end end
step 'I click on Accept Merge Request' do step 'I click on Accept Merge Request' do
click_button('Accept Merge Request') click_button('Accept merge request')
end end
step 'I should see the Remove Source Branch button' do 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 end
step 'I should not see the Remove Source Branch button' do 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 end
step 'There is an open Merge Request' do step 'There is an open Merge Request' do
......
...@@ -26,7 +26,7 @@ class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps ...@@ -26,7 +26,7 @@ class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps
end end
step 'I click on Accept Merge Request' do step 'I click on Accept Merge Request' do
click_button('Accept Merge Request') click_button('Accept merge request')
end end
step 'I am signed in as a developer of the project' do step 'I am signed in as a developer of the project' do
......
...@@ -9,7 +9,7 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps ...@@ -9,7 +9,7 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps
end end
step 'I click Find File button' do step 'I click Find File button' do
click_link 'Find File' click_link 'Find file'
end end
step 'I should see "find file" page' do step 'I should see "find file" page' do
......
...@@ -105,11 +105,11 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -105,11 +105,11 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end end
step 'I click link "Diff"' do step 'I click link "Diff"' do
click_link 'Preview Changes' click_link 'Preview changes'
end end
step 'I click on "Commit Changes"' do step 'I click on "Commit changes"' do
click_button 'Commit Changes' click_button 'Commit changes'
end end
step 'I click on "Changes" tab' do step 'I click on "Changes" tab' do
......
...@@ -214,7 +214,9 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps ...@@ -214,7 +214,9 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step 'I add various links to the wiki page' do 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[content]", with: "[test](test)\n[GitLab API doc](api)\n[Rake tasks](raketasks)\n"
fill_in "wiki[message]", with: "Adding links to wiki" fill_in "wiki[message]", with: "Adding links to wiki"
click_button "Create page" page.within '.wiki-form' do
click_button "Create page"
end
end end
step 'Wiki page should have added links' do step 'Wiki page should have added links' do
...@@ -225,7 +227,9 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps ...@@ -225,7 +227,9 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step 'I add a header to the wiki page' do step 'I add a header to the wiki page' do
fill_in "wiki[content]", with: "# Wiki header\n" fill_in "wiki[content]", with: "# Wiki header\n"
fill_in "wiki[message]", with: "Add header to wiki" fill_in "wiki[message]", with: "Add header to wiki"
click_button "Create page" page.within '.wiki-form' do
click_button "Create page"
end
end end
step 'Wiki header should have correct id and link' do step 'Wiki header should have correct id and link' do
......
...@@ -16,12 +16,16 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps ...@@ -16,12 +16,16 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
step 'I create the Wiki Home page' do step 'I create the Wiki Home page' do
fill_in "wiki_content", with: '[link test](test)' fill_in "wiki_content", with: '[link test](test)'
click_on "Create page" page.within '.wiki-form' do
click_on "Create page"
end
end end
step 'I create the Wiki Home page with no content' do step 'I create the Wiki Home page with no content' do
fill_in "wiki_content", with: '' fill_in "wiki_content", with: ''
click_on "Create page" page.within '.wiki-form' do
click_on "Create page"
end
end end
step 'I should see the newly created wiki page' do step 'I should see the newly created wiki page' do
...@@ -29,7 +33,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps ...@@ -29,7 +33,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
expect(page).to have_content "link test" expect(page).to have_content "link test"
click_link "link test" click_link "link test"
expect(page).to have_content "Create Page" expect(page).to have_content "Create page"
end end
step 'I have an existing Wiki page' do step 'I have an existing Wiki page' do
...@@ -63,7 +67,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps ...@@ -63,7 +67,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end end
step 'I click the History button' do step 'I click the History button' do
click_on "History" click_on 'Page history'
end end
step 'I should see both revisions' do step 'I should see both revisions' do
...@@ -121,15 +125,19 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps ...@@ -121,15 +125,19 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
step 'I should see the new wiki page form' do step 'I should see the new wiki page form' do
expect(current_path).to match('wikis/image.jpg') expect(current_path).to match('wikis/image.jpg')
expect(page).to have_content('New Wiki Page') expect(page).to have_content('New Wiki Page')
expect(page).to have_content('Create Page') expect(page).to have_content('Create page')
end end
step 'I create a New page with paths' do 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' 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' 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' expect(current_path).to include 'one/two/three-test'
end end
...@@ -154,11 +162,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps ...@@ -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 step 'I view the page history of a Wiki page that has a path' do
click_on 'Three' click_on 'Three'
click_on 'Page History' click_on 'Page history'
end end
step 'I click on Page History' do step 'I click on Page History' do
click_on 'Page History' click_on 'Page history'
end end
step 'I should see the page history' do step 'I should see the page history' do
......
...@@ -141,7 +141,7 @@ module SharedNote ...@@ -141,7 +141,7 @@ module SharedNote
page.within(".current-note-edit-form") do page.within(".current-note-edit-form") do
fill_in 'note[note]', with: '+1 Awesome!' fill_in 'note[note]', with: '+1 Awesome!'
click_button 'Save Comment' click_button 'Save comment'
end end
end end
......
...@@ -18,7 +18,7 @@ RSpec.describe 'admin deploy keys', type: :feature do ...@@ -18,7 +18,7 @@ RSpec.describe 'admin deploy keys', type: :feature do
describe 'create new deploy key' do describe 'create new deploy key' do
before do before do
visit admin_deploy_keys_path visit admin_deploy_keys_path
click_link 'New Deploy Key' click_link 'New deploy key'
end end
it 'creates new deploy key' do it 'creates new deploy key' do
......
...@@ -24,7 +24,7 @@ feature 'Admin Groups', feature: true do ...@@ -24,7 +24,7 @@ feature 'Admin Groups', feature: true do
it 'creates new group' do it 'creates new group' do
visit admin_groups_path visit admin_groups_path
click_link "New Group" click_link "New group"
fill_in 'group_path', with: 'gitlab' fill_in 'group_path', with: 'gitlab'
fill_in 'group_description', with: 'Group description' fill_in 'group_description', with: 'Group description'
click_button "Create group" click_button "Create group"
......
...@@ -33,7 +33,7 @@ describe "Admin::Hooks", feature: true do ...@@ -33,7 +33,7 @@ describe "Admin::Hooks", feature: true do
fill_in 'hook_url', with: url fill_in 'hook_url', with: url
check 'Enable SSL verification' 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(page).to have_content 'SSL Verification: enabled'
expect(current_path).to eq(admin_hooks_path) expect(current_path).to eq(admin_hooks_path)
expect(page).to have_content(url) expect(page).to have_content(url)
...@@ -44,7 +44,7 @@ describe "Admin::Hooks", feature: true do ...@@ -44,7 +44,7 @@ describe "Admin::Hooks", feature: true do
before do before do
WebMock.stub_request(:post, @system_hook.url) WebMock.stub_request(:post, @system_hook.url)
visit admin_hooks_path visit admin_hooks_path
click_link "Test Hook" click_link "Test hook"
end end
it { expect(current_path).to eq(admin_hooks_path) } it { expect(current_path).to eq(admin_hooks_path) }
......
...@@ -8,7 +8,7 @@ RSpec.describe 'admin manage applications', feature: true do ...@@ -8,7 +8,7 @@ RSpec.describe 'admin manage applications', feature: true do
it do it do
visit admin_applications_path visit admin_applications_path
click_on 'New Application' click_on 'New application'
expect(page).to have_content('New application') expect(page).to have_content('New application')
fill_in :doorkeeper_application_name, with: 'test' fill_in :doorkeeper_application_name, with: 'test'
......
...@@ -30,7 +30,7 @@ describe 'Admin > Users > Impersonation Tokens', feature: true, js: true do ...@@ -30,7 +30,7 @@ describe 'Admin > Users > Impersonation Tokens', feature: true, js: true do
check "api" check "api"
check "read_user" 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(name)
expect(active_impersonation_tokens).to have_text('In') expect(active_impersonation_tokens).to have_text('In')
expect(active_impersonation_tokens).to have_text('api') expect(active_impersonation_tokens).to have_text('api')
......
...@@ -56,7 +56,7 @@ describe 'Auto deploy' do ...@@ -56,7 +56,7 @@ describe 'Auto deploy' do
click_on 'OpenShift' click_on 'OpenShift'
end end
wait_for_ajax wait_for_ajax
click_button 'Commit Changes' click_button 'Commit changes'
expect(page).to have_content('New Merge Request From auto-deploy into master') expect(page).to have_content('New Merge Request From auto-deploy into master')
end end
......
...@@ -7,7 +7,7 @@ RSpec.describe 'Dashboard Group', feature: true do ...@@ -7,7 +7,7 @@ RSpec.describe 'Dashboard Group', feature: true do
it 'creates new grpup' do it 'creates new grpup' do
visit dashboard_groups_path visit dashboard_groups_path
click_link 'New Group' click_link 'New group'
fill_in 'group_path', with: 'Samurai' fill_in 'group_path', with: 'Samurai'
fill_in 'group_description', with: 'Tokugawa Shogunate' fill_in 'group_description', with: 'Tokugawa Shogunate'
......
...@@ -153,7 +153,7 @@ feature 'Group', feature: true do ...@@ -153,7 +153,7 @@ feature 'Group', feature: true do
end end
it 'removes group' do it 'removes group' do
click_link 'Remove Group' click_link 'Remove group'
expect(page).to have_content "scheduled for deletion" expect(page).to have_content "scheduled for deletion"
end end
......
...@@ -19,7 +19,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru ...@@ -19,7 +19,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it 'does not allow to merge' do it 'does not allow to merge' do
visit_merge_request(merge_request) 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') expect(page).to have_content('This merge request has unresolved discussions')
end end
end end
...@@ -32,7 +32,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru ...@@ -32,7 +32,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it 'allows MR to be merged' do it 'allows MR to be merged' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
end end
end end
...@@ -46,7 +46,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru ...@@ -46,7 +46,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it 'does not allow to merge' do it 'does not allow to merge' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
end end
...@@ -58,7 +58,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru ...@@ -58,7 +58,7 @@ feature 'Check if mergeable with unresolved discussions', js: true, feature: tru
it 'allows MR to be merged' do it 'allows MR to be merged' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
end end
end end
......
...@@ -26,7 +26,7 @@ feature 'Create New Merge Request', feature: true, js: true do ...@@ -26,7 +26,7 @@ feature 'Create New Merge Request', feature: true, js: true do
end end
it 'selects the target branch sha when a tag with the same name exists' do 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' click_link 'New merge request'
......
...@@ -32,7 +32,7 @@ feature 'Merge immediately', :feature, :js do ...@@ -32,7 +32,7 @@ feature 'Merge immediately', :feature, :js do
page.within '.mr-widget-body' do page.within '.mr-widget-body' do
find('.dropdown-toggle').click 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') expect(find('.js-merge-when-pipeline-succeeds-button')).to have_content('Merge in progress')
......
...@@ -28,25 +28,25 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do ...@@ -28,25 +28,25 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
visit_merge_request(merge_request) visit_merge_request(merge_request)
end end
it 'displays the Merge When Pipeline Succeeds button' do it 'displays the Merge when pipeline succeeds button' do
expect(page).to have_button "Merge When Pipeline Succeeds" expect(page).to have_button "Merge when pipeline succeeds"
end end
describe 'enabling Merge When Pipeline Succeeds' do describe 'enabling Merge when pipeline succeeds' do
shared_examples 'Merge When Pipeline Succeeds activator' do shared_examples 'Merge when pipeline succeeds activator' do
it 'activates the Merge When Pipeline Succeeds feature' do it 'activates the Merge when pipeline succeeds feature' do
click_button "Merge When Pipeline Succeeds" 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 "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_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 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 expect(page).to have_content /enabled an automatic merge when the pipeline for \h{8} succeeds/i
end end
end end
context "when enabled immediately" do context "when enabled immediately" do
it_behaves_like 'Merge When Pipeline Succeeds activator' it_behaves_like 'Merge when pipeline succeeds activator'
end end
context 'when enabled after pipeline status changed' do context 'when enabled after pipeline status changed' do
...@@ -60,16 +60,16 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do ...@@ -60,16 +60,16 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
expect(page).to have_content "Pipeline ##{pipeline.id} running" expect(page).to have_content "Pipeline ##{pipeline.id} running"
end end
it_behaves_like 'Merge When Pipeline Succeeds activator' it_behaves_like 'Merge when pipeline succeeds activator'
end end
context 'when enabled after it was previously canceled' do context 'when enabled after it was previously canceled' do
before do before do
click_button "Merge When Pipeline Succeeds" click_button "Merge when pipeline succeeds"
click_link "Cancel Automatic Merge" click_link "Cancel automatic merge"
end end
it_behaves_like 'Merge When Pipeline Succeeds activator' it_behaves_like 'Merge when pipeline succeeds activator'
end end
context 'when it was enabled and then canceled' do context 'when it was enabled and then canceled' do
...@@ -83,10 +83,10 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do ...@@ -83,10 +83,10 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
end end
before do before do
click_link "Cancel Automatic Merge" click_link "Cancel automatic merge"
end end
it_behaves_like 'Merge When Pipeline Succeeds activator' it_behaves_like 'Merge when pipeline succeeds activator'
end end
end end
end end
...@@ -110,18 +110,18 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do ...@@ -110,18 +110,18 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
end end
it 'allows to cancel the automatic merge' do 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 visit_merge_request(merge_request) # refresh the page
expect(page).to have_content "canceled the automatic merge" expect(page).to have_content "canceled the automatic merge"
end end
it "allows the user to remove the source branch" do 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" expect(page).to have_content "The source branch will be removed"
end end
...@@ -141,7 +141,7 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do ...@@ -141,7 +141,7 @@ feature 'Merge When Pipeline Succeeds', :feature, :js do
it "does not allow to enable merge when pipeline succeeds" do it "does not allow to enable merge when pipeline succeeds" do
visit_merge_request(merge_request) 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
end end
......
...@@ -14,7 +14,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -14,7 +14,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do it 'allows MR to be merged' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
end end
...@@ -38,8 +38,8 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -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 it 'does not allow to merge immediately' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Merge When Pipeline Succeeds' expect(page).to have_button 'Merge when pipeline succeeds'
expect(page).not_to have_button 'Select Merge Moment' expect(page).not_to have_button 'Select merge moment'
end end
end end
...@@ -49,7 +49,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -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 it 'does not allow MR to be merged' do
visit_merge_request(merge_request) 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.') expect(page).to have_content('Please retry the job or push a new commit to fix the failure.')
end end
end end
...@@ -60,7 +60,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -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 it 'does not allow MR to be merged' do
visit_merge_request(merge_request) 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.') expect(page).to have_content('Please retry the job or push a new commit to fix the failure.')
end end
end end
...@@ -71,7 +71,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -71,7 +71,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do it 'allows MR to be merged' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
end end
...@@ -81,7 +81,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -81,7 +81,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do it 'allows MR to be merged' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
end end
end end
...@@ -97,10 +97,10 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -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 it 'allows MR to be merged immediately', js: true do
visit_merge_request(merge_request) 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' click_button 'Select merge moment'
expect(page).to have_content 'Merge Immediately' expect(page).to have_content 'Merge immediately'
end end
end end
...@@ -110,7 +110,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -110,7 +110,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do it 'allows MR to be merged' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
end end
...@@ -120,7 +120,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu ...@@ -120,7 +120,7 @@ feature 'Only allow merge requests to be merged if the pipeline succeeds', featu
it 'allows MR to be merged' do it 'allows MR to be merged' do
visit_merge_request(merge_request) visit_merge_request(merge_request)
expect(page).to have_button 'Accept Merge Request' expect(page).to have_button 'Accept merge request'
end end
end end
end end
......
...@@ -145,7 +145,7 @@ describe 'Merge request', :feature, :js do ...@@ -145,7 +145,7 @@ describe 'Merge request', :feature, :js do
before do before do
allow_any_instance_of(Repository).to receive(:merge).and_return(false) allow_any_instance_of(Repository).to receive(:merge).and_return(false)
visit namespace_project_merge_request_path(project.namespace, project, merge_request) visit namespace_project_merge_request_path(project.namespace, project, merge_request)
click_button 'Accept Merge Request' click_button 'Accept merge request'
wait_for_ajax wait_for_ajax
end end
......
...@@ -41,7 +41,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do ...@@ -41,7 +41,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do
check "api" check "api"
check "read_user" 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(name)
expect(active_personal_access_tokens).to have_text('In') expect(active_personal_access_tokens).to have_text('In')
expect(active_personal_access_tokens).to have_text('api') expect(active_personal_access_tokens).to have_text('api')
...@@ -54,7 +54,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do ...@@ -54,7 +54,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do
visit profile_personal_access_tokens_path visit profile_personal_access_tokens_path
fill_in "Name", with: 'My PAT' 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") expect(page).to have_content("Name cannot be nil")
end end
end end
......
...@@ -22,7 +22,7 @@ feature 'Editing file blob', feature: true, js: true do ...@@ -22,7 +22,7 @@ feature 'Editing file blob', feature: true, js: true do
wait_for_ajax wait_for_ajax
find('.js-edit-blob').click find('.js-edit-blob').click
execute_script('ace.edit("editor").setValue("class NextFeature\nend\n")') execute_script('ace.edit("editor").setValue("class NextFeature\nend\n")')
click_button 'Commit Changes' click_button 'Commit changes'
end end
context 'from MR diff' do context 'from MR diff' do
......
...@@ -22,7 +22,7 @@ feature 'New blob creation', feature: true, js: true do ...@@ -22,7 +22,7 @@ feature 'New blob creation', feature: true, js: true do
end end
def commit_file def commit_file
click_button 'Commit Changes' click_button 'Commit changes'
end end
context 'with default target branch' do context 'with default target branch' do
......
...@@ -19,7 +19,7 @@ feature 'User wants to create a file', feature: true do ...@@ -19,7 +19,7 @@ feature 'User wants to create a file', feature: true do
file_content = find('#file-content') file_content = find('#file-content')
file_content.set options[:file_content] || 'Some content' file_content.set options[:file_content] || 'Some content'
click_button 'Commit Changes' click_button 'Commit changes'
end end
scenario 'file name contains Chinese characters' do scenario 'file name contains Chinese characters' do
......
...@@ -27,7 +27,7 @@ feature 'User wants to edit a file', feature: true 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 scenario 'file has been updated since the user opened the edit page' do
Files::UpdateService.new(project, user, commit_params).execute 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.' expect(page).to have_content 'Someone edited the file the same time you did.'
end end
......
...@@ -29,7 +29,7 @@ feature 'project owner creates a license file', feature: true, js: true do ...@@ -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}") 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 fill_in :commit_message, with: 'Add a LICENSE file', visible: true
click_button 'Commit Changes' click_button 'Commit changes'
expect(current_path).to eq( expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE')) 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 ...@@ -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}") 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 fill_in :commit_message, with: 'Add a LICENSE file', visible: true
click_button 'Commit Changes' click_button 'Commit changes'
expect(current_path).to eq( expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE')) 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 ...@@ -63,7 +63,7 @@ feature 'project owner creates a license file', feature: true, js: true do
def select_template(template) def select_template(template)
page.within('.js-license-selector-wrap') do page.within('.js-license-selector-wrap') do
click_button 'Apply a License template' click_button 'Apply a license template'
click_link template click_link template
wait_for_ajax wait_for_ajax
end end
......
...@@ -30,7 +30,7 @@ feature 'project owner sees a link to create a license file in empty project', f ...@@ -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 fill_in :commit_message, with: 'Add a LICENSE file', visible: true
# Remove pre-receive hook so we can push without auth # Remove pre-receive hook so we can push without auth
FileUtils.rm_f(File.join(project.repository.path, 'hooks', 'pre-receive')) FileUtils.rm_f(File.join(project.repository.path, 'hooks', 'pre-receive'))
click_button 'Commit Changes' click_button 'Commit changes'
expect(current_path).to eq( expect(current_path).to eq(
namespace_project_blob_path(project.namespace, project, 'master/LICENSE')) 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 ...@@ -40,7 +40,7 @@ feature 'project owner sees a link to create a license file in empty project', f
def select_template(template) def select_template(template)
page.within('.js-license-selector-wrap') do page.within('.js-license-selector-wrap') do
click_button 'Apply a License template' click_button 'Apply a license template'
click_link template click_link template
wait_for_ajax wait_for_ajax
end end
......
...@@ -48,7 +48,7 @@ feature 'Template type dropdown selector', js: true do ...@@ -48,7 +48,7 @@ feature 'Template type dropdown selector', js: true do
context 'user previews changes' do context 'user previews changes' do
before do before do
click_link 'Preview Changes' click_link 'Preview changes'
end end
scenario 'type selector is hidden and shown correctly' do scenario 'type selector is hidden and shown correctly' do
...@@ -102,7 +102,7 @@ def check_type_selector_display(is_visible) ...@@ -102,7 +102,7 @@ def check_type_selector_display(is_visible)
end end
def try_selecting_all_types 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('Dockerfile', 'Apply a Dockerfile template')
try_selecting_template_type('.gitlab-ci.yml', 'Apply a GitLab CI Yaml template') try_selecting_template_type('.gitlab-ci.yml', 'Apply a GitLab CI Yaml template')
try_selecting_template_type('.gitignore', 'Apply a .gitignore template') try_selecting_template_type('.gitignore', 'Apply a .gitignore template')
...@@ -130,6 +130,6 @@ end ...@@ -130,6 +130,6 @@ end
def create_and_edit_file(file_name) def create_and_edit_file(file_name)
visit namespace_project_new_blob_path(project.namespace, project, 'master', file_name: 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)) visit namespace_project_edit_blob_path(project.namespace, project, File.join(project.default_branch, file_name))
end end
...@@ -17,7 +17,7 @@ feature 'Template Undo Button', js: true do ...@@ -17,7 +17,7 @@ feature 'Template Undo Button', js: true do
end end
scenario 'reverts template application' do 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 end
...@@ -29,7 +29,7 @@ feature 'Template Undo Button', js: true do ...@@ -29,7 +29,7 @@ feature 'Template Undo Button', js: true do
end end
scenario 'reverts template application' do 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 end
end end
......
require 'spec_helper' require 'spec_helper'
feature 'Merge Request button', feature: true do 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(:user) { create(:user) }
let(:project) { create(:project, :public) } let(:project) { create(:project, :public) }
let(:forked_project) { create(:project, :public, forked_from_project: project) } let(:forked_project) { create(:project, :public, forked_from_project: project) }
context 'not logged in' do 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 visit url
within("#content-body") do within("#content-body") do
...@@ -22,7 +22,7 @@ feature 'Merge Request button', feature: true do ...@@ -22,7 +22,7 @@ feature 'Merge Request button', feature: true do
project.team << [user, :developer] project.team << [user, :developer]
end end
it 'shows Create Merge Request button' do it 'shows Create merge request button' do
href = new_namespace_project_merge_request_path(project.namespace, href = new_namespace_project_merge_request_path(project.namespace,
project, project,
merge_request: { source_branch: 'feature', merge_request: { source_branch: 'feature',
...@@ -40,7 +40,7 @@ feature 'Merge Request button', feature: true do ...@@ -40,7 +40,7 @@ feature 'Merge Request button', feature: true do
project.project_feature.update!(merge_requests_access_level: ProjectFeature::DISABLED) project.project_feature.update!(merge_requests_access_level: ProjectFeature::DISABLED)
end end
it 'does not show Create Merge Request button' do it 'does not show Create merge request button' do
visit url visit url
within("#content-body") do within("#content-body") do
...@@ -55,7 +55,7 @@ feature 'Merge Request button', feature: true do ...@@ -55,7 +55,7 @@ feature 'Merge Request button', feature: true do
login_as(user) login_as(user)
end end
it 'does not show Create Merge Request button' do it 'does not show Create merge request button' do
visit url visit url
within("#content-body") do within("#content-body") do
...@@ -66,7 +66,7 @@ feature 'Merge Request button', feature: true do ...@@ -66,7 +66,7 @@ feature 'Merge Request button', feature: true do
context 'on own fork of project' do context 'on own fork of project' do
let(:user) { forked_project.owner } 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, href = new_namespace_project_merge_request_path(forked_project.namespace,
forked_project, forked_project,
merge_request: { source_branch: 'feature', merge_request: { source_branch: 'feature',
...@@ -83,24 +83,24 @@ feature 'Merge Request button', feature: true do ...@@ -83,24 +83,24 @@ feature 'Merge Request button', feature: true do
end end
context 'on branches page' do context 'on branches page' do
it_behaves_like 'Merge Request button only shown when allowed' do it_behaves_like 'Merge request button only shown when allowed' do
let(:label) { 'Merge Request' } let(:label) { 'Merge request' }
let(:url) { namespace_project_branches_path(project.namespace, project) } let(:url) { namespace_project_branches_path(project.namespace, project) }
let(:fork_url) { namespace_project_branches_path(forked_project.namespace, forked_project) } let(:fork_url) { namespace_project_branches_path(forked_project.namespace, forked_project) }
end end
end end
context 'on compare page' do context 'on compare page' do
it_behaves_like 'Merge Request button only shown when allowed' do it_behaves_like 'Merge request button only shown when allowed' do
let(:label) { 'Create Merge Request' } let(:label) { 'Create merge request' }
let(:url) { namespace_project_compare_path(project.namespace, project, from: 'master', to: 'feature') } 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') } let(:fork_url) { namespace_project_compare_path(forked_project.namespace, forked_project, from: 'master', to: 'feature') }
end end
end end
context 'on commits page' do context 'on commits page' do
it_behaves_like 'Merge Request button only shown when allowed' do it_behaves_like 'Merge request button only shown when allowed' do
let(:label) { 'Create Merge Request' } let(:label) { 'Create merge request' }
let(:url) { namespace_project_commits_path(project.namespace, project, 'feature') } let(:url) { namespace_project_commits_path(project.namespace, project, 'feature') }
let(:fork_url) { namespace_project_commits_path(forked_project.namespace, forked_project, 'feature') } let(:fork_url) { namespace_project_commits_path(forked_project.namespace, forked_project, 'feature') }
end end
......
This diff is collapsed.
This diff is collapsed.
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