Add guided onboarding tour for first toolbox creation
All checks were successful
Deploy Sokko G / deploy (push) Successful in 14s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 14s
This commit is contained in:
parent
3007aa1389
commit
4f73e0068b
20 changed files with 470 additions and 20 deletions
|
|
@ -596,6 +596,8 @@ export function validateSiteContent(site) {
|
|||
}
|
||||
});
|
||||
|
||||
assertNonEmptyString(site, "home.onboarding.primaryAction");
|
||||
|
||||
const onboardingCards = valueAt(site, "home.onboarding.cards");
|
||||
assert.ok(Array.isArray(onboardingCards), "home.onboarding.cards must be an array");
|
||||
assert.ok(onboardingCards.length >= 2, "home.onboarding.cards must contain at least 2 items");
|
||||
|
|
@ -629,6 +631,35 @@ export function validateSiteContent(site) {
|
|||
assertNonEmptyString({ slide }, "slide.text");
|
||||
});
|
||||
|
||||
const toolboxCreationTemplate = valueAt(site, "toolboxes.creationTemplate");
|
||||
assert.equal(typeof toolboxCreationTemplate, "object", "toolboxes.creationTemplate must be an object");
|
||||
assertNonEmptyString({ toolboxCreationTemplate }, "toolboxCreationTemplate.notepad.title");
|
||||
assertNonEmptyString({ toolboxCreationTemplate }, "toolboxCreationTemplate.notepad.text");
|
||||
assertNonEmptyString({ toolboxCreationTemplate }, "toolboxCreationTemplate.notepad.html");
|
||||
assertNonEmptyString({ toolboxCreationTemplate }, "toolboxCreationTemplate.links.moduleTitle");
|
||||
assertNonEmptyString({ toolboxCreationTemplate }, "toolboxCreationTemplate.links.title");
|
||||
|
||||
const toolboxTutorial = valueAt(site, "toolboxes.tutorial");
|
||||
assert.equal(typeof toolboxTutorial, "object", "toolboxes.tutorial must be an object");
|
||||
assertNonEmptyString({ toolboxTutorial }, "toolboxTutorial.eyebrow");
|
||||
assertNonEmptyString({ toolboxTutorial }, "toolboxTutorial.title");
|
||||
assertNonEmptyString({ toolboxTutorial }, "toolboxTutorial.text");
|
||||
assertNonEmptyString({ toolboxTutorial }, "toolboxTutorial.dismissLabel");
|
||||
assertNonEmptyString({ toolboxTutorial }, "toolboxTutorial.nextLabel");
|
||||
assertNonEmptyString({ toolboxTutorial }, "toolboxTutorial.doneLabel");
|
||||
assert.ok(Array.isArray(toolboxTutorial.items), "toolboxes.tutorial.items must be an array");
|
||||
assert.ok(toolboxTutorial.items.length >= 4, "toolboxes.tutorial.items must contain at least 4 items");
|
||||
toolboxTutorial.items.forEach((item, index) => {
|
||||
assertNonEmptyString({ item }, "item.target");
|
||||
assertNonEmptyString({ item }, "item.icon");
|
||||
assertNonEmptyString({ item }, "item.title");
|
||||
assertNonEmptyString({ item }, "item.text");
|
||||
if (item.placement) {
|
||||
assert.ok(["above", "below", "right"].includes(item.placement), "item.placement must be above, below or right");
|
||||
}
|
||||
assert.ok(index < 6, "toolboxes.tutorial.items should stay compact");
|
||||
});
|
||||
|
||||
const lines = valueAt(site, "home.origin.lines");
|
||||
assert.ok(Array.isArray(lines), "home.origin.lines must be an array");
|
||||
assert.ok(lines.length >= 2, "home.origin.lines must contain at least 2 items");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue