2024-05-24 09:43:54 +00:00
|
|
|
describe('WorkerLocker', () => {
|
2024-09-06 07:05:29 +00:00
|
|
|
const productionId = 49;
|
2024-05-28 10:12:31 +00:00
|
|
|
const lockerCode = '2F';
|
2024-05-10 14:01:32 +00:00
|
|
|
const input = '.q-card input';
|
2024-08-07 10:57:00 +00:00
|
|
|
const thirdOpt = '[role="listbox"] .q-item:nth-child(1)';
|
2024-05-10 14:01:32 +00:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1280, 720);
|
|
|
|
cy.login('productionBoss');
|
2024-09-06 07:05:29 +00:00
|
|
|
cy.visit(`/#/worker/${productionId}/locker`);
|
2024-05-10 14:01:32 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should allocates a locker', () => {
|
|
|
|
cy.get(input).click();
|
2024-07-29 08:10:34 +00:00
|
|
|
cy.waitForElement('[role="listbox"]');
|
|
|
|
cy.get(thirdOpt).click();
|
2024-05-10 14:01:32 +00:00
|
|
|
cy.saveCard();
|
|
|
|
cy.get(input).invoke('val').should('eq', lockerCode);
|
|
|
|
});
|
|
|
|
});
|