2024-04-15 11:11:21 +00:00
|
|
|
const locationOptions = '[role="listbox"] > div.q-virtual-scroll__content > .q-item';
|
2024-01-24 07:30:09 +00:00
|
|
|
describe('VnLocation', () => {
|
2024-04-15 11:11:21 +00:00
|
|
|
describe('Create', () => {
|
|
|
|
const inputLocation =
|
|
|
|
'.q-form .q-card> :nth-child(3) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control';
|
2024-02-02 13:52:19 +00:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1280, 720);
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit('/#/worker/create');
|
|
|
|
cy.waitForElement('.q-card');
|
|
|
|
});
|
2024-04-15 11:11:21 +00:00
|
|
|
it('Show all options', function () {
|
2024-04-09 05:47:40 +00:00
|
|
|
cy.get(inputLocation).click();
|
2024-04-15 11:11:21 +00:00
|
|
|
cy.get(locationOptions).should('have.length.at.least', 5);
|
2024-02-02 13:52:19 +00:00
|
|
|
});
|
2024-04-15 11:11:21 +00:00
|
|
|
it('input filter location as "al"', function () {
|
2024-02-02 13:52:19 +00:00
|
|
|
cy.get(inputLocation).click();
|
|
|
|
cy.get(inputLocation).clear();
|
|
|
|
cy.get(inputLocation).type('al');
|
2024-04-15 11:11:21 +00:00
|
|
|
cy.get(locationOptions).should('have.length.at.least', 3);
|
2024-02-02 13:52:19 +00:00
|
|
|
});
|
2024-04-15 11:11:21 +00:00
|
|
|
it('input filter location as "ecuador"', function () {
|
2024-02-02 13:52:19 +00:00
|
|
|
cy.get(inputLocation).click();
|
|
|
|
cy.get(inputLocation).clear();
|
|
|
|
cy.get(inputLocation).type('ecuador');
|
2024-04-15 11:11:21 +00:00
|
|
|
cy.get(locationOptions).should('have.length.at.least', 1);
|
2024-02-02 13:52:19 +00:00
|
|
|
cy.get(`${locationOptions}:nth-child(1)`).click();
|
2024-04-15 11:11:21 +00:00
|
|
|
cy.get(inputLocation + '> :nth-child(2) > .q-icon').click();
|
2024-02-02 13:52:19 +00:00
|
|
|
});
|
|
|
|
});
|
2024-04-15 11:11:21 +00:00
|
|
|
describe('Fiscal-data', () => {
|
2024-02-02 13:41:59 +00:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1280, 720);
|
|
|
|
cy.login('developer');
|
2024-04-15 11:11:21 +00:00
|
|
|
cy.visit('/#/supplier/567/fiscal-data', { timeout: 2000 });
|
2024-02-02 13:41:59 +00:00
|
|
|
cy.waitForElement('.q-card');
|
|
|
|
});
|
2024-04-15 11:11:21 +00:00
|
|
|
it('Create postCode', function () {
|
|
|
|
cy.get(
|
|
|
|
':nth-child(6) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(3) > .q-icon'
|
|
|
|
).click();
|
2024-04-09 05:47:40 +00:00
|
|
|
cy.get(' .q-card > h1').should('have.text', 'New postcode');
|
2024-04-15 11:11:21 +00:00
|
|
|
cy.get(
|
|
|
|
'.q-card > :nth-child(4) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(1) > input'
|
|
|
|
).clear('12');
|
|
|
|
cy.get(
|
|
|
|
'.q-card > :nth-child(4) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control > :nth-child(1) > input'
|
|
|
|
).type('1234453');
|
|
|
|
cy.selectOption(
|
|
|
|
'.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control ',
|
|
|
|
'Valencia'
|
|
|
|
);
|
|
|
|
cy.selectOption(
|
|
|
|
'.q-dialog__inner > .column > #formModel > .q-card > :nth-child(5) > :nth-child(1) > .q-field > .q-field__inner > .q-field__control ',
|
|
|
|
'Province one'
|
|
|
|
);
|
|
|
|
cy.selectOption(
|
|
|
|
'.q-dialog__inner > .column > #formModel > .q-card > :nth-child(5) > :nth-child(2) > .q-field > .q-field__inner > .q-field__control ',
|
|
|
|
'España'
|
|
|
|
);
|
2024-04-09 05:47:40 +00:00
|
|
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
2024-02-02 13:41:59 +00:00
|
|
|
});
|
2024-01-24 07:30:09 +00:00
|
|
|
});
|
2024-04-15 11:11:21 +00:00
|
|
|
});
|