Improve onboarding section across home and about
All checks were successful
Deploy Sokko G / deploy (push) Successful in 8s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 8s
This commit is contained in:
parent
53ecde8d2b
commit
2f1526b86b
17 changed files with 440 additions and 187 deletions
|
|
@ -81,10 +81,12 @@ export function validateSiteContent(site) {
|
|||
"home.stats.toolboxPlural",
|
||||
"home.stats.toolSingular",
|
||||
"home.stats.toolPlural",
|
||||
"home.orientation.ariaLabel",
|
||||
"home.startMap.eyebrow",
|
||||
"home.startMap.title",
|
||||
"home.startMap.description",
|
||||
"home.onboarding.eyebrow",
|
||||
"home.onboarding.title",
|
||||
"home.onboarding.description",
|
||||
"home.onboarding.stepsTitle",
|
||||
"home.onboarding.sliderLabel",
|
||||
"home.onboarding.slideButtonLabel",
|
||||
"home.origin.eyebrow",
|
||||
"home.origin.title",
|
||||
"home.origin.visualAlt",
|
||||
|
|
@ -531,27 +533,39 @@ export function validateSiteContent(site) {
|
|||
assertNonEmptyString({ tool }, "tool.description");
|
||||
});
|
||||
|
||||
const orientationCards = valueAt(site, "home.orientation.cards");
|
||||
assert.ok(Array.isArray(orientationCards), "home.orientation.cards must be an array");
|
||||
assert.ok(orientationCards.length >= 2, "home.orientation.cards must contain at least 2 items");
|
||||
orientationCards.forEach((card, index) => {
|
||||
assert.equal(typeof card, "object", `home.orientation.cards[${index}] must be an object`);
|
||||
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");
|
||||
onboardingCards.forEach((card, index) => {
|
||||
assert.equal(typeof card, "object", `home.onboarding.cards[${index}] must be an object`);
|
||||
assertNonEmptyString({ card }, "card.icon");
|
||||
assertNonEmptyString({ card }, "card.image");
|
||||
assertNonEmptyString({ card }, "card.title");
|
||||
assertNonEmptyString({ card }, "card.text");
|
||||
assertNonEmptyString({ card }, "card.action");
|
||||
assertNonEmptyString({ card }, "card.href");
|
||||
});
|
||||
|
||||
const startMapSteps = valueAt(site, "home.startMap.steps");
|
||||
assert.ok(Array.isArray(startMapSteps), "home.startMap.steps must be an array");
|
||||
assert.ok(startMapSteps.length >= 1, "home.startMap.steps must contain at least 1 item");
|
||||
startMapSteps.forEach((step, index) => {
|
||||
assert.equal(typeof step, "object", `home.startMap.steps[${index}] must be an object`);
|
||||
const onboardingSteps = valueAt(site, "home.onboarding.steps");
|
||||
assert.ok(Array.isArray(onboardingSteps), "home.onboarding.steps must be an array");
|
||||
assert.ok(onboardingSteps.length >= 1, "home.onboarding.steps must contain at least 1 item");
|
||||
onboardingSteps.forEach((step, index) => {
|
||||
assert.equal(typeof step, "object", `home.onboarding.steps[${index}] must be an object`);
|
||||
assertNonEmptyString({ step }, "step.title");
|
||||
assertNonEmptyString({ step }, "step.text");
|
||||
});
|
||||
|
||||
const onboardingSlides = valueAt(site, "home.onboarding.slides");
|
||||
assert.ok(Array.isArray(onboardingSlides), "home.onboarding.slides must be an array");
|
||||
assert.equal(onboardingSlides.length, 4, "home.onboarding.slides must contain 4 items");
|
||||
onboardingSlides.forEach((slide, index) => {
|
||||
assert.equal(typeof slide, "object", `home.onboarding.slides[${index}] must be an object`);
|
||||
assertNonEmptyString({ slide }, "slide.src");
|
||||
assertNonEmptyString({ slide }, "slide.alt");
|
||||
assertNonEmptyString({ slide }, "slide.title");
|
||||
assertNonEmptyString({ slide }, "slide.text");
|
||||
});
|
||||
|
||||
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