test: improve test
This commit is contained in:
parent
85e932a6b9
commit
c5e8d8ab6f
|
@ -6,7 +6,6 @@ import { useQuasar } from 'quasar';
|
|||
import axios from 'axios';
|
||||
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
|
@ -21,9 +20,6 @@ const { t } = useI18n();
|
|||
const route = useRoute();
|
||||
const { notify } = useNotify();
|
||||
|
||||
const typesTaxes = ref([]);
|
||||
const typesTransactions = ref([]);
|
||||
|
||||
function handleLocation(data, location) {
|
||||
const { town, code, provinceFk, countryFk } = location ?? {};
|
||||
data.postcode = code;
|
||||
|
@ -39,6 +35,7 @@ function onBeforeSave(formData, originalData) {
|
|||
}
|
||||
|
||||
async function checkEtChanges(data, _, originalData) {
|
||||
isTaxDataChecked.value = data.isTaxDataChecked;
|
||||
const equalizatedHasChanged = originalData.isEqualizated != data.isEqualizated;
|
||||
const hasToInvoiceByAddress =
|
||||
originalData.hasToInvoiceByAddress || data.hasToInvoiceByAddress;
|
||||
|
@ -74,12 +71,6 @@ function isRequired({ isTaxDataChecked: taxDataChecked }) {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData auto-load @on-fetch="(data) => (typesTaxes = data)" url="SageTaxTypes" />
|
||||
<FetchData
|
||||
auto-load
|
||||
@on-fetch="(data) => (typesTransactions = data)"
|
||||
url="SageTransactionTypes"
|
||||
/>
|
||||
<FormModel
|
||||
:url-update="`Clients/${route.params.id}/updateFiscalData`"
|
||||
auto-load
|
||||
|
@ -89,6 +80,7 @@ function isRequired({ isTaxDataChecked: taxDataChecked }) {
|
|||
@on-data-saved="checkEtChanges"
|
||||
>
|
||||
<template #form="{ data, validate, validations }">
|
||||
{{ isTaxDataChecked }} {{ data.isTaxDataChecked }}
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('Social name')"
|
||||
|
|
|
@ -15,6 +15,9 @@ describe('Client fiscal data', () => {
|
|||
cy.get('.q-card').should('be.visible');
|
||||
checkSageFields();
|
||||
cy.get('[data-cy="vnCheckboxVerified data"]').click();
|
||||
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content').click();
|
||||
checkSageFields();
|
||||
cy.get('[data-cy="vnCheckboxVerified data"]').click();
|
||||
checkSageFields(true);
|
||||
cy.get('#searchbar input').clear();
|
||||
cy.get('#searchbar input').type('1{enter}');
|
||||
|
|
Loading…
Reference in New Issue