24 lines
885 B
JavaScript
24 lines
885 B
JavaScript
describe('ZoneLocations', () => {
|
|
const data = {
|
|
Warehouse: { val: 'Warehouse One', type: 'select' },
|
|
};
|
|
|
|
const postalCode = '[style=""] > :nth-child(1) > :nth-child(1) > :nth-child(2) > :nth-child(1) > :nth-child(1) > :nth-child(2) > :nth-child(1) > .q-tree__node--parent > .q-tree__node-collapsible > .q-tree__children'
|
|
|
|
beforeEach(() => {
|
|
cy.viewport(1280, 720);
|
|
cy.login('developer');
|
|
cy.visit(`/#/zone/2/location`);
|
|
});
|
|
|
|
it('should show all locations on entry', () => {
|
|
cy.get('.q-tree > :nth-child(1) > :nth-child(2) > :nth-child(1)').children().should('have.length', 9);
|
|
});
|
|
|
|
it('should be able to search by postal code', () => {
|
|
cy.get('#searchbarForm').type('46680');
|
|
cy.get('.router-link-active > .q-icon').click();
|
|
cy.get(postalCode).should('include.text', '46680')
|
|
});
|
|
});
|