This commit is contained in:
parent
f53745f1f7
commit
ecb83f24dc
|
@ -83,7 +83,7 @@ async function toggleNotification(notification) {
|
|||
v-show="
|
||||
notifications.filter(
|
||||
(notification) => notification.active == true
|
||||
).length > 0
|
||||
).length
|
||||
"
|
||||
>
|
||||
<QItemLabel header class="text-h6">
|
||||
|
@ -108,7 +108,7 @@ async function toggleNotification(notification) {
|
|||
</div>
|
||||
</QItem>
|
||||
</div>
|
||||
<div v-show="notifications.length > 0">
|
||||
<div v-show="notifications.length">
|
||||
<QItemLabel header class="text-h6">
|
||||
{{ t('worker.notificationsManager.availableNotifications') }}
|
||||
</QItemLabel>
|
||||
|
|
|
@ -6,22 +6,22 @@ describe('WorkerNotificationsManager', () => {
|
|||
cy.visit(`/#/worker/${workerId}/notifications`);
|
||||
});
|
||||
|
||||
it('should unsubscribe 2 notifications', () => {
|
||||
it('should unsubscribe 2 notifications, check the unsubscription has been saved, subscribe to other one and should check the data has been saved', () => {
|
||||
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.reload();
|
||||
|
||||
cy.get('.q-chip').should('have.length', 1);
|
||||
cy.get('.q-toggle__thumb').should('have.length', 3).eq(0).click();
|
||||
cy.get('.q-notification__message').should('have.text', 'Subscribed to the notification');
|
||||
cy.get('.q-toggle__thumb').should('have.length', 3).eq(1).click();
|
||||
cy.get('.q-notification__message').should('have.text', 'Subscribed to the notification');
|
||||
});
|
||||
|
||||
it('should check the data has been saved', () => {
|
||||
cy.reload();
|
||||
|
||||
cy.get('.q-chip').should('have.length', 3);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue