Add environment infrastructure drill-down

This commit is contained in:
2026-11-05 22:59:37 +00:00
parent 4318454a7a
commit 163f99be54
5 changed files with 40 additions and 5 deletions
+2 -1
View File
@@ -4,11 +4,12 @@ import { definitionFromCapabilities, demoLandscape, getPreset, systemFromPreset,
describe('landscape model', () => {
it('provides the editable demo landscape', () => {
const landscape = demoLandscape()
expect(landscape.systems).toHaveLength(8)
expect(landscape.systems).toHaveLength(9)
expect(landscape.scenarios.map((scenario) => scenario.name)).toEqual(expect.arrayContaining(['Place order', 'Register customer', 'Contact enquiry', 'Sample request', 'Commercial order', 'Order retry and recovery', 'Commit, build and deploy']))
expect(landscape.scenarios[0].steps[2].connectionIds).toHaveLength(2)
expect(getPreset('bitbucket')?.category).toBe('development-tool')
expect(landscape.connections.find((connection) => connection.id === 'azure-devops-website')?.connectionType).toBe('deployment')
expect(landscape.systems.find((system) => system.id === 'sitecore')?.environments?.[0].components.map((component) => component.role)).toEqual(expect.arrayContaining(['content-management', 'content-delivery', 'database-server', 'database', 'search-service']))
})
it('round-trips a valid landscape and preserves positions', () => {
const source = demoLandscape(); const imported = validateLandscape(JSON.parse(JSON.stringify(source)))