Add missinig cypress ids for admin and compose

This commit is contained in:
Katrin Yordanova
2023-09-13 15:45:49 +03:00
parent 01f48e7e9b
commit b8dd88dbef
5 changed files with 17 additions and 4 deletions
@@ -22,6 +22,7 @@
<b-tab
v-for="(step, index) in steps"
:key="index"
:button-id="steps[index]"
class="border-0"
:title="$t(`filters.step_title.${step}`)"
@click="onActivateTab(index)"
@@ -257,6 +257,7 @@
<div v-if="!fresh">
<b-form-group label-cols="3">
<b-button
data-test-id="button-cURL-snippet"
variant="light"
class="align-top"
@click="toggleCurlSnippet()"
@@ -279,7 +280,7 @@
<div class="d-flex">
<pre
ref="cUrl"
data-test-id="cURL"
data-test-id="cURL-string"
style="word-break: break-word;"
>
curl -X POST {{ curlURL }} \
@@ -288,7 +289,7 @@ curl -X POST {{ curlURL }} \
-u {{ resource.authClientID }}:{{ secret || 'PLACE-YOUR-CLIENT-SECRET-HERE' }}
</pre>
<b-button
data-test-id="copy-cURL"
data-test-id="button-copy-cURL"
variant="link"
class="align-top ml-auto fit-content text-secondary mr-5"
@click="copyToClipboard('cUrl')"
@@ -18,7 +18,7 @@
:key="sec.key"
>
<b-btn
:data-test-id="`button-${$t(sec.key)}`"
:data-test-id="toolboxSectionLabelCypressId(sec.key)"
variant="light"
class="mb-2"
block
@@ -35,7 +35,7 @@
<b-list-group-item
v-for="(opt, i) in sec.options"
:key="opt.label + i"
data-test-id="section-item"
:data-test-id="toolboxOptionLabelCypressId(opt.label)"
class="px-0 text-wrap"
@click="opt.onClick || (() => {})"
>
@@ -150,7 +150,16 @@ export default {
openSection (sec) {
this.$set(this.expandedSections, sec, !this.expandedSections[sec])
},
copyToCb: copy,
toolboxSectionLabelCypressId (section) {
return `button-${this.$t(section).toLowerCase()}`
},
toolboxOptionLabelCypressId (label) {
return label.toLowerCase().split(' ').join('-')
},
},
}
@@ -13,6 +13,7 @@
class="mr-1"
>
<b-button
data-test-id="button-page-builder"
variant="primary"
class="d-flex align-items-center"
:to="{ name: 'admin.pages.builder' }"
@@ -63,6 +63,7 @@
class="d-flex justify-content-center align-items-center h-50 w-100"
>
<h3
data-test-id="no-namespaces-found"
class="text-left"
>
{{ $t('noResults') }}