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", () => {
|
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");
|
||||||
});
|
});
|
||||||
|
|||||||
@ -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" />
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user