forked from verdnatura/salix-front
test: VnLocation
This commit is contained in:
parent
271e33a999
commit
f06723a919
|
@ -36,20 +36,23 @@ describe('VnLocation', () => {
|
||||||
});
|
});
|
||||||
it('Fin by postalCode', () => {
|
it('Fin by postalCode', () => {
|
||||||
const postCode = '46600';
|
const postCode = '46600';
|
||||||
|
const postCodeLabel = '46600, Valencia(Province one), España';
|
||||||
const firstOption = '[role="listbox"] .q-item:nth-child(1)';
|
const firstOption = '[role="listbox"] .q-item:nth-child(1)';
|
||||||
|
|
||||||
cy.get(inputLocation).click();
|
cy.get(inputLocation).click();
|
||||||
cy.get(inputLocation).clear();
|
cy.get(inputLocation).clear();
|
||||||
cy.get(inputLocation).type(postCode);
|
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(firstOption).click();
|
||||||
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content > .q-icon').click();
|
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content > .q-icon').click();
|
||||||
cy.reload();
|
cy.reload();
|
||||||
cy.waitForElement('.q-form');
|
cy.waitForElement('.q-form');
|
||||||
cy.get(inputLocation).should(
|
cy.get(inputLocation).should('have.value', postCodeLabel);
|
||||||
'have.value',
|
|
||||||
'46600 - Valencia(Province one), España'
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Create postCode', () => {
|
it('Create postCode', () => {
|
||||||
|
|
Loading…
Reference in New Issue