forked from verdnatura/salix-front
test: add data-cy
This commit is contained in:
parent
4233385267
commit
8a1a748c92
|
@ -106,6 +106,7 @@ const originalData = ref({});
|
|||
const formData = computed(() => state.get(modelValue));
|
||||
const defaultButtons = computed(() => ({
|
||||
save: {
|
||||
dataCy: 'saveDefaultBtn',
|
||||
color: 'primary',
|
||||
icon: 'save',
|
||||
label: 'globals.save',
|
||||
|
@ -113,6 +114,7 @@ const defaultButtons = computed(() => ({
|
|||
type: 'submit',
|
||||
},
|
||||
reset: {
|
||||
dataCy: 'resetDefaultBtn',
|
||||
color: 'primary',
|
||||
icon: 'restart_alt',
|
||||
label: 'globals.reset',
|
||||
|
@ -318,6 +320,7 @@ defineExpose({
|
|||
:title="t(defaultButtons.reset.label)"
|
||||
/>
|
||||
<QBtnDropdown
|
||||
data-cy="saveAndContinueDefaultBtn"
|
||||
v-if="$props.goTo"
|
||||
@click="saveAndGo"
|
||||
:label="tMobile('globals.saveAndContinue')"
|
||||
|
|
|
@ -105,6 +105,7 @@ onBeforeRouteLeave((to, from, next) => {
|
|||
@click="insert"
|
||||
class="q-mb-xs"
|
||||
dense
|
||||
data-cy="saveNote"
|
||||
/>
|
||||
</template>
|
||||
</VnInput>
|
||||
|
|
|
@ -51,7 +51,12 @@ function onBeforeSave(formData, originalData) {
|
|||
@on-fetch="(data) => (businessTypes = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FormModel auto-load model="customer" :mapper="onBeforeSave">
|
||||
<FormModel
|
||||
:url="`Clients/${route.params.id}`"
|
||||
auto-load
|
||||
model="customer"
|
||||
:mapper="onBeforeSave"
|
||||
>
|
||||
<template #form="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnInput
|
||||
|
|
|
@ -7,8 +7,8 @@ import FetchData from 'src/components/FetchData.vue';
|
|||
|
||||
import { toCurrency, toDateHourMin } from 'src/filters';
|
||||
|
||||
import CustomerCloseIconTooltip from 'src/components/CustomerCloseIconTooltip.vue';
|
||||
import CustomerCheckIconTooltip from 'src/components/CustomerCheckIconTooltip.vue';
|
||||
import CustomerCloseIconTooltip from '../components/CustomerCloseIconTooltip.vue';
|
||||
import CustomerCheckIconTooltip from '../components/CustomerCheckIconTooltip.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
|
Loading…
Reference in New Issue