0
0
Fork 0
salix-front-mindshore-fork2/test/cypress/integration/VnLocation.spec.js

49 lines
1.8 KiB
JavaScript
Raw Normal View History

2024-01-24 07:30:09 +00:00
const locationOptions ='[role="listbox"] > div.q-virtual-scroll__content > .q-item'
describe('VnLocation', () => {
2024-02-02 13:52:19 +00:00
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');
cy.visit('/#/worker/create');
cy.waitForElement('.q-card');
});
2024-01-24 07:30:09 +00:00
2024-02-02 13:52:19 +00:00
it('Show all options', function() {
cy.get(inputLocation).click();
cy.get(locationOptions).should('have.length',5);
});
2024-01-24 07:30:09 +00:00
2024-02-02 13:52:19 +00:00
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);
});
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}: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();
2024-02-02 13:41:59 +00:00
2024-02-02 13:52:19 +00:00
});
});
2024-02-02 13:41:59 +00:00
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.waitForElement('.q-card');
});
it('Show all options', function() {
cy.get(inputLocation).click();
2024-02-02 13:52:19 +00:00
cy.get(locationOptions).should('have.length', 1);
2024-02-02 13:41:59 +00:00
});
2024-01-24 07:30:09 +00:00
});
})