mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix: linting, integration tests
This commit is contained in:
parent
d5cbfb142f
commit
8ffda5e908
@ -422,14 +422,13 @@ When("mention {string} in the text", mention => {
|
|||||||
.click();
|
.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
Then("the notification gets marked as read", () => {
|
Then("the unread counter is removed", () => {
|
||||||
cy.get(".notifications-menu-popover .notification")
|
cy.get('.notifications-menu .counter-icon').should('not.exist');
|
||||||
.first()
|
|
||||||
.should("have.class", "--read");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Then("there are no notifications in the top menu", () => {
|
Then("the notification menu button links to the all notifications page", () => {
|
||||||
cy.get(".notifications-menu").should("contain", "0");
|
cy.get(".notifications-menu").click();
|
||||||
|
cy.location("pathname").should("contain", "/notifications");
|
||||||
});
|
});
|
||||||
|
|
||||||
Given("there is an annoying user called {string}", name => {
|
Given("there is an annoying user called {string}", name => {
|
||||||
|
|||||||
@ -24,6 +24,6 @@ Feature: Notification for a mention
|
|||||||
And see 1 unread notifications in the top menu
|
And see 1 unread notifications in the top menu
|
||||||
And open the notification menu and click on the first item
|
And open the notification menu and click on the first item
|
||||||
Then I get to the post page of ".../hey-matt"
|
Then I get to the post page of ".../hey-matt"
|
||||||
And the notification gets marked as read
|
And the unread counter is removed
|
||||||
But when I refresh the page
|
And the notification menu button links to the all notifications page
|
||||||
Then there are no notifications in the top menu
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ describe('NotificationMenu.vue', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stubs = {
|
stubs = {
|
||||||
NuxtLink: RouterLinkStub
|
NuxtLink: RouterLinkStub,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ describe('NotificationMenu.vue', () => {
|
|||||||
data,
|
data,
|
||||||
mocks,
|
mocks,
|
||||||
localVue,
|
localVue,
|
||||||
stubs
|
stubs,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<nuxt-link v-if="!unreadNotificationsCount" class="notifications-menu" :to="{ name: 'notifications' }">
|
<nuxt-link
|
||||||
|
v-if="!unreadNotificationsCount"
|
||||||
|
class="notifications-menu"
|
||||||
|
:to="{ name: 'notifications' }"
|
||||||
|
>
|
||||||
<base-button icon="bell" ghost circle />
|
<base-button icon="bell" ghost circle />
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<dropdown v-else class="notifications-menu" offset="8" :placement="placement">
|
<dropdown v-else class="notifications-menu" offset="8" :placement="placement">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user