Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
Merge pull request #265 from paviliondev/temp_ignore_redirect
FEATURE: implement a way to temporarily ignore redirect
Dieser Commit ist enthalten in:
Commit
52efc15576
3 geänderte Dateien mit 11 neuen und 1 gelöschten Zeilen
|
@ -30,6 +30,7 @@ export default {
|
||||||
.concat(["loading"]);
|
.concat(["loading"]);
|
||||||
if (
|
if (
|
||||||
redirectToWizard &&
|
redirectToWizard &&
|
||||||
|
!data.url.includes("ignore_redirect") &&
|
||||||
data.currentRouteName !== "customWizardStep" &&
|
data.currentRouteName !== "customWizardStep" &&
|
||||||
!excludedPaths.find((p) => {
|
!excludedPaths.find((p) => {
|
||||||
return data.currentRouteName.indexOf(p) > -1;
|
return data.currentRouteName.indexOf(p) > -1;
|
||||||
|
|
|
@ -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.18
|
# version: 2.4.19
|
||||||
# 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
|
||||||
|
|
|
@ -74,6 +74,15 @@ acceptance("Wizard | Redirect", function (needs) {
|
||||||
"pending wizard routing works"
|
"pending wizard routing works"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("Don't redirect to pending Wizard when ingore redirect param is supplied", async function (assert) {
|
||||||
|
sinon.stub(DiscourseURL, "routeTo");
|
||||||
|
await visit("/latest?ignore_redirect=1");
|
||||||
|
assert.notOk(
|
||||||
|
DiscourseURL.routeTo.calledWith("/w/wizard"),
|
||||||
|
"pending wizard routing blocked"
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
acceptance("Wizard | Wizard", function (needs) {
|
acceptance("Wizard | Wizard", function (needs) {
|
||||||
|
|
Laden …
In neuem Issue referenzieren