fix: refs #6942 vnLocation
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-03-06 10:19:14 +01:00
parent 48bde504c9
commit c1804790a8
1 changed files with 20 additions and 17 deletions

View File

@ -1,7 +1,8 @@
const locationOptions ='[role="listbox"] > div.q-virtual-scroll__content > .q-item'
const locationOptions = '[role="listbox"] > div.q-virtual-scroll__content > .q-item';
describe('VnLocation', () => {
describe('Create',()=>{
const inputLocation = ':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control';
describe('Create', () => {
const inputLocation =
':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
@ -9,40 +10,42 @@ describe('VnLocation', () => {
cy.waitForElement('.q-card');
});
it('Show all options', function() {
it('Show all options', function () {
cy.get(inputLocation).click();
cy.get(locationOptions).should('have.length',5);
cy.get(locationOptions).should('have.length', 5);
});
it('input filter location as "al"', function() {
it('input filter location as "al"', function () {
cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('al');
cy.get(locationOptions).should('have.length',3);
cy.get(locationOptions).should('have.length', 5);
});
it('input filter location as "ecuador"', function() {
it('input filter location as "ecuador"', function () {
cy.get(inputLocation).click();
cy.get(inputLocation).clear();
cy.get(inputLocation).type('ecuador');
cy.get(locationOptions).should('have.length',1);
cy.get(locationOptions).should('have.length', 1);
cy.get(`${locationOptions}:nth-child(1)`).click();
cy.get(':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon').click();
cy.get(
':nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon'
).click();
});
});
describe('Fiscal-data',()=>{
const inputLocation = ':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control';
describe('Fiscal-data', () => {
const inputLocation =
':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/supplier/567/fiscal-data', {timeout: 2000});
cy.visit('/#/supplier/567/fiscal-data', { timeout: 2000 });
cy.waitForElement('.q-card');
});
it('Show all options', function() {
it('Show all options', function () {
cy.get(inputLocation).click();
cy.get(locationOptions).should('have.length', 1);
});
});
})
});