Add a test for topic timer notice

This commit is contained in:
Isaac Janzen 2022-04-19 15:48:18 -05:00 committed by Alan Guo Xiang Tan
parent e6e0c76c94
commit 900fcb9da0

@ -370,4 +370,18 @@ acceptance("Topic - Edit timer", function (needs) {
assert.deepEqual(options, expected);
});
test("Does not show timer notice unless timer set", async function (assert) {
updateCurrentUser({ moderator: true });
await visit("/t/internationalization-localization");
await click(".toggle-admin-menu");
await click(".admin-topic-timer-update button");
const timerType = selectKit(".select-kit.timer-type");
await timerType.expand();
await timerType.selectRowByValue("close_after_last_post");
assert.notOk(exists(".topic-timer-heading"));
});
});