mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix cypress tests
This commit is contained in:
parent
f635b0cbd5
commit
66b12090a7
@ -357,7 +357,7 @@ When("mention {string} in the text", mention => {
|
||||
});
|
||||
|
||||
Then("the notification gets marked as read", () => {
|
||||
cy.get(".post.createdAt")
|
||||
cy.get(".notifications-menu-popover .notification")
|
||||
.first()
|
||||
.should("have.class", "read");
|
||||
});
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<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>
|
||||
<ds-space margin-bottom="x-small">
|
||||
<hc-user :user="from.author" :date-time="from.createdAt" :trunc="35" />
|
||||
|
||||
@ -46,8 +46,8 @@ export default {
|
||||
variables,
|
||||
})
|
||||
if (!(markAsRead && markAsRead.read === true)) return
|
||||
this.notifications = this.notifications.filter(n => {
|
||||
return n.from.id !== markAsRead.from.id
|
||||
this.notifications = this.notifications.map(n => {
|
||||
return (n.from.id === markAsRead.from.id) ? markAsRead : n
|
||||
})
|
||||
} catch (err) {
|
||||
throw new Error(err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user