salix-front/test/cypress/integration/worker/workerLocker.spec.js

20 lines
582 B
JavaScript
Raw Normal View History

describe('WorkerList', () => {
2024-05-13 14:22:12 +00:00
const workerId = 1109;
const lockerCode = '201A';
const input = '.q-card input';
const firstOpt = '[role="listbox"] .q-item:nth-child(1)';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('productionBoss');
cy.visit(`/#/worker/${workerId}/locker`);
});
it('should allocates a locker', () => {
cy.get(input).click();
cy.get(input).type(lockerCode);
cy.get(firstOpt).click();
cy.saveCard();
cy.get(input).invoke('val').should('eq', lockerCode);
});
});