Add layered preset library and starter kits

This commit is contained in:
2026-11-05 23:19:08 +00:00
parent f7a06f487c
commit c6c38101a4
5 changed files with 108 additions and 5 deletions
+12 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
import { definitionFromCapabilities, demoLandscape, executePipeline, getPreset, systemFromPreset, validateLandscape } from './model'
import { CAPABILITY_PRESETS, CATALOG_SYSTEM_PRESETS, DEPLOYMENT_TEMPLATES, STARTER_KITS, definitionFromCapabilities, demoLandscape, executePipeline, getPreset, systemFromPreset, validateLandscape } from './model'
describe('landscape model', () => {
it('provides the editable demo landscape', () => {
@@ -61,4 +61,15 @@ describe('landscape model', () => {
expect(failed.ok).toBe(false)
expect(failed.failureStepId).toBe('validation-failure')
})
it('provides a versioned layered catalogue with official sources and reusable capabilities', () => {
expect(CATALOG_SYSTEM_PRESETS.length).toBeGreaterThan(20)
expect(CAPABILITY_PRESETS.length).toBeGreaterThan(10)
expect(DEPLOYMENT_TEMPLATES.map((template) => template.id)).toContain('sitecore-cm-cd')
expect(STARTER_KITS.map((kit) => kit.id)).toContain('publishing-cicd')
expect(CATALOG_SYSTEM_PRESETS.every((preset) => preset.version === 1 && preset.sources?.[0].url.startsWith('http'))).toBe(true)
const website = CATALOG_SYSTEM_PRESETS.find((preset) => preset.id === 'generic-website')!
const placed = systemFromPreset(website, website.capabilities.map((capability) => capability.id), [10, 20])
placed.capabilities[0].payload = '{"edited":true}'
expect(website.capabilities[0].payload).not.toBe('{"edited":true}')
})
})