A platform for community discussion. Free, open, simple.
Add a test for topic timer notice
Isaac Janzen900fcb9da031
diff --git a/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js b/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.jsindex 2ef5bc385cb..ed49efa101e 100644--- a/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js+++ b/app/assets/javascripts/discourse/tests/acceptance/topic-edit-timer-test.js@@ -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"));+ });});