2024-11-22 17:11:51 +01:00
|
|
|
import { cloneJSON } from "discourse-common/lib/object";
|
2022-07-27 12:47:50 +02:00
|
|
|
import categoriesJson from "../fixtures/categories";
|
|
|
|
import groupsJson from "../fixtures/groups";
|
|
|
|
import updateJson from "../fixtures/update";
|
2024-11-22 17:11:51 +01:00
|
|
|
import userJson from "../fixtures/user";
|
|
|
|
import wizardJson from "../fixtures/wizard";
|
2022-07-27 12:47:50 +02:00
|
|
|
|
|
|
|
const wizardNoUser = cloneJSON(wizardJson);
|
2023-01-26 11:26:24 +01:00
|
|
|
const wizardGuest = cloneJSON(wizardJson);
|
2023-02-07 12:46:17 +01:00
|
|
|
wizardGuest.permitted = true;
|
2022-07-27 12:47:50 +02:00
|
|
|
const wizard = cloneJSON(wizardJson);
|
|
|
|
wizard.user = cloneJSON(userJson);
|
2023-02-07 12:46:17 +01:00
|
|
|
wizard.permitted = true;
|
2022-07-27 12:47:50 +02:00
|
|
|
|
|
|
|
const wizardNotPermitted = cloneJSON(wizard);
|
|
|
|
wizardNotPermitted.permitted = false;
|
|
|
|
|
|
|
|
const wizardCompleted = cloneJSON(wizard);
|
|
|
|
wizardCompleted.completed = true;
|
|
|
|
|
|
|
|
wizard.start = "step_1";
|
|
|
|
wizard.resume_on_revisit = false;
|
|
|
|
wizard.submission_last_updated_at = "2022-03-11T20:00:18+01:00";
|
|
|
|
wizard.subscribed = false;
|
|
|
|
|
2024-02-23 10:33:42 +01:00
|
|
|
const wizardResumeOnRevisit = cloneJSON(wizard);
|
|
|
|
wizardResumeOnRevisit.start = "step_2";
|
|
|
|
wizardResumeOnRevisit.resume_on_revisit = true;
|
|
|
|
|
2022-07-27 12:47:50 +02:00
|
|
|
const stepNotPermitted = cloneJSON(wizard);
|
|
|
|
stepNotPermitted.steps[0].permitted = false;
|
|
|
|
|
|
|
|
const allFieldsWizard = cloneJSON(wizard);
|
|
|
|
allFieldsWizard.steps[0].fields = [
|
|
|
|
...allFieldsWizard.steps[0].fields,
|
|
|
|
...allFieldsWizard.steps[1].fields,
|
|
|
|
...allFieldsWizard.steps[2].fields,
|
|
|
|
];
|
|
|
|
allFieldsWizard.steps = [cloneJSON(allFieldsWizard.steps[0])];
|
|
|
|
allFieldsWizard.categories = cloneJSON(categoriesJson["categories"]);
|
|
|
|
allFieldsWizard.groups = cloneJSON(groupsJson["groups"]);
|
|
|
|
|
|
|
|
const update = cloneJSON(updateJson);
|
2022-08-01 09:41:11 +02:00
|
|
|
update.wizard = cloneJSON(wizard);
|
2022-07-27 12:47:50 +02:00
|
|
|
|
|
|
|
export {
|
|
|
|
wizardNoUser,
|
|
|
|
wizardNotPermitted,
|
|
|
|
wizardCompleted,
|
2023-01-26 11:26:24 +01:00
|
|
|
wizardGuest,
|
2024-02-23 10:33:42 +01:00
|
|
|
wizardResumeOnRevisit,
|
2022-07-27 12:47:50 +02:00
|
|
|
stepNotPermitted,
|
|
|
|
allFieldsWizard,
|
|
|
|
wizard,
|
2022-07-27 15:50:49 +02:00
|
|
|
update,
|
2022-07-27 12:47:50 +02:00
|
|
|
};
|