Skip to content

Commit

Permalink
Fix: linting, integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rbeer committed Mar 5, 2020
1 parent d5cbfb1 commit 8ffda5e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
11 changes: 5 additions & 6 deletions cypress/integration/common/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,13 @@ When("mention {string} in the text", mention => {
.click();
});

Then("the notification gets marked as read", () => {
cy.get(".notifications-menu-popover .notification")
.first()
.should("have.class", "--read");
Then("the unread counter is removed", () => {
cy.get('.notifications-menu .counter-icon').should('not.exist');
});

Then("there are no notifications in the top menu", () => {
cy.get(".notifications-menu").should("contain", "0");
Then("the notification menu button links to the all notifications page", () => {
cy.get(".notifications-menu").click();
cy.location("pathname").should("contain", "/notifications");
});

Given("there is an annoying user called {string}", name => {
Expand Down
6 changes: 3 additions & 3 deletions cypress/integration/notifications/Mentions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Feature: Notification for a mention
And see 1 unread notifications in the top menu
And open the notification menu and click on the first item
Then I get to the post page of ".../hey-matt"
And the notification gets marked as read
But when I refresh the page
Then there are no notifications in the top menu
And the unread counter is removed
And the notification menu button links to the all notifications page

4 changes: 2 additions & 2 deletions webapp/components/NotificationMenu/NotificationMenu.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('NotificationMenu.vue', () => {
}
}
stubs = {
NuxtLink: RouterLinkStub
NuxtLink: RouterLinkStub,
}
})

Expand All @@ -32,7 +32,7 @@ describe('NotificationMenu.vue', () => {
data,
mocks,
localVue,
stubs
stubs,
})
}

Expand Down
6 changes: 5 additions & 1 deletion webapp/components/NotificationMenu/NotificationMenu.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<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 />
</nuxt-link>
<dropdown v-else class="notifications-menu" offset="8" :placement="placement">
Expand Down

0 comments on commit 8ffda5e

Please sign in to comment.