Files
SystemLandscapeSimulator/tests/simulator.spec.ts
T
chris.dumas 9bb02b3dd5
Test, deploy, and browser-test System Landscape Simulator / test-build (push) Successful in 17s
Test, deploy, and browser-test System Landscape Simulator / deploy (push) Failing after 7s
Test, deploy, and browser-test System Landscape Simulator / browser-test (push) Skipped
ci: deploy simulator and run post-deploy UI tests
2026-11-09 08:25:28 +00:00

42 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { expect, test } from '@playwright/test'
test.beforeEach(async ({ page }) => {
await page.goto('/')
await page.evaluate(() => localStorage.clear())
await page.reload()
await expect(page.getByRole('heading', { name: /System Landscape/ })).toBeVisible()
})
test('loads the demo and advances a scenario', async ({ page }) => {
await expect(page.locator('.list-area .list-item')).toHaveCount(2)
await page.locator('.list-area .run-mini').first().click()
await expect(page.locator('.guided-card')).toBeVisible()
await expect(page.locator('.guided-card')).not.toContainText('Ready to run')
await page.getByRole('button', { name: '›' }).click()
await expect(page.locator('.timeline-label')).not.toContainText('0 /')
})
test('places a preset and keeps the new system editable', async ({ page }) => {
await page.getByRole('button', { name: 'Presets' }).click()
await page.locator('.preset-item .run-mini').first().click()
await expect(page.locator('.preset-modal')).toBeVisible()
await page.getByRole('button', { name: 'Place system' }).click()
await expect(page.locator('.inspector-content').first()).toContainText('Save system')
})
test('persists an edited scenario across refresh', async ({ page }) => {
const name = 'Browser persistence check'
await page.locator('.scenario-inspector input').first().fill(name)
await page.reload()
await expect(page.locator('.scenario-inspector input').first()).toHaveValue(name)
})
test('enters and exits presentation mode', async ({ page }) => {
await page.getByRole('button', { name: 'Presentation mode' }).click()
await expect(page.getByRole('button', { name: 'Exit presentation' })).toBeVisible()
await expect(page.locator('.playback')).toBeVisible()
await expect(page.locator('.failure-config')).toBeHidden()
await page.getByRole('button', { name: 'Exit presentation' }).click()
await expect(page.getByRole('button', { name: 'Presentation mode' })).toBeVisible()
})