0
0
Fork 0

test: VnLocation

This commit is contained in:
Javier Segarra 2024-09-23 11:39:10 +02:00
parent 271e33a999
commit f06723a919
1 changed files with 8 additions and 5 deletions

View File

@ -36,20 +36,23 @@ describe('VnLocation', () => {
});
it('Fin by postalCode', () => {
const postCode = '46600';
const postCodeLabel = '46600, Valencia(Province one), España';
const firstOption = '[role="listbox"] .q-item:nth-child(1)';
cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type(postCode);
cy.get(locationOptions).should('have.length.at.least', 2);
cy.get(locationOptions)
.get(':nth-child(1)')
.should('have.length.at.least', 2);
cy.get(
firstOption.concat(' > .q-item__section > .q-item__label--caption')
).should('have.text', postCodeLabel);
cy.get(firstOption).click();
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content > .q-icon').click();
cy.reload();
cy.waitForElement('.q-form');
cy.get(inputLocation).should(
'have.value',
'46600 - Valencia(Province one), España'
);
cy.get(inputLocation).should('have.value', postCodeLabel);
});
it('Create postCode', () => {