FIX: Filter read/unread notifications on the server side (#10152)

https://meta.discourse.org/t/notifications-unread-only-filter/37621/32
This commit is contained in:
Ahmed Gagan
2020-07-02 15:36:00 +05:30
committed by GitHub
parent 95153356ea
commit 04d7693355
9 changed files with 76 additions and 29 deletions
@@ -0,0 +1,32 @@
import { acceptance } from "helpers/qunit-helpers";
import selectKit from "helpers/select-kit-helper";
acceptance("NotificationsFilter", {
loggedIn: true
});
test("Notifications filter true", async assert => {
await visit("/u/eviltrout/notifications");
assert.ok(find(".large-notification").length >= 0);
});
test("Notifications filter read", async assert => {
await visit("/u/eviltrout/notifications");
const dropdown = selectKit(".notifications-filter");
await dropdown.expand();
await dropdown.selectRowByValue("read");
assert.ok(find(".large-notification").length >= 0);
});
test("Notifications filter unread", async assert => {
await visit("/u/eviltrout/notifications");
const dropdown = selectKit(".notifications-filter");
await dropdown.expand();
await dropdown.selectRowByValue("unread");
assert.ok(find(".large-notification").length >= 0);
});