fixes #4797 Seccion Worker/Notification #51

Merged
alexandre merged 23 commits from 4797-worker-notification-selector into dev 2023-05-15 09:42:17 +00:00
1 changed files with 27 additions and 0 deletions
Showing only changes of commit 5702e23c6f - Show all commits

View File

@ -0,0 +1,27 @@
describe('WorkerNotificationsManager', () => {
alexandre marked this conversation as resolved
Review

Feslos que no depenguen un de altres, per exemple el ultim depen dels anteriors

Feslos que no depenguen un de altres, per exemple el ultim depen dels anteriors
beforeEach(() => {
const workerId = 1110;
cy.viewport(1280, 720);
cy.login('salesBoss');
cy.visit(`/#/worker/${workerId}/notifications`);
});
it('should unsubscribe 2 notifications', () => {
cy.get('.q-chip').should('have.length', 3);
cy.get('.q-toggle__thumb').eq(0).click();
cy.get('.q-notification__message').should('have.text', 'Unsubscribed from the notification');
cy.get('.q-chip > .q-icon').eq(0).click();
});
it('should check the unsubscription has been saved and subscribe to other one', () => {
cy.get('.q-chip').should('have.length', 1);
cy.get('.q-toggle__thumb').should('have.length', 3).eq(1).click();
cy.get('.q-notification__message').should('have.text', 'Subscribed to the notification');
cy.get('.q-toggle__thumb').should('have.length', 3).eq(2).click();
cy.get('.q-notification__message').should('have.text', 'Subscribed to the notification');
});
it('should check the data has been saved', () => {
cy.get('.q-chip').should('have.length', 3);
});
});