Commit 69d02e73 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 6014b4ea 2a35791a
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
:disabled="isDisabled" :disabled="isDisabled"
type="checkbox" type="checkbox"
name="squash" name="squash"
class="qa-squash-checkbox" class="qa-squash-checkbox js-squash-checkbox"
@change="$emit('input', $event.target.checked)" @change="$emit('input', $event.target.checked)"
/> />
{{ __('Squash commits') }} {{ __('Squash commits') }}
......
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
:cursor-offset="4" :cursor-offset="4"
:tag-content="lineContent" :tag-content="lineContent"
icon="doc-code" icon="doc-code"
class="qa-suggestion-btn" class="qa-suggestion-btn js-suggestion-btn"
@click="handleSuggestDismissed" @click="handleSuggestDismissed"
/> />
<gl-popover <gl-popover
......
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
<template> <template>
<div class="md-suggestion"> <div class="md-suggestion">
<suggestion-diff-header <suggestion-diff-header
class="qa-suggestion-diff-header" class="qa-suggestion-diff-header js-suggestion-diff-header"
:can-apply="suggestion.appliable && suggestion.current_user.can_apply && !disabled" :can-apply="suggestion.appliable && suggestion.current_user.can_apply && !disabled"
:is-applied="suggestion.applied" :is-applied="suggestion.applied"
:help-page-path="helpPagePath" :help-page-path="helpPagePath"
......
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
<template> <template>
<div class="md-suggestion-header border-bottom-0 mt-2"> <div class="md-suggestion-header border-bottom-0 mt-2">
<div class="qa-suggestion-diff-header font-weight-bold"> <div class="qa-suggestion-diff-header js-suggestion-diff-header font-weight-bold">
{{ __('Suggested change') }} {{ __('Suggested change') }}
<a v-if="helpPagePath" :href="helpPagePath" :aria-label="__('Help')" class="js-help-btn"> <a v-if="helpPagePath" :href="helpPagePath" :aria-label="__('Help')" class="js-help-btn">
<icon name="question-o" css-classes="link-highlight" /> <icon name="question-o" css-classes="link-highlight" />
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
<gl-button <gl-button
v-else-if="canApply" v-else-if="canApply"
v-gl-tooltip.viewport="__('This also resolves the discussion')" v-gl-tooltip.viewport="__('This also resolves the discussion')"
class="btn-inverted qa-apply-btn" class="btn-inverted qa-apply-btn js-apply-btn"
:disabled="isApplying" :disabled="isApplying"
variant="success" variant="success"
@click="applySuggestion" @click="applySuggestion"
......
...@@ -212,7 +212,7 @@ module SortingHelper ...@@ -212,7 +212,7 @@ module SortingHelper
end end
def sort_direction_button(reverse_url, reverse_sort, sort_value) def sort_direction_button(reverse_url, reverse_sort, sort_value)
link_class = 'btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort' link_class = 'btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort rspec-reverse-sort'
icon = sort_direction_icon(sort_value) icon = sort_direction_icon(sort_value)
url = reverse_url url = reverse_url
......
...@@ -50,7 +50,7 @@ module WikiHelper ...@@ -50,7 +50,7 @@ module WikiHelper
def wiki_sort_controls(project, sort, direction) def wiki_sort_controls(project, sort, direction)
sort ||= ProjectWiki::TITLE_ORDER sort ||= ProjectWiki::TITLE_ORDER
link_class = 'btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort' link_class = 'btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort rspec-reverse-sort'
reversed_direction = direction == 'desc' ? 'asc' : 'desc' reversed_direction = direction == 'desc' ? 'asc' : 'desc'
icon_class = direction == 'desc' ? 'highest' : 'lowest' icon_class = direction == 'desc' ? 'highest' : 'lowest'
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
= @project.name = @project.name
%ul.sidebar-top-level-items %ul.sidebar-top-level-items
= nav_link(path: sidebar_projects_paths, html_options: { class: 'home' }) do = nav_link(path: sidebar_projects_paths, html_options: { class: 'home' }) do
= link_to project_path(@project), class: 'shortcuts-project', data: { qa_selector: 'project_link' } do = link_to project_path(@project), class: 'shortcuts-project rspec-project-link', data: { qa_selector: 'project_link' } do
.nav-icon-container .nav-icon-container
= sprite_icon('home') = sprite_icon('home')
%span.nav-item-name %span.nav-item-name
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
- if project_nav_tab? :pipelines - if project_nav_tab? :pipelines
= nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts]) do = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts]) do
= link_to project_pipelines_path(@project), class: 'shortcuts-pipelines qa-link-pipelines' do = link_to project_pipelines_path(@project), class: 'shortcuts-pipelines qa-link-pipelines rspec-link-pipelines' do
.nav-icon-container .nav-icon-container
= sprite_icon('rocket') = sprite_icon('rocket')
%span.nav-item-name#js-onboarding-pipelines-link %span.nav-item-name#js-onboarding-pipelines-link
......
...@@ -89,10 +89,10 @@ ...@@ -89,10 +89,10 @@
.col-lg-8 .col-lg-8
.row .row
- if @user.read_only_attribute?(:name) - if @user.read_only_attribute?(:name)
= f.text_field :name, required: true, readonly: true, wrapper: { class: 'col-md-9 qa-full-name' }, = f.text_field :name, required: true, readonly: true, wrapper: { class: 'col-md-9 qa-full-name rspec-full-name' },
help: s_("Profiles|Your name was automatically set based on your %{provider_label} account, so people you know can recognize you") % { provider_label: attribute_provider_label(:name) } help: s_("Profiles|Your name was automatically set based on your %{provider_label} account, so people you know can recognize you") % { provider_label: attribute_provider_label(:name) }
- else - else
= f.text_field :name, label: s_('Profiles|Full name'), required: true, title: s_("Profiles|Using emojis in names seems fun, but please try to set a status message instead"), wrapper: { class: 'col-md-9 qa-full-name' }, help: s_("Profiles|Enter your name, so people you know can recognize you") = f.text_field :name, label: s_('Profiles|Full name'), required: true, title: s_("Profiles|Using emojis in names seems fun, but please try to set a status message instead"), wrapper: { class: 'col-md-9 qa-full-name rspec-full-name' }, help: s_("Profiles|Enter your name, so people you know can recognize you")
= f.text_field :id, readonly: true, label: s_('Profiles|User ID'), wrapper: { class: 'col-md-3' } = f.text_field :id, readonly: true, label: s_('Profiles|User ID'), wrapper: { class: 'col-md-3' }
= render_if_exists 'profiles/email_settings', form: f = render_if_exists 'profiles/email_settings', form: f
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
.js-project-permissions-form .js-project-permissions-form
= f.submit _('Save changes'), class: "btn btn-success" = f.submit _('Save changes'), class: "btn btn-success"
%section.qa-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] } %section.qa-merge-request-settings.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] }
.settings-header .settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests') %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') %button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' } %input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' }
= render 'projects/merge_request_settings', form: f = render 'projects/merge_request_settings', form: f
= f.submit _('Save changes'), class: "btn btn-success qa-save-merge-request-changes" = f.submit _('Save changes'), class: "btn btn-success qa-save-merge-request-changes rspec-save-merge-request-changes"
= render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded = render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded
......
.badge.badge-warning.qa-disabled-mirror-badge{ data: { toggle: 'tooltip', html: 'true' }, title: _('Disabled mirrors can only be enabled by instance owners. It is recommended that you delete them.') }= _('Disabled') .badge.badge-warning.qa-disabled-mirror-badge.rspec-disabled-mirror-badge{ data: { toggle: 'tooltip', html: 'true' }, title: _('Disabled mirrors can only be enabled by instance owners. It is recommended that you delete them.') }= _('Disabled')
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
= render_if_exists 'projects/mirrors/table_pull_row' = render_if_exists 'projects/mirrors/table_pull_row'
- @project.remote_mirrors.each_with_index do |mirror, index| - @project.remote_mirrors.each_with_index do |mirror, index|
- next if mirror.new_record? - next if mirror.new_record?
%tr.qa-mirrored-repository-row{ class: ('bg-secondary' if mirror.disabled?) } %tr.qa-mirrored-repository-row.rspec-mirrored-repository-row{ class: ('bg-secondary' if mirror.disabled?) }
%td.qa-mirror-repository-url= mirror.safe_url %td.qa-mirror-repository-url= mirror.safe_url
%td= _('Push') %td= _('Push')
%td.qa-mirror-last-update-at= mirror.last_update_at.present? ? time_ago_with_tooltip(mirror.last_update_at) : _('Never') %td.qa-mirror-last-update-at= mirror.last_update_at.present? ? time_ago_with_tooltip(mirror.last_update_at) : _('Never')
...@@ -64,4 +64,4 @@ ...@@ -64,4 +64,4 @@
- if mirror.ssh_key_auth? - if mirror.ssh_key_auth?
= clipboard_button(text: mirror.ssh_public_key, class: 'btn btn-default', title: _('Copy SSH public key')) = clipboard_button(text: mirror.ssh_public_key, class: 'btn btn-default', title: _('Copy SSH public key'))
= render 'shared/remote_mirror_update_button', remote_mirror: mirror = render 'shared/remote_mirror_update_button', remote_mirror: mirror
%button.js-delete-mirror.qa-delete-mirror.btn.btn-danger{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= icon('trash-o') %button.js-delete-mirror.qa-delete-mirror.rspec-delete-mirror.btn.btn-danger{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= icon('trash-o')
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
.merge_access_levels-container .merge_access_levels-container
= dropdown_tag('Select', = dropdown_tag('Select',
options: { toggle_class: 'js-allowed-to-merge qa-allowed-to-merge-select wide', options: { toggle_class: 'js-allowed-to-merge qa-allowed-to-merge-select wide',
dropdown_class: 'dropdown-menu-selectable qa-allowed-to-merge-dropdown capitalize-header', dropdown_class: 'dropdown-menu-selectable qa-allowed-to-merge-dropdown rspec-allowed-to-merge-dropdown capitalize-header',
data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes' }}) data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes' }})
- content_for :push_access_levels do - content_for :push_access_levels do
.push_access_levels-container .push_access_levels-container
= dropdown_tag('Select', = dropdown_tag('Select',
options: { toggle_class: 'js-allowed-to-push qa-allowed-to-push-select wide', options: { toggle_class: 'js-allowed-to-push qa-allowed-to-push-select wide',
dropdown_class: 'dropdown-menu-selectable qa-allowed-to-push-dropdown capitalize-header', dropdown_class: 'dropdown-menu-selectable qa-allowed-to-push-dropdown rspec-allowed-to-push-dropdown capitalize-header',
data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes' }}) data: { field_name: 'protected_branch[push_access_levels_attributes][0][access_level]', input_id: 'push_access_levels_attributes' }})
= render 'projects/protected_branches/shared/create_protected_branch' = render 'projects/protected_branches/shared/create_protected_branch'
...@@ -51,6 +51,6 @@ ...@@ -51,6 +51,6 @@
.float-right .float-right
= link_to _("Cancel"), project_wiki_path(@project, @page), class: 'btn btn-cancel btn-grouped' = link_to _("Cancel"), project_wiki_path(@project, @page), class: 'btn btn-cancel btn-grouped'
- else - else
= f.submit s_("Wiki|Create page"), class: 'btn-success btn qa-create-page-button' = f.submit s_("Wiki|Create page"), class: 'btn-success btn qa-create-page-button rspec-create-page-button'
.float-right .float-right
= link_to _("Cancel"), project_wiki_path(@project, :home), class: 'btn btn-cancel' = link_to _("Cancel"), project_wiki_path(@project, :home), class: 'btn btn-cancel'
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
%button.btn.disabled{ type: 'button', data: { toggle: 'tooltip', container: 'body' }, title: _('Updating') } %button.btn.disabled{ type: 'button', data: { toggle: 'tooltip', container: 'body' }, title: _('Updating') }
= icon("refresh spin") = icon("refresh spin")
- elsif remote_mirror.enabled? - elsif remote_mirror.enabled?
= link_to update_now_project_mirror_path(@project, sync_remote: true), method: :post, class: "btn qa-update-now-button", data: { toggle: 'tooltip', container: 'body' }, title: _('Update now') do = link_to update_now_project_mirror_path(@project, sync_remote: true), method: :post, class: "btn qa-update-now-button rspec-update-now-button", data: { toggle: 'tooltip', container: 'body' }, title: _('Update now') do
= icon("refresh") = icon("refresh")
%a.toggle-sidebar-button.js-toggle-sidebar.qa-toggle-sidebar{ role: "button", type: "button", title: "Toggle sidebar" } %a.toggle-sidebar-button.js-toggle-sidebar.qa-toggle-sidebar.rspec-toggle-sidebar{ role: "button", type: "button", title: "Toggle sidebar" }
= sprite_icon('angle-double-left', css_class: 'icon-angle-double-left') = sprite_icon('angle-double-left', css_class: 'icon-angle-double-left')
= sprite_icon('angle-double-right', css_class: 'icon-angle-double-right') = sprite_icon('angle-double-right', css_class: 'icon-angle-double-right')
%span.collapse-text= _("Collapse sidebar") %span.collapse-text= _("Collapse sidebar")
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
= render layout: 'projects/md_preview', locals: { url: preview_url, referenced_users: true } do = render layout: 'projects/md_preview', locals: { url: preview_url, referenced_users: true } do
= render 'projects/zen', f: form, attr: :description, = render 'projects/zen', f: form, attr: :description,
classes: 'note-textarea qa-issuable-form-description', classes: 'note-textarea qa-issuable-form-description rspec-issuable-form-description',
placeholder: "Write a comment or drag your files here…", placeholder: "Write a comment or drag your files here…",
supports_quick_actions: supports_quick_actions supports_quick_actions: supports_quick_actions
= render 'shared/notes/hints', supports_quick_actions: supports_quick_actions = render 'shared/notes/hints', supports_quick_actions: supports_quick_actions
......
---
title: Create index on environments by state
merge_request: 31231
author:
type: performance
# frozen_string_literal: true
class AddIndexOnEnvironmentsWithState < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :environments, [:project_id, :state]
end
def down
remove_concurrent_index :environments, [:project_id, :state]
end
end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_07_25_012225) do ActiveRecord::Schema.define(version: 2019_07_29_090456) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm" enable_extension "pg_trgm"
...@@ -1174,6 +1174,7 @@ ActiveRecord::Schema.define(version: 2019_07_25_012225) do ...@@ -1174,6 +1174,7 @@ ActiveRecord::Schema.define(version: 2019_07_25_012225) do
t.index ["name"], name: "index_environments_on_name_varchar_pattern_ops", opclass: :varchar_pattern_ops t.index ["name"], name: "index_environments_on_name_varchar_pattern_ops", opclass: :varchar_pattern_ops
t.index ["project_id", "name"], name: "index_environments_on_project_id_and_name", unique: true t.index ["project_id", "name"], name: "index_environments_on_project_id_and_name", unique: true
t.index ["project_id", "slug"], name: "index_environments_on_project_id_and_slug", unique: true t.index ["project_id", "slug"], name: "index_environments_on_project_id_and_slug", unique: true
t.index ["project_id", "state"], name: "index_environments_on_project_id_and_state"
end end
create_table "epic_issues", id: :serial, force: :cascade do |t| create_table "epic_issues", id: :serial, force: :cascade do |t|
......
...@@ -16,21 +16,21 @@ describe 'Contextual sidebar', :js do ...@@ -16,21 +16,21 @@ describe 'Contextual sidebar', :js do
it 'shows flyout navs when collapsed or expanded apart from on the active item when expanded' do it 'shows flyout navs when collapsed or expanded apart from on the active item when expanded' do
expect(page).not_to have_selector('.js-sidebar-collapsed') expect(page).not_to have_selector('.js-sidebar-collapsed')
find('.qa-link-pipelines').hover find('.rspec-link-pipelines').hover
expect(page).to have_selector('.is-showing-fly-out') expect(page).to have_selector('.is-showing-fly-out')
find('a[data-qa-selector="project_link"]').hover find('.rspec-project-link').hover
expect(page).not_to have_selector('.is-showing-fly-out') expect(page).not_to have_selector('.is-showing-fly-out')
find('.qa-toggle-sidebar').click find('.rspec-toggle-sidebar').click
find('.qa-link-pipelines').hover find('.rspec-link-pipelines').hover
expect(page).to have_selector('.is-showing-fly-out') expect(page).to have_selector('.is-showing-fly-out')
find('a[data-qa-selector="project_link"]').hover find('.rspec-project-link').hover
expect(page).to have_selector('.is-showing-fly-out') expect(page).to have_selector('.is-showing-fly-out')
end end
......
...@@ -102,7 +102,7 @@ describe 'Sort Issuable List' do ...@@ -102,7 +102,7 @@ describe 'Sort Issuable List' do
expect(first_merge_request).to include(last_updated_issuable.title) expect(first_merge_request).to include(last_updated_issuable.title)
expect(last_merge_request).to include(first_updated_issuable.title) expect(last_merge_request).to include(first_updated_issuable.title)
find('.issues-other-filters .filter-dropdown-container .qa-reverse-sort').click find('.issues-other-filters .filter-dropdown-container .rspec-reverse-sort').click
expect(first_merge_request).to include(first_updated_issuable.title) expect(first_merge_request).to include(first_updated_issuable.title)
expect(last_merge_request).to include(last_updated_issuable.title) expect(last_merge_request).to include(last_updated_issuable.title)
...@@ -204,7 +204,7 @@ describe 'Sort Issuable List' do ...@@ -204,7 +204,7 @@ describe 'Sort Issuable List' do
expect(first_issue).to include(last_updated_issuable.title) expect(first_issue).to include(last_updated_issuable.title)
expect(last_issue).to include(first_updated_issuable.title) expect(last_issue).to include(first_updated_issuable.title)
find('.issues-other-filters .filter-dropdown-container .qa-reverse-sort').click find('.issues-other-filters .filter-dropdown-container .rspec-reverse-sort').click
expect(first_issue).to include(first_updated_issuable.title) expect(first_issue).to include(first_updated_issuable.title)
expect(last_issue).to include(last_updated_issuable.title) expect(last_issue).to include(last_updated_issuable.title)
......
...@@ -28,7 +28,7 @@ describe "User creates issue" do ...@@ -28,7 +28,7 @@ describe "User creates issue" do
fill_in("Title", with: issue_title) fill_in("Title", with: issue_title)
first('.js-md').click first('.js-md').click
first('.qa-issuable-form-description').native.send_keys('Description') first('.rspec-issuable-form-description').native.send_keys('Description')
click_button("Submit issue") click_button("Submit issue")
......
...@@ -418,8 +418,8 @@ describe 'Copy as GFM', :js do ...@@ -418,8 +418,8 @@ describe 'Copy as GFM', :js do
html = <<~HTML html = <<~HTML
<div class="md-suggestion"> <div class="md-suggestion">
<div class="md-suggestion-header border-bottom-0 mt-2 qa-suggestion-diff-header"> <div class="md-suggestion-header border-bottom-0 mt-2 qa-suggestion-diff-header js-suggestion-diff-header">
<div class="qa-suggestion-diff-header font-weight-bold"> <div class="qa-suggestion-diff-header js-suggestion-diff-header font-weight-bold">
Suggested change Suggested change
<a href="/gitlab/help/user/discussions/index.md#suggest-changes" aria-label="Help" class="js-help-btn"> <a href="/gitlab/help/user/discussions/index.md#suggest-changes" aria-label="Help" class="js-help-btn">
<svg aria-hidden="true" class="s16 ic-question-o link-highlight"> <svg aria-hidden="true" class="s16 ic-question-o link-highlight">
...@@ -428,7 +428,7 @@ describe 'Copy as GFM', :js do ...@@ -428,7 +428,7 @@ describe 'Copy as GFM', :js do
</a> </a>
</div> </div>
<!----> <!---->
<button type="button" class="btn qa-apply-btn">Apply suggestion</button> <button type="button" class="btn qa-apply-btn js-apply-btn">Apply suggestion</button>
</div> </div>
<table class="mb-3 md-suggestion-diff js-syntax-highlight code white"> <table class="mb-3 md-suggestion-diff js-syntax-highlight code white">
<tbody> <tbody>
......
...@@ -42,7 +42,7 @@ describe 'User edit profile' do ...@@ -42,7 +42,7 @@ describe 'User edit profile' do
simulate_input('#user_name', 'Martin 😀') simulate_input('#user_name', 'Martin 😀')
submit_settings submit_settings
page.within('.qa-full-name') do page.within('.rspec-full-name') do
expect(page).to have_css '.gl-field-error-outline' expect(page).to have_css '.gl-field-error-outline'
expect(find('.gl-field-error')).not_to have_selector('.hidden') expect(find('.gl-field-error')).not_to have_selector('.hidden')
expect(find('.gl-field-error')).to have_content('Using emojis in names seems fun, but please try to set a status message instead') expect(find('.gl-field-error')).to have_content('Using emojis in names seems fun, but please try to set a status message instead')
......
...@@ -250,11 +250,11 @@ describe 'Projects > Settings > Repository settings' do ...@@ -250,11 +250,11 @@ describe 'Projects > Settings > Repository settings' do
visit project_settings_repository_path(project) visit project_settings_repository_path(project)
mirror = find('.qa-mirrored-repository-row') mirror = find('.rspec-mirrored-repository-row')
expect(mirror).to have_selector('.qa-delete-mirror') expect(mirror).to have_selector('.rspec-delete-mirror')
expect(mirror).to have_selector('.qa-disabled-mirror-badge') expect(mirror).to have_selector('.rspec-disabled-mirror-badge')
expect(mirror).not_to have_selector('.qa-update-now-button') expect(mirror).not_to have_selector('.rspec-update-now-button')
end end
end end
end end
...@@ -94,7 +94,7 @@ describe 'Projects > Settings > User manages merge request settings' do ...@@ -94,7 +94,7 @@ describe 'Projects > Settings > User manages merge request settings' do
it 'when unchecked sets :printing_merge_request_link_enabled to false' do it 'when unchecked sets :printing_merge_request_link_enabled to false' do
uncheck('project_printing_merge_request_link_enabled') uncheck('project_printing_merge_request_link_enabled')
within('.merge-request-settings-form') do within('.merge-request-settings-form') do
find('.qa-save-merge-request-changes') find('.rspec-save-merge-request-changes')
click_on('Save changes') click_on('Save changes')
end end
......
...@@ -142,7 +142,7 @@ describe "User creates wiki page" do ...@@ -142,7 +142,7 @@ describe "User creates wiki page" do
# blur. Just not `click`. But only when you manually insert \n or \r - if you manually insert any other sequence # blur. Just not `click`. But only when you manually insert \n or \r - if you manually insert any other sequence
# then `click` is fired normally. And it's only Capybara. Browsers and JSDOM don't have this issue. # then `click` is fired normally. And it's only Capybara. Browsers and JSDOM don't have this issue.
# So that's why the next line performs the click via JS. # So that's why the next line performs the click via JS.
page.execute_script("document.querySelector('.qa-create-page-button').click()") page.execute_script("document.querySelector('.rspec-create-page-button').click()")
page.within ".md" do page.within ".md" do
expect(page).to have_selector(".katex", count: 3).and have_content("2+2 is 4") expect(page).to have_selector(".katex", count: 3).and have_content("2+2 is 4")
......
...@@ -42,7 +42,7 @@ describe 'User views wiki pages' do ...@@ -42,7 +42,7 @@ describe 'User views wiki pages' do
context 'desc' do context 'desc' do
before do before do
page.within('.wiki-sort-dropdown') do page.within('.wiki-sort-dropdown') do
page.find('.qa-reverse-sort').click page.find('.rspec-reverse-sort').click
end end
end end
...@@ -75,7 +75,7 @@ describe 'User views wiki pages' do ...@@ -75,7 +75,7 @@ describe 'User views wiki pages' do
context 'desc' do context 'desc' do
before do before do
page.within('.wiki-sort-dropdown') do page.within('.wiki-sort-dropdown') do
page.find('.qa-reverse-sort').click page.find('.rspec-reverse-sort').click
end end
end end
......
...@@ -387,7 +387,7 @@ describe 'Project' do ...@@ -387,7 +387,7 @@ describe 'Project' do
end end
it_behaves_like 'dirty submit form', [{ form: '.js-general-settings-form', input: 'input[name="project[name]"]' }, it_behaves_like 'dirty submit form', [{ form: '.js-general-settings-form', input: 'input[name="project[name]"]' },
{ form: '.qa-merge-request-settings', input: '#project_printing_merge_request_link_enabled' }] { form: '.rspec-merge-request-settings', input: '#project_printing_merge_request_link_enabled' }]
end end
def remove_with_confirm(button_text, confirm_with) def remove_with_confirm(button_text, confirm_with)
......
...@@ -101,7 +101,7 @@ describe('Markdown field header component', () => { ...@@ -101,7 +101,7 @@ describe('Markdown field header component', () => {
vm.canSuggest = false; vm.canSuggest = false;
Vue.nextTick(() => { Vue.nextTick(() => {
expect(vm.$el.querySelector('.qa-suggestion-btn')).toBe(null); expect(vm.$el.querySelector('.js-suggestion-btn')).toBe(null);
}); });
}); });
}); });
...@@ -28,8 +28,8 @@ describe('Suggestion Diff component', () => { ...@@ -28,8 +28,8 @@ describe('Suggestion Diff component', () => {
wrapper.destroy(); wrapper.destroy();
}); });
const findApplyButton = () => wrapper.find('.qa-apply-btn'); const findApplyButton = () => wrapper.find('.js-apply-btn');
const findHeader = () => wrapper.find('.qa-suggestion-diff-header'); const findHeader = () => wrapper.find('.js-suggestion-diff-header');
const findHelpButton = () => wrapper.find('.js-help-btn'); const findHelpButton = () => wrapper.find('.js-help-btn');
const findLoading = () => wrapper.find(GlLoadingIcon); const findLoading = () => wrapper.find(GlLoadingIcon);
......
...@@ -22,7 +22,7 @@ describe WikiHelper do ...@@ -22,7 +22,7 @@ describe WikiHelper do
describe '#wiki_sort_controls' do describe '#wiki_sort_controls' do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:wiki_link) { helper.wiki_sort_controls(project, sort, direction) } let(:wiki_link) { helper.wiki_sort_controls(project, sort, direction) }
let(:classes) { "btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort" } let(:classes) { "btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort rspec-reverse-sort" }
def expected_link(sort, direction, icon_class) def expected_link(sort, direction, icon_class)
path = "/#{project.full_path}/wikis/pages?direction=#{direction}&sort=#{sort}" path = "/#{project.full_path}/wikis/pages?direction=#{direction}&sort=#{sort}"
......
...@@ -21,7 +21,7 @@ describe('Squash before merge component', () => { ...@@ -21,7 +21,7 @@ describe('Squash before merge component', () => {
}); });
describe('checkbox', () => { describe('checkbox', () => {
const findCheckbox = () => wrapper.find('.qa-squash-checkbox'); const findCheckbox = () => wrapper.find('.js-squash-checkbox');
it('is unchecked if passed value prop is false', () => { it('is unchecked if passed value prop is false', () => {
createComponent({ createComponent({
......
...@@ -60,7 +60,7 @@ describe('Suggestion Diff component', () => { ...@@ -60,7 +60,7 @@ describe('Suggestion Diff component', () => {
describe('init', () => { describe('init', () => {
it('renders a suggestion header', () => { it('renders a suggestion header', () => {
expect(vm.$el.querySelector('.qa-suggestion-diff-header')).not.toBeNull(); expect(vm.$el.querySelector('.js-suggestion-diff-header')).not.toBeNull();
}); });
it('renders a diff table with syntax highlighting', () => { it('renders a diff table with syntax highlighting', () => {
......
...@@ -8,7 +8,7 @@ shared_examples "protected branches > access control > CE" do ...@@ -8,7 +8,7 @@ shared_examples "protected branches > access control > CE" do
set_protected_branch_name('master') set_protected_branch_name('master')
find(".js-allowed-to-merge").click find(".js-allowed-to-merge").click
within('.qa-allowed-to-merge-dropdown') do within('.rspec-allowed-to-merge-dropdown') do
expect(first("li")).to have_content("Roles") expect(first("li")).to have_content("Roles")
find(:link, 'No one').click find(:link, 'No one').click
end end
...@@ -34,13 +34,13 @@ shared_examples "protected branches > access control > CE" do ...@@ -34,13 +34,13 @@ shared_examples "protected branches > access control > CE" do
set_protected_branch_name('master') set_protected_branch_name('master')
find(".js-allowed-to-merge").click find(".js-allowed-to-merge").click
within('.qa-allowed-to-merge-dropdown') do within('.rspec-allowed-to-merge-dropdown') do
expect(first("li")).to have_content("Roles") expect(first("li")).to have_content("Roles")
find(:link, 'No one').click find(:link, 'No one').click
end end
find(".js-allowed-to-push").click find(".js-allowed-to-push").click
within('.qa-allowed-to-push-dropdown') do within('.rspec-allowed-to-push-dropdown') do
expect(first("li")).to have_content("Roles") expect(first("li")).to have_content("Roles")
find(:link, 'No one').click find(:link, 'No one').click
end end
...@@ -80,7 +80,7 @@ shared_examples "protected branches > access control > CE" do ...@@ -80,7 +80,7 @@ shared_examples "protected branches > access control > CE" do
end end
find(".js-allowed-to-push").click find(".js-allowed-to-push").click
within('.qa-allowed-to-push-dropdown') do within('.rspec-allowed-to-push-dropdown') do
expect(first("li")).to have_content("Roles") expect(first("li")).to have_content("Roles")
find(:link, 'No one').click find(:link, 'No one').click
end end
...@@ -97,13 +97,13 @@ shared_examples "protected branches > access control > CE" do ...@@ -97,13 +97,13 @@ shared_examples "protected branches > access control > CE" do
set_protected_branch_name('master') set_protected_branch_name('master')
find(".js-allowed-to-merge").click find(".js-allowed-to-merge").click
within('.qa-allowed-to-merge-dropdown') do within('.rspec-allowed-to-merge-dropdown') do
expect(first("li")).to have_content("Roles") expect(first("li")).to have_content("Roles")
find(:link, 'No one').click find(:link, 'No one').click
end end
find(".js-allowed-to-push").click find(".js-allowed-to-push").click
within('.qa-allowed-to-push-dropdown') do within('.rspec-allowed-to-push-dropdown') do
expect(first("li")).to have_content("Roles") expect(first("li")).to have_content("Roles")
find(:link, 'No one').click find(:link, 'No one').click
end end
......
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