mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 21:08:03 +08:00
UX: new inline button to remove a topic timer (#7790)
This commit is contained in:
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user