Fix cypress tests

This commit is contained in:
roschaefer 2019-08-30 02:13:58 +02:00
parent f635b0cbd5
commit 66b12090a7
3 changed files with 4 additions and 4 deletions

View File

@ -357,7 +357,7 @@ When("mention {string} in the text", mention => {
}); });
Then("the notification gets marked as read", () => { Then("the notification gets marked as read", () => {
cy.get(".post.createdAt") cy.get(".notifications-menu-popover .notification")
.first() .first()
.should("have.class", "read"); .should("have.class", "read");
}); });

View File

@ -1,5 +1,5 @@
<template> <template>
<ds-space :class="[{ read: notification.read }, notification]" margin-bottom="x-small"> <ds-space :class="{ read: notification.read, notification: true}" margin-bottom="x-small">
<client-only> <client-only>
<ds-space margin-bottom="x-small"> <ds-space margin-bottom="x-small">
<hc-user :user="from.author" :date-time="from.createdAt" :trunc="35" /> <hc-user :user="from.author" :date-time="from.createdAt" :trunc="35" />

View File

@ -46,8 +46,8 @@ export default {
variables, variables,
}) })
if (!(markAsRead && markAsRead.read === true)) return if (!(markAsRead && markAsRead.read === true)) return
this.notifications = this.notifications.filter(n => { this.notifications = this.notifications.map(n => {
return n.from.id !== markAsRead.from.id return (n.from.id === markAsRead.from.id) ? markAsRead : n
}) })
} catch (err) { } catch (err) {
throw new Error(err) throw new Error(err)