(showLetter.value = false));
{{ title.charAt(0) }}
-
+
+
diff --git a/src/pages/Customer/Card/CustomerBasicData.vue b/src/pages/Customer/Card/CustomerBasicData.vue
index c6e987fa8..1a86d9f31 100644
--- a/src/pages/Customer/Card/CustomerBasicData.vue
+++ b/src/pages/Customer/Card/CustomerBasicData.vue
@@ -169,7 +169,6 @@ function onBeforeSave(formData, originalData) {
url="Clients"
:input-debounce="0"
:label="t('customer.basicData.previousClient')"
- :options="clients"
:rules="validate('client.transferorFk')"
emit-value
map-options
diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue
index 3cb17332c..865287aeb 100644
--- a/src/pages/Customer/CustomerList.vue
+++ b/src/pages/Customer/CustomerList.vue
@@ -12,6 +12,7 @@ import RightMenu from 'src/components/common/RightMenu.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import { toDate } from 'src/filters';
import CustomerFilter from './CustomerFilter.vue';
+import VnAvatar from 'src/components/ui/VnAvatar.vue';
const { t } = useI18n();
const router = useRouter();
diff --git a/test/cypress/integration/vnComponent/VnLocation.spec.js b/test/cypress/integration/vnComponent/VnLocation.spec.js
index b98d42fdd..82d12a1e4 100644
--- a/test/cypress/integration/vnComponent/VnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/VnLocation.spec.js
@@ -43,11 +43,9 @@ describe('VnLocation', () => {
province
);
cy.get(
- `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) > .q-icon`
+ `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) `
).click();
- cy.get(
- `#q-portal--dialog--5 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input`
- ).should('have.value', province);
+ cy.dataCy('locationProvince').should('have.value', province);
});
});
describe('Worker Create', () => {
@@ -123,32 +121,16 @@ describe('VnLocation', () => {
const province = randomString({ length: 4 });
cy.get(createLocationButton).click();
cy.get(dialogInputs).eq(0).type(postCode);
- cy.get(
- `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
- ).click();
- cy.selectOption('#q-portal--dialog--3 .q-select', 'one');
- cy.get('#q-portal--dialog--3 .q-input').type(province);
- cy.get('#q-portal--dialog--3 .q-btn--standard').click();
- cy.get('#q-portal--dialog--1 .q-btn--standard').click();
+ cy.dataCy('City_icon').click();
+ cy.selectOption('[data-cy="locationProvince"]:last', 'Province one');
+ cy.dataCy('cityName').type(province);
+ cy.dataCy('FormModelPopup_save').eq(1).click();
+ cy.dataCy('FormModelPopup_save').eq(0).click();
+
cy.waitForElement('.q-form');
checkVnLocation(postCode, province);
});
- it('Create province without country', () => {
- const provinceName = 'Saskatchew'.concat(Math.random(1 * 100));
- cy.get(createLocationButton).click();
- cy.get(
- `${createForm.prefix} > :nth-child(5) > .q-select > ${createForm.sufix} > :nth-child(2) `
- )
- .eq(0)
- .click();
- cy.selectOption('#q-portal--dialog--3 .q-select', 'one');
- cy.countSelectOptions('#q-portal--dialog--3 .q-select', 4);
- cy.get('#q-portal--dialog--3 .q-input').type(provinceName);
-
- cy.get('#q-portal--dialog--3 .q-btn--standard').click();
- });
-
it('Create city with country', () => {
const cityName = 'Saskatchew'.concat(Math.random(1 * 100));
cy.get(createLocationButton).click();
@@ -156,14 +138,23 @@ describe('VnLocation', () => {
`${createForm.prefix} > :nth-child(5) > :nth-child(3) `,
'Italia'
);
- cy.get(
- `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
- ).click();
- cy.selectOption('#q-portal--dialog--4 .q-select', 'Province four');
- cy.countSelectOptions('#q-portal--dialog--4 .q-select', 1);
+ cy.dataCy('City_icon').click();
+ cy.selectOption('[data-cy="locationProvince"]:last', 'Province four');
+ cy.countSelectOptions('[data-cy="locationProvince"]:last', 1);
- cy.get('#q-portal--dialog--4 .q-input').type(cityName);
- cy.get('#q-portal--dialog--4 .q-btn--standard').click();
+ cy.dataCy('cityName').type(cityName);
+ cy.dataCy('FormModelPopup_save').eq(1).click();
+ });
+
+ it('Create province without country', () => {
+ const provinceName = 'Saskatchew'.concat(Math.random(1 * 100));
+ cy.get(createLocationButton).click();
+ cy.dataCy('Province_icon').click();
+ cy.selectOption('[data-cy="autonomyProvince"] ', 'Autonomy one');
+ cy.countSelectOptions('[data-cy="autonomyProvince"]', 4);
+ cy.dataCy('provinceName').type(provinceName);
+
+ cy.dataCy('FormModelPopup_save').eq(1).click();
});
it('Create province with country', () => {
@@ -173,17 +164,13 @@ describe('VnLocation', () => {
`${createForm.prefix} > :nth-child(5) > :nth-child(3) `,
'EspaƱa'
);
- cy.get(
- `${createForm.prefix} > :nth-child(5) > .q-select > ${createForm.sufix} > :nth-child(2) `
- )
- .eq(0)
- .click();
+ cy.dataCy('Province_icon').click();
- cy.selectOption('#q-portal--dialog--4 .q-select', 'one');
- cy.countSelectOptions('#q-portal--dialog--4 .q-select', 2);
+ cy.selectOption('[data-cy="autonomyProvince"] ', 'Autonomy one');
+ cy.countSelectOptions('[data-cy="autonomyProvince"]', 2);
- cy.get('#q-portal--dialog--4 .q-input').type(provinceName);
- cy.get('#q-portal--dialog--4 .q-btn--standard').click();
+ cy.dataCy('provinceName').type(provinceName);
+ cy.dataCy('FormModelPopup_save').eq(1).click();
});
function checkVnLocation(postCode, province) {