make code testable, add test
Dieser Commit ist enthalten in:
Ursprung
8649ab2286
Commit
050a38a9d3
2 geänderte Dateien mit 10 neuen und 1 gelöschten Zeilen
|
@ -31,7 +31,7 @@ export default {
|
||||||
.concat(["loading"]);
|
.concat(["loading"]);
|
||||||
if (
|
if (
|
||||||
redirectToWizard &&
|
redirectToWizard &&
|
||||||
!searchParams.has("ignore_redirect") &&
|
!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;
|
||||||
|
|
|
@ -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