2024-07-03 07:33:48 +00:00
|
|
|
describe('VnLocation', () => {
|
2024-07-29 13:03:21 +00:00
|
|
|
const locationOptions = '[role="listbox"] > div.q-virtual-scroll__content > .q-item';
|
2024-07-03 07:33:48 +00:00
|
|
|
const dialogInputs = '.q-dialog label input';
|
2024-07-29 13:03:21 +00:00
|
|
|
const createLocationButton = '.q-form > .q-card > .vn-row:nth-child(6) .--add-icon';
|
|
|
|
const inputLocation = '.q-form input[aria-label="Location"]';
|
2024-07-03 07:33:48 +00:00
|
|
|
describe('Worker Create', () => {
|
2024-07-29 13:03:21 +00:00
|
|
|
// beforeEach(() => {
|
|
|
|
// cy.viewport(1280, 720);
|
|
|
|
// cy.login('developer');
|
|
|
|
// cy.visit('/#/worker/create', { timeout: 5000 });
|
|
|
|
// cy.waitForElement('.q-card');
|
|
|
|
// });
|
|
|
|
// it('Show all options', function () {
|
|
|
|
// cy.get(inputLocation).click();
|
|
|
|
// cy.get(locationOptions).should('have.length.at.least', 5);
|
|
|
|
// });
|
|
|
|
// 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.at.least', 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.at.least', 1);
|
|
|
|
// });
|
2024-07-03 07:33:48 +00:00
|
|
|
});
|
|
|
|
describe('Fiscal-data', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1280, 720);
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
|
|
|
|
cy.waitForElement('.q-form');
|
2024-07-29 13:03:21 +00:00
|
|
|
cy.get(createLocationButton).click();
|
2024-07-03 07:33:48 +00:00
|
|
|
});
|
2024-07-29 13:03:21 +00:00
|
|
|
it('Create postCode', () => {
|
|
|
|
const postCode = '1234453';
|
2024-07-03 07:33:48 +00:00
|
|
|
cy.get('.q-card > h1').should('have.text', 'New postcode');
|
2024-07-29 13:03:21 +00:00
|
|
|
cy.get(dialogInputs).eq(0).clear();
|
|
|
|
cy.get(dialogInputs).eq(0).type(postCode);
|
2024-07-03 07:33:48 +00:00
|
|
|
cy.selectOption(
|
|
|
|
'.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control ',
|
|
|
|
'Valencia'
|
|
|
|
);
|
|
|
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
2024-07-29 13:03:21 +00:00
|
|
|
cy.get(':nth-child(6) > .q-input input').contains(postCode);
|
2024-07-03 07:33:48 +00:00
|
|
|
});
|
2024-07-29 13:03:21 +00:00
|
|
|
// it('Create city', () => {
|
|
|
|
// const postCode = '9011';
|
|
|
|
// const province = 'Saskatchewan';
|
|
|
|
// cy.get(dialogInputs).eq(0).type(postCode);
|
|
|
|
// // city create button
|
|
|
|
// cy.get(
|
|
|
|
// '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon'
|
|
|
|
// ).click();
|
|
|
|
// cy.selectOption('#q-portal--dialog--2 .q-select', 'one');
|
|
|
|
// cy.get('#q-portal--dialog--2 .q-input').type(province);
|
|
|
|
// cy.get('#q-portal--dialog--2 .q-btn--standard').click();
|
|
|
|
// cy.get('#q-portal--dialog--1 .q-btn--standard').click();
|
|
|
|
// cy.get(inputLocation).contains(postCode);
|
|
|
|
// cy.get(inputLocation).contains(province);
|
|
|
|
// });
|
2024-07-03 07:33:48 +00:00
|
|
|
});
|
|
|
|
});
|