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>
</GeneralDropdown>
<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') }}
</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') }}
</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') }}
</button>
</div>

View file

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

View file

@ -15,7 +15,7 @@
<div class="mb-6">
<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">
<input type="text" v-model="name"
<input type="text" v-model="name"
class="sci-input-field"
autofocus="true" ref="input"
data-e2e="e2e-IF-renameInventoryModal-name"

View file

@ -26,11 +26,7 @@
confirmClass="btn btn-danger"
:confirmText="i18n.t('repositories.index.modal_delete.delete')"
ref="deleteModal"
:e2eModalName="deleteModal.e2eModalName"
:e2eTitle="deleteModal.e2eTitle"
:e2eClose="deleteModal.e2eClose"
:e2eCancel="deleteModal.e2eCancel"
:e2eConfirm="deleteModal.e2eConfirm"
:e2eAttributes="deleteModal.e2eAttributes"
></ConfirmationModal>
<ConfirmationModal
:title="exportModal.title"
@ -117,11 +113,13 @@ export default {
deleteModal: {
title: '',
description: '',
e2eModalName: '',
e2eTitle: '',
e2eClose: '',
e2eCancel: '',
e2eConfirm: '',
e2eAttributes: {
modalName: '',
title: '',
close: '',
cancel: '',
confirm: ''
},
},
exportModal: {
title: '',
@ -260,11 +258,13 @@ export default {
},
async deleteRepository(event, rows) {
const [repository] = rows;
this.deleteModal.e2eModalName = 'e2e-MD-deleteInventory';
this.deleteModal.e2eTitle = 'e2e-TX-deleteInventoryModal-title',
this.deleteModal.e2eClose = 'e2e-BT-deleteInventoryModal-close',
this.deleteModal.e2eCancel = 'e2e-BT-deleteInventoryModal-cancel',
this.deleteModal.e2eConfirm = 'e2e-BT-deleteInventoryModal-delete',
this.deleteModal.e2eAttributes = {
modalName: 'e2e-MD-deleteInventory',
title: 'e2e-TX-deleteInventoryModal-title',
close: 'e2e-BT-deleteInventoryModal-close',
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.description = `
<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>
<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-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close" :data-e2e="e2eClose"><i class="sn-icon sn-icon-close"></i></button>
<h4 class="modal-title" :data-e2e="e2eTitle">
<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="e2eAttributes.title">
{{ title }}
</h4>
</div>
<div class="modal-body" v-html="description"></div>
<div class="modal-footer">
<button :class="cancelClass" @click="cancel" :data-e2e="e2eCancel">{{ cancelText || i18n.t('general.cancel') }}</button>
<button :class="confirmClass" @click="confirm" :data-e2e="e2eConfirm">{{ confirmText || i18n.t('general.confirm') }}</button>
<button :class="cancelClass" @click="cancel" :data-e2e="e2eAttributes.cancel">{{ cancelText || i18n.t('general.cancel') }}</button>
<button :class="confirmClass" @click="confirm" :data-e2e="e2eAttributes.confirm">{{ confirmText || i18n.t('general.confirm') }}</button>
</div>
</div>
</div>
@ -43,25 +43,9 @@
type: String,
default: 'btn btn-primary'
},
e2eModalName: {
type: String,
default: ''
},
e2eTitle: {
type: String,
default: ''
},
e2eClose: {
type: String,
default: ''
},
e2eCancel: {
type: String,
default: ''
},
e2eConfirm: {
type: String,
default: ''
e2eAttributes: {
type: Object,
default: {}
}
},
mounted() {

View file

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