From 9a96f2287034acd5a590588aa95f2b30becd5fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Wed, 17 Apr 2019 22:29:55 +0200 Subject: [PATCH] Finish Mention.feature :cucumber: --- cypress/integration/common/steps.js | 4 +++- webapp/components/notifications/Notification/index.vue | 6 ++++-- webapp/components/notifications/NotificationMenu/index.vue | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index 42932619a..85a660f43 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -301,7 +301,7 @@ When('I log in with the following credentials:', table => { When('open the notification menu and click on the first item', () => { cy.get('.notifications-menu').click() - cy.get('.notifications-menu-popover a').first().click() + cy.get('.notification-mention-post').first().click() }) Then('see {int} unread notifications in the top menu', count => { @@ -327,7 +327,9 @@ When('mention {string} in the text', (mention) => { }) Then('the notification gets marked as read', () => { + cy.get('.notification').first().should('have.class', 'read') }) Then('there are no notifications in the top menu', () => { + cy.get('.notifications-menu').should('contain', '0') }) diff --git a/webapp/components/notifications/Notification/index.vue b/webapp/components/notifications/Notification/index.vue index 40b7d9405..de873f078 100644 --- a/webapp/components/notifications/Notification/index.vue +++ b/webapp/components/notifications/Notification/index.vue @@ -1,5 +1,8 @@