Commit e3fb7f77 authored by Tanya Pazitny's avatar Tanya Pazitny Committed by Mayra Cabrera

Change qa-* class references to js-* for suggestions

parent c7a7e795
...@@ -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"
......
...@@ -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>
......
...@@ -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);
......
...@@ -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', () => {
......
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