refs #4797 minor fixes
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-05-15 10:57:17 +02:00
parent f53745f1f7
commit ecb83f24dc
2 changed files with 7 additions and 7 deletions

View File

@ -83,7 +83,7 @@ async function toggleNotification(notification) {
v-show=" v-show="
notifications.filter( notifications.filter(
(notification) => notification.active == true (notification) => notification.active == true
).length > 0 ).length
" "
> >
<QItemLabel header class="text-h6"> <QItemLabel header class="text-h6">
@ -108,7 +108,7 @@ async function toggleNotification(notification) {
</div> </div>
</QItem> </QItem>
</div> </div>
<div v-show="notifications.length > 0"> <div v-show="notifications.length">
<QItemLabel header class="text-h6"> <QItemLabel header class="text-h6">
{{ t('worker.notificationsManager.availableNotifications') }} {{ t('worker.notificationsManager.availableNotifications') }}
</QItemLabel> </QItemLabel>

View File

@ -6,22 +6,22 @@ describe('WorkerNotificationsManager', () => {
cy.visit(`/#/worker/${workerId}/notifications`); 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-chip').should('have.length', 3);
cy.get('.q-toggle__thumb').eq(0).click(); cy.get('.q-toggle__thumb').eq(0).click();
cy.get('.q-notification__message').should('have.text', 'Unsubscribed from the notification'); cy.get('.q-notification__message').should('have.text', 'Unsubscribed from the notification');
cy.get('.q-chip > .q-icon').eq(0).click(); 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-chip').should('have.length', 1);
cy.get('.q-toggle__thumb').should('have.length', 3).eq(0).click(); 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-notification__message').should('have.text', 'Subscribed to the notification');
cy.get('.q-toggle__thumb').should('have.length', 3).eq(1).click(); 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-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); cy.get('.q-chip').should('have.length', 3);
}); });
}); });