From ecb83f24dca31822c6e0ec51a6c555db291be790 Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 15 May 2023 10:57:17 +0200 Subject: [PATCH] refs #4797 minor fixes --- src/pages/Worker/Card/WorkerNotificationsManager.vue | 4 ++-- .../integration/workerNotificationsManager.spec.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/Worker/Card/WorkerNotificationsManager.vue b/src/pages/Worker/Card/WorkerNotificationsManager.vue index 7dfd8bf10..13c9b3de2 100644 --- a/src/pages/Worker/Card/WorkerNotificationsManager.vue +++ b/src/pages/Worker/Card/WorkerNotificationsManager.vue @@ -83,7 +83,7 @@ async function toggleNotification(notification) { v-show=" notifications.filter( (notification) => notification.active == true - ).length > 0 + ).length " > @@ -108,7 +108,7 @@ async function toggleNotification(notification) { -
+
{{ t('worker.notificationsManager.availableNotifications') }} diff --git a/test/cypress/integration/workerNotificationsManager.spec.js b/test/cypress/integration/workerNotificationsManager.spec.js index 63069229a..6c5aa21fb 100644 --- a/test/cypress/integration/workerNotificationsManager.spec.js +++ b/test/cypress/integration/workerNotificationsManager.spec.js @@ -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); }); });