1
0
Fork 0

Merge pull request #256 from paviliondev/fix_timer_default_on_new_wizard

FIX: direct after start time default for new wizard
Dieser Commit ist enthalten in:
Angus McLeod 2023-07-17 12:01:49 +01:00 committet von GitHub
Commit 10d597c495
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 15 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,10 @@ export default Controller.extend({
title: "admin.wizard.after_time_modal.title", title: "admin.wizard.after_time_modal.title",
setup() { setup() {
this.set("bufferedDateTime", moment(this.model.dateTime)); this.set(
"bufferedDateTime",
this.model.dateTime ? moment(this.model.dateTime) : moment(Date.now())
);
}, },
@discourseComputed("bufferedDateTime") @discourseComputed("bufferedDateTime")

Datei anzeigen

@ -1,7 +1,7 @@
# frozen_string_literal: true # frozen_string_literal: true
# name: discourse-custom-wizard # name: discourse-custom-wizard
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
# version: 2.4.13 # version: 2.4.14
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos
# url: https://github.com/paviliondev/discourse-custom-wizard # url: https://github.com/paviliondev/discourse-custom-wizard
# contact_emails: development@pavilion.tech # contact_emails: development@pavilion.tech

Datei anzeigen

@ -90,6 +90,16 @@ acceptance("Admin | Custom Wizard Unsuscribed", function (needs) {
); );
const wizardLink = find("div.wizard-url a"); const wizardLink = find("div.wizard-url a");
assert.equal(wizardLink.length, 1, "Wizard link was created"); 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( assert.equal(
$.trim($("a[title='Subscribe to use these features']").text()), $.trim($("a[title='Subscribe to use these features']").text()),
"Not Subscribed", "Not Subscribed",