200 files
This commit is contained in:
+13
-6
@@ -186,18 +186,25 @@ describe("task-detail renderer", () => {
|
||||
toggleArchive: () => calls.push("archive"),
|
||||
}));
|
||||
const items = [...host.querySelectorAll(".popup-menu-item")];
|
||||
// edit, qr, worksheet, duplicate, reset, postpone, snooze, archive, delete
|
||||
expect(items.length).to.equal(9);
|
||||
(items[5] as HTMLElement).click(); // postpone
|
||||
(items[6] as HTMLElement).click(); // snooze
|
||||
// edit, qr, worksheet, duplicate, move (#23), reset, postpone, snooze, archive, delete
|
||||
expect(items.length).to.equal(10);
|
||||
(items[6] as HTMLElement).click(); // postpone
|
||||
(items[7] as HTMLElement).click(); // snooze
|
||||
(items[2] as HTMLElement).click(); // work sheet (v2.21)
|
||||
(items[7] as HTMLElement).click(); // archive (demoted from the header)
|
||||
(items[8] as HTMLElement).click(); // delete (danger)
|
||||
(items[8] as HTMLElement).click(); // archive (demoted from the header)
|
||||
(items[9] as HTMLElement).click(); // delete (danger)
|
||||
expect(calls).to.deep.equal([
|
||||
"close", "postpone", "close", "snooze", "close", "worksheet", "close", "archive", "close", "delete",
|
||||
]);
|
||||
});
|
||||
|
||||
it("shows a bell-off badge for a muted task (#173), and none otherwise", () => {
|
||||
const muted = mount(task({ notify_enabled: false }), ctx());
|
||||
expect(muted.querySelector(".muted-badge")).to.exist;
|
||||
const loud = mount(task(), ctx());
|
||||
expect(loud.querySelector(".muted-badge")).to.not.exist;
|
||||
});
|
||||
|
||||
it("shows a postponed badge when the task has a due_override, and none otherwise", () => {
|
||||
const plain = mount(task(), ctx());
|
||||
expect(plain.querySelector(".postponed-badge")).to.be.null;
|
||||
|
||||
Reference in New Issue
Block a user