Commit 986c0578 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'epics-e2e-tests' into 'master'

Adding qa-selectors for e2e tests

See merge request gitlab-org/gitlab-ce!21824
parents ce2207b7 637df35f
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<button <button
:class="{ disabled: formState.updateLoading || !isSubmitEnabled }" :class="{ disabled: formState.updateLoading || !isSubmitEnabled }"
:disabled="formState.updateLoading || !isSubmitEnabled" :disabled="formState.updateLoading || !isSubmitEnabled"
class="btn btn-success float-left" class="btn btn-success float-left qa-save-button"
type="submit" type="submit"
@click.prevent="updateIssuable"> @click.prevent="updateIssuable">
Save changes Save changes
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
v-if="shouldShowDeleteButton" v-if="shouldShowDeleteButton"
:class="{ disabled: deleteLoading }" :class="{ disabled: deleteLoading }"
:disabled="deleteLoading" :disabled="deleteLoading"
class="btn btn-danger float-right append-right-default" class="btn btn-danger float-right append-right-default qa-delete-button"
type="button" type="button"
@click="deleteIssuable"> @click="deleteIssuable">
Delete Delete
......
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
ref="textarea" ref="textarea"
slot="textarea" slot="textarea"
v-model="formState.description" v-model="formState.description"
class="note-textarea js-gfm-input js-autosize markdown-area" class="note-textarea js-gfm-input js-autosize markdown-area
qa-description-textarea"
data-supports-quick-actions="false" data-supports-quick-actions="false"
aria-label="Description" aria-label="Description"
placeholder="Write a comment or drag your files here…" placeholder="Write a comment or drag your files here…"
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<input <input
id="issuable-title" id="issuable-title"
v-model="formState.title" v-model="formState.title"
class="form-control" class="form-control qa-title-input"
type="text" type="text"
placeholder="Title" placeholder="Title"
aria-label="Title" aria-label="Title"
......
...@@ -79,7 +79,8 @@ export default { ...@@ -79,7 +79,8 @@ export default {
v-if="showInlineEditButton && canUpdate" v-if="showInlineEditButton && canUpdate"
v-tooltip v-tooltip
type="button" type="button"
class="btn btn-default btn-edit btn-svg js-issuable-edit" class="btn btn-default btn-edit btn-svg js-issuable-edit
qa-edit-button"
title="Edit title and description" title="Edit title and description"
data-placement="bottom" data-placement="bottom"
data-container="body" data-container="body"
......
...@@ -7,7 +7,11 @@ import { __, sprintf } from '~/locale'; ...@@ -7,7 +7,11 @@ import { __, sprintf } from '~/locale';
import Flash from '../../flash'; import Flash from '../../flash';
import Autosave from '../../autosave'; import Autosave from '../../autosave';
import TaskList from '../../task_list'; import TaskList from '../../task_list';
import { capitalizeFirstCharacter, convertToCamelCase, splitCamelCase } from '../../lib/utils/text_utility'; import {
capitalizeFirstCharacter,
convertToCamelCase,
splitCamelCase,
} from '../../lib/utils/text_utility';
import * as constants from '../constants'; import * as constants from '../constants';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import issueWarning from '../../vue_shared/components/issue/issue_warning.vue'; import issueWarning from '../../vue_shared/components/issue/issue_warning.vue';
...@@ -122,7 +126,9 @@ export default { ...@@ -122,7 +126,9 @@ export default {
return this.getNoteableData.create_note_path; return this.getNoteableData.create_note_path;
}, },
issuableTypeTitle() { issuableTypeTitle() {
return this.noteableType === constants.MERGE_REQUEST_NOTEABLE_TYPE ? 'merge request' : 'issue'; return this.noteableType === constants.MERGE_REQUEST_NOTEABLE_TYPE
? 'merge request'
: 'issue';
}, },
}, },
watch: { watch: {
...@@ -359,7 +365,7 @@ Please check your network connection and try again.`; ...@@ -359,7 +365,7 @@ Please check your network connection and try again.`;
:disabled="isSubmitting" :disabled="isSubmitting"
name="note[note]" name="note[note]"
class="note-textarea js-vue-comment-form js-note-text class="note-textarea js-vue-comment-form js-note-text
js-gfm-input js-autosize markdown-area js-vue-textarea" js-gfm-input js-autosize markdown-area js-vue-textarea qa-comment-input"
data-supports-quick-actions="true" data-supports-quick-actions="true"
aria-label="Description" aria-label="Description"
placeholder="Write a comment or drag your files here…" placeholder="Write a comment or drag your files here…"
...@@ -374,7 +380,8 @@ js-gfm-input js-autosize markdown-area js-vue-textarea" ...@@ -374,7 +380,8 @@ js-gfm-input js-autosize markdown-area js-vue-textarea"
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"> append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown">
<button <button
:disabled="isSubmitButtonDisabled" :disabled="isSubmitButtonDisabled"
class="btn btn-success comment-btn js-comment-button js-comment-submit-button" class="btn btn-create comment-btn js-comment-button js-comment-submit-button
qa-comment-button"
type="submit" type="submit"
@click.prevent="handleSave()"> @click.prevent="handleSave()">
{{ __(commentButtonTitle) }} {{ __(commentButtonTitle) }}
......
...@@ -257,6 +257,9 @@ module QA ...@@ -257,6 +257,9 @@ module QA
autoload :Dropzone, 'qa/page/component/dropzone' autoload :Dropzone, 'qa/page/component/dropzone'
autoload :GroupsFilter, 'qa/page/component/groups_filter' autoload :GroupsFilter, 'qa/page/component/groups_filter'
autoload :Select2, 'qa/page/component/select2' autoload :Select2, 'qa/page/component/select2'
module Issuable
autoload :Common, 'qa/page/component/issuable/common'
end
end end
end end
......
# frozen_string_literal: true
module QA
module Page
module Component
module Issuable
module Common
def self.included(base)
base.view 'app/assets/javascripts/issue_show/components/title.vue' do
element :edit_button
end
base.view 'app/assets/javascripts/issue_show/components/fields/title.vue' do
element :title_input
end
base.view 'app/assets/javascripts/issue_show/components/fields/description.vue' do
element :description_textarea
end
base.view 'app/assets/javascripts/issue_show/components/edit_actions.vue' do
element :save_button
element :delete_button
end
base.view 'app/assets/javascripts/issue_show/components/edit_actions.vue' do
element :save_button
element :delete_button
end
end
end
end
end
end
end
...@@ -5,6 +5,8 @@ module QA ...@@ -5,6 +5,8 @@ module QA
module Project module Project
module Issue module Issue
class Show < Page::Base class Show < Page::Base
include Page::Component::Issuable::Common
view 'app/views/projects/issues/show.html.haml' do view 'app/views/projects/issues/show.html.haml' do
element :issue_details, '.issue-details' element :issue_details, '.issue-details'
element :title, '.title' element :title, '.title'
......
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