2023-11-10 14:48:31 -08:00
|
|
|
import { WorkerViewPage } from '../pages';
|
|
|
|
|
|
|
|
const workerViewPage = new WorkerViewPage();
|
|
|
|
|
|
|
|
describe('Worker View (unlicensed)', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.disableFeature('workerView');
|
|
|
|
cy.disableQueueMode();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should not show up in the menu sidebar', () => {
|
2024-06-11 05:45:15 -07:00
|
|
|
cy.signinAsMember(0);
|
2023-11-10 14:48:31 -08:00
|
|
|
cy.visit(workerViewPage.url);
|
|
|
|
workerViewPage.getters.menuItem().should('not.exist');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should show action box', () => {
|
2024-06-11 05:45:15 -07:00
|
|
|
cy.signinAsMember(0);
|
2023-11-10 14:48:31 -08:00
|
|
|
cy.visit(workerViewPage.url);
|
|
|
|
workerViewPage.getters.workerViewUnlicensed().should('exist');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Worker View (licensed)', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.enableFeature('workerView');
|
|
|
|
cy.enableQueueMode();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should show up in the menu sidebar', () => {
|
2024-06-11 05:45:15 -07:00
|
|
|
cy.signinAsOwner();
|
2023-11-10 14:48:31 -08:00
|
|
|
cy.enableQueueMode();
|
|
|
|
cy.visit(workerViewPage.url);
|
|
|
|
workerViewPage.getters.menuItem().should('exist');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should show worker list view', () => {
|
2024-06-11 05:45:15 -07:00
|
|
|
cy.signinAsMember(0);
|
2023-11-10 14:48:31 -08:00
|
|
|
cy.visit(workerViewPage.url);
|
|
|
|
workerViewPage.getters.workerViewLicensed().should('exist');
|
|
|
|
});
|
|
|
|
});
|