Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 11:52:54 +01:00
FIX: direct after start time default for new wizard
Dieser Commit ist enthalten in:
Ursprung
270d7926cc
Commit
8d32aebf05
2 geänderte Dateien mit 14 neuen und 1 gelöschten Zeilen
|
@ -5,7 +5,10 @@ export default Controller.extend({
|
|||
title: "admin.wizard.after_time_modal.title",
|
||||
|
||||
setup() {
|
||||
this.set("bufferedDateTime", moment(this.model.dateTime));
|
||||
this.set(
|
||||
"bufferedDateTime",
|
||||
this.model.dateTime ? moment(this.model.dateTime) : moment(Date.now())
|
||||
);
|
||||
},
|
||||
|
||||
@discourseComputed("bufferedDateTime")
|
||||
|
|
|
@ -90,6 +90,16 @@ acceptance("Admin | Custom Wizard Unsuscribed", function (needs) {
|
|||
);
|
||||
const wizardLink = find("div.wizard-url a");
|
||||
assert.equal(wizardLink.length, 1, "Wizard link was created");
|
||||
await click(".btn-after-time");
|
||||
assert.ok(
|
||||
exists(".d-date-time-input .d-time-input span.name"),
|
||||
"a time selector is shown"
|
||||
)
|
||||
let timeText = query(
|
||||
".d-date-time-input .d-time-input span.name"
|
||||
).innerText;
|
||||
const regex = /\d\d\:\d\d/;
|
||||
assert.ok(regex.test(timeText));
|
||||
assert.equal(
|
||||
$.trim($("a[title='Subscribe to use these features']").text()),
|
||||
"Not Subscribed",
|
||||
|
|
Laden …
In neuem Issue referenzieren