Fixing PR commentaries [SCI-10717]

This commit is contained in:
Klemen Benedicic 2024-05-23 13:12:05 +02:00
parent 0ebd9a9b8b
commit a42a8a535a
6 changed files with 39 additions and 46 deletions

View file

@ -46,13 +46,22 @@
</template> </template>
</GeneralDropdown> </GeneralDropdown>
<div class="flex items-center gap-2.5"> <div class="flex items-center gap-2.5">
<button class="btn btn-secondary btn-sm" :class="{'active': activeGroup == 'ExperimentsComponent'}" @click="setActiveGroup('ExperimentsComponent')" :data-e2e="'e2e-BT-globalSearch-experiments'"> <button class="btn btn-secondary btn-sm"
:class="{'active': activeGroup == 'ExperimentsComponent'}"
@click="setActiveGroup('ExperimentsComponent')"
:data-e2e="'e2e-BT-globalSearch-experiments'">
{{ i18n.t('search.index.experiments') }} {{ i18n.t('search.index.experiments') }}
</button> </button>
<button class="btn btn-secondary btn-sm" :class="{'active': activeGroup == 'MyModulesComponent'}" @click="setActiveGroup('MyModulesComponent')" :data-e2e="'e2e-BT-globalSearch-tasks'"> <button class="btn btn-secondary btn-sm"
:class="{'active': activeGroup == 'MyModulesComponent'}"
@click="setActiveGroup('MyModulesComponent')"
:data-e2e="'e2e-BT-globalSearch-tasks'">
{{ i18n.t('search.index.tasks') }} {{ i18n.t('search.index.tasks') }}
</button> </button>
<button class="btn btn-secondary btn-sm" :class="{'active': activeGroup == 'ResultsComponent'}" @click="setActiveGroup('ResultsComponent')" :data-e2e="'e2e-BT-globalSearch-taskResults'"> <button class="btn btn-secondary btn-sm"
:class="{'active': activeGroup == 'ResultsComponent'}"
@click="setActiveGroup('ResultsComponent')"
:data-e2e="'e2e-BT-globalSearch-taskResults'">
{{ i18n.t('search.index.task_results') }} {{ i18n.t('search.index.task_results') }}
</button> </button>
</div> </div>

View file

@ -49,7 +49,7 @@ export default {
type: Object, type: Object,
required: true required: true
}, },
e2eValue:{ e2eValue: {
type: String, type: String,
default: '' default: ''
} }

View file

@ -15,7 +15,7 @@
<div class="mb-6"> <div class="mb-6">
<label class="sci-label" data-e2e="e2e-TX-renameInventoryModal-inputLabel">{{ i18n.t("repositories.index.modal_rename.name") }}</label> <label class="sci-label" data-e2e="e2e-TX-renameInventoryModal-inputLabel">{{ i18n.t("repositories.index.modal_rename.name") }}</label>
<div class="sci-input-container-v2" :class="{'error': error}" :data-error="error"> <div class="sci-input-container-v2" :class="{'error': error}" :data-error="error">
<input type="text" v-model="name" <input type="text" v-model="name"
class="sci-input-field" class="sci-input-field"
autofocus="true" ref="input" autofocus="true" ref="input"
data-e2e="e2e-IF-renameInventoryModal-name" data-e2e="e2e-IF-renameInventoryModal-name"

View file

@ -26,11 +26,7 @@
confirmClass="btn btn-danger" confirmClass="btn btn-danger"
:confirmText="i18n.t('repositories.index.modal_delete.delete')" :confirmText="i18n.t('repositories.index.modal_delete.delete')"
ref="deleteModal" ref="deleteModal"
:e2eModalName="deleteModal.e2eModalName" :e2eAttributes="deleteModal.e2eAttributes"
:e2eTitle="deleteModal.e2eTitle"
:e2eClose="deleteModal.e2eClose"
:e2eCancel="deleteModal.e2eCancel"
:e2eConfirm="deleteModal.e2eConfirm"
></ConfirmationModal> ></ConfirmationModal>
<ConfirmationModal <ConfirmationModal
:title="exportModal.title" :title="exportModal.title"
@ -117,11 +113,13 @@ export default {
deleteModal: { deleteModal: {
title: '', title: '',
description: '', description: '',
e2eModalName: '', e2eAttributes: {
e2eTitle: '', modalName: '',
e2eClose: '', title: '',
e2eCancel: '', close: '',
e2eConfirm: '', cancel: '',
confirm: ''
},
}, },
exportModal: { exportModal: {
title: '', title: '',
@ -260,11 +258,13 @@ export default {
}, },
async deleteRepository(event, rows) { async deleteRepository(event, rows) {
const [repository] = rows; const [repository] = rows;
this.deleteModal.e2eModalName = 'e2e-MD-deleteInventory'; this.deleteModal.e2eAttributes = {
this.deleteModal.e2eTitle = 'e2e-TX-deleteInventoryModal-title', modalName: 'e2e-MD-deleteInventory',
this.deleteModal.e2eClose = 'e2e-BT-deleteInventoryModal-close', title: 'e2e-TX-deleteInventoryModal-title',
this.deleteModal.e2eCancel = 'e2e-BT-deleteInventoryModal-cancel', close: 'e2e-BT-deleteInventoryModal-close',
this.deleteModal.e2eConfirm = 'e2e-BT-deleteInventoryModal-delete', cancel: 'e2e-BT-deleteInventoryModal-cancel',
confirm: 'e2e-BT-deleteInventoryModal-delete'
},
this.deleteModal.title = this.i18n.t('repositories.index.modal_delete.title_html', { name: repository.name }); this.deleteModal.title = this.i18n.t('repositories.index.modal_delete.title_html', { name: repository.name });
this.deleteModal.description = ` this.deleteModal.description = `
<p data-e2e="e2e-TX-deleteInventoryModal-info">${this.i18n.t('repositories.index.modal_delete.message_html', { name: repository.name })}</p> <p data-e2e="e2e-TX-deleteInventoryModal-info">${this.i18n.t('repositories.index.modal_delete.message_html', { name: repository.name })}</p>

View file

@ -1,17 +1,17 @@
<template> <template>
<div ref="modal" @keydown.esc="cancel" class="modal" tabindex="-1" role="dialog"> <div ref="modal" @keydown.esc="cancel" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document" :data-e2e="e2eModalName"> <div class="modal-dialog" role="document" :data-e2e="e2eAttributes.modalName">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" :data-e2e="e2eClose"><i class="sn-icon sn-icon-close"></i></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close" :data-e2e="e2eAttributes.close"><i class="sn-icon sn-icon-close"></i></button>
<h4 class="modal-title" :data-e2e="e2eTitle"> <h4 class="modal-title" :data-e2e="e2eAttributes.title">
{{ title }} {{ title }}
</h4> </h4>
</div> </div>
<div class="modal-body" v-html="description"></div> <div class="modal-body" v-html="description"></div>
<div class="modal-footer"> <div class="modal-footer">
<button :class="cancelClass" @click="cancel" :data-e2e="e2eCancel">{{ cancelText || i18n.t('general.cancel') }}</button> <button :class="cancelClass" @click="cancel" :data-e2e="e2eAttributes.cancel">{{ cancelText || i18n.t('general.cancel') }}</button>
<button :class="confirmClass" @click="confirm" :data-e2e="e2eConfirm">{{ confirmText || i18n.t('general.confirm') }}</button> <button :class="confirmClass" @click="confirm" :data-e2e="e2eAttributes.confirm">{{ confirmText || i18n.t('general.confirm') }}</button>
</div> </div>
</div> </div>
</div> </div>
@ -43,25 +43,9 @@
type: String, type: String,
default: 'btn btn-primary' default: 'btn btn-primary'
}, },
e2eModalName: { e2eAttributes: {
type: String, type: Object,
default: '' default: {}
},
e2eTitle: {
type: String,
default: ''
},
e2eClose: {
type: String,
default: ''
},
e2eCancel: {
type: String,
default: ''
},
e2eConfirm: {
type: String,
default: ''
} }
}, },
mounted() { mounted() {

View file

@ -3,7 +3,7 @@
@focus="open" @focus="open"
@keydown="keySelectOptions($event)" @keydown="keySelectOptions($event)"
tabindex="0" class="w-full focus:outline-none" tabindex="0" class="w-full focus:outline-none"
:data-e2e="e2eValue ? e2eValue : null" :data-e2e="e2eValue"
> >
<div <div
ref="field" ref="field"
@ -128,7 +128,7 @@ export default {
clearable: { type: Boolean, default: false }, clearable: { type: Boolean, default: false },
tagsView: { type: Boolean, default: false }, tagsView: { type: Boolean, default: false },
urlParams: { type: Object, default: () => ({}) }, urlParams: { type: Object, default: () => ({}) },
e2eValue: { type: String } e2eValue: { type: String, default: '' }
}, },
directives: { directives: {
'click-outside': vOnClickOutside 'click-outside': vOnClickOutside