Complete roadmap optionals: Holesail, Swarm UI, GitOps, virtualization.
CI / test (push) Successful in 9m58s
CI / test (push) Successful in 9m58s
Add tunnel persistence and container one-click tunnels with local Holesail client bind, Swarm services/nodes/tasks view, GitOps stack sync from git, deploy wizard step chrome, virtualized container lists, and structure regression tests. Mark Tracks A–D and optional future done.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Lightweight visual/structure regression: ensure critical UI landmarks stay in index.html.
|
||||
* Complements full screenshot suites (optional future) without browser automation deps.
|
||||
*/
|
||||
import test from 'brittle'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..')
|
||||
const html = fs.readFileSync(path.join(root, 'index.html'), 'utf8')
|
||||
|
||||
const REQUIRED_IDS = [
|
||||
'sidebar',
|
||||
'content',
|
||||
'job-drawer',
|
||||
'toast-stack',
|
||||
'containers-view',
|
||||
'deploy-view',
|
||||
'tunnels-view',
|
||||
'swarm-view',
|
||||
'host-view',
|
||||
'settings-view',
|
||||
'deploy-wizard-steps',
|
||||
'stack-git-url',
|
||||
'tunnel-create-btn',
|
||||
'swarm-services-body',
|
||||
]
|
||||
|
||||
const REQUIRED_SNIPPETS = [
|
||||
'data-view="tunnels"',
|
||||
'data-view="swarm"',
|
||||
'ENABLE_HOLESAIL',
|
||||
'GitOps',
|
||||
'collapse-sidebar-btn',
|
||||
]
|
||||
|
||||
test('index.html retains critical view landmarks', (t) => {
|
||||
for (const id of REQUIRED_IDS) {
|
||||
t.ok(html.includes(`id="${id}"`), `missing #${id}`)
|
||||
}
|
||||
})
|
||||
|
||||
test('index.html retains critical feature snippets', (t) => {
|
||||
for (const s of REQUIRED_SNIPPETS) {
|
||||
t.ok(html.includes(s), `missing snippet: ${s}`)
|
||||
}
|
||||
})
|
||||
|
||||
test('modern.css includes collapsed sidebar rail rules', (t) => {
|
||||
const css = fs.readFileSync(path.join(root, 'ui/modern.css'), 'utf8')
|
||||
t.ok(css.includes('#sidebar.collapsed'))
|
||||
t.ok(css.includes('icon') || css.includes('nav-link'))
|
||||
})
|
||||
Reference in New Issue
Block a user