test: fix VnLocation
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-10-08 11:07:05 +00:00
parent b6778aaf17
commit e0f60ed118
1 changed files with 8 additions and 4 deletions

View File

@ -64,7 +64,7 @@ describe('VnLocation', () => {
`${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) > .q-icon`
).click(); ).click();
cy.get( cy.get(
`#q-portal--dialog--4 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input` `#q-portal--dialog--5 > .q-dialog > ${createForm.prefix} > .vn-row > .q-select > ${createForm.sufix} > :nth-child(1) input`
).should('have.value', province); ).should('have.value', province);
}); });
}); });
@ -133,6 +133,8 @@ describe('VnLocation', () => {
); );
cy.get('.q-mt-lg > .q-btn--standard').click(); cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get(`${createForm.prefix}`).should('not.exist'); cy.get(`${createForm.prefix}`).should('not.exist');
cy.waitForElement('.q-form');
checkVnLocation(postCode, province); checkVnLocation(postCode, province);
}); });
it('Create city', () => { it('Create city', () => {
@ -144,10 +146,12 @@ describe('VnLocation', () => {
cy.get( cy.get(
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon` `${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
).click(); ).click();
cy.selectOption('#q-portal--dialog--2 .q-select', 'one'); cy.selectOption('#q-portal--dialog--3 .q-select', 'one');
cy.get('#q-portal--dialog--2 .q-input').type(province); cy.get('#q-portal--dialog--3 .q-input').type(province);
cy.get('#q-portal--dialog--2 .q-btn--standard').click(); cy.get('#q-portal--dialog--3 .q-btn--standard').click();
cy.get('#q-portal--dialog--1 .q-btn--standard').click(); cy.get('#q-portal--dialog--1 .q-btn--standard').click();
cy.waitForElement('.q-form');
checkVnLocation(postCode, province); checkVnLocation(postCode, province);
}); });