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

20 lines
589 B
JavaScript

describe('WorkerLocker', () => {
const workerId = 1109;
const lockerCode = '2F';
const input = '.q-card input';
const thirdOpt = '[role="listbox"] .q-item:nth-child(3)';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('productionBoss');
cy.visit(`/#/worker/${workerId}/locker`);
});
it('should allocates a locker', () => {
cy.get(input).click();
cy.waitForElement('[role="listbox"]');
cy.get(thirdOpt).click();
cy.saveCard();
cy.get(input).invoke('val').should('eq', lockerCode);
});
});