UX: new inline button to remove a topic timer (#7790)

This commit is contained in:
Penar Musaraj
2019-06-26 11:08:53 -04:00
committed by GitHub
parent 13f38055ac
commit 76307611dc
6 changed files with 72 additions and 8 deletions

View File

@ -263,3 +263,22 @@ QUnit.test(
assert.notOk(regex.test(newTopicStatusInfo));
}
);
QUnit.test("Inline delete timer", async assert => {
updateCurrentUser({ admin: true, staff: true, canManageTopic: true });
const futureDateInputSelector = selectKit(".future-date-input-selector");
await visit("/t/internationalization-localization");
await click(".toggle-admin-menu");
await click(".topic-admin-status-update button");
await futureDateInputSelector.expand();
await futureDateInputSelector.selectRowByValue("next_week");
await click(".modal-footer button.btn-primary");
const removeTimerButton = find(".topic-status-info .topic-timer-remove");
assert.equal(removeTimerButton.attr("title"), "remove timer");
await click(".topic-status-info .topic-timer-remove");
const topicStatusInfo = find(".topic-status-info .topic-timer-remove");
assert.equal(topicStatusInfo.length, 0);
});