mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Pre-select Later Today on bookmark edit if the time is the same (#9636)
If the user chooses "Later Today" as the reminder for a bookmark, then edits that bookmark, we should pre-select "Later Today" if that time has not changed (e.g. later is still 6pm). We do this to avoid confusion instead of opening the custom date + time section.
This commit is contained in:
@@ -195,3 +195,21 @@ test("Editing a bookmark", async assert => {
|
||||
);
|
||||
assert.verifySteps(["tomorrow"]);
|
||||
});
|
||||
|
||||
test("Editing a bookmark that has a Later Today reminder, and it is before 6pm today", async assert => {
|
||||
mockSuccessfulBookmarkPost(assert);
|
||||
await visit("/t/internationalization-localization/280");
|
||||
await openBookmarkModal();
|
||||
await fillIn("input#bookmark-name", "Test name");
|
||||
await click("#tap_tile_later_today");
|
||||
await openEditBookmarkModal();
|
||||
assert.not(
|
||||
exists("#bookmark-custon-date > input"),
|
||||
"it does not show the custom date input"
|
||||
);
|
||||
assert.ok(
|
||||
exists("#tap_tile_later_today.active"),
|
||||
"it preselects Later Today"
|
||||
);
|
||||
assert.verifySteps(["later_today"]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user