49 lines
1.6 KiB
PowerShell
49 lines
1.6 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
function Read-Utf8([string]$Path) {
|
|
[System.IO.File]::ReadAllText((Join-Path (Join-Path $PSScriptRoot '..') $Path), [System.Text.Encoding]::UTF8)
|
|
}
|
|
|
|
function Assert-Contains([string]$Content, [string]$Expected, [string]$Message) {
|
|
if (-not $Content.Contains($Expected)) { throw $Message }
|
|
}
|
|
|
|
$page = Read-Utf8 'pages/family/f10-video-list.vue'
|
|
$catalog = Read-Utf8 'data/page-catalog.js'
|
|
|
|
foreach ($expected in @(
|
|
'class="video-status-page"',
|
|
'class="video-status-card"',
|
|
'class="video-return-action"',
|
|
'const returnToFamily = () =>',
|
|
'/pages/family/f01-family-feed',
|
|
'ModulePageBackground',
|
|
'PageHeader',
|
|
'AppButton',
|
|
'@use "../../styles/adaptive-frame-profiles.scss" as adaptive;',
|
|
'@include adaptive.adaptive-family-panel;'
|
|
)) {
|
|
Assert-Contains $page $expected "F10 contract missing: $expected"
|
|
}
|
|
|
|
foreach ($forbidden in @('<ModulePage page-id="f10"', 'import ModulePage from', 'class="video-status-card__skin"', 'module-content-frame.png')) {
|
|
if ($page.Contains($forbidden)) { throw "F10 retains forbidden dependency: $forbidden" }
|
|
}
|
|
|
|
if ($page -match '(?m)^\s*position\s*:\s*relative\s*;') {
|
|
throw 'F10 ordinary page content must not use position: relative'
|
|
}
|
|
|
|
foreach ($selector in @('.video-status-lead text')) {
|
|
$escapedSelector = [regex]::Escape($selector)
|
|
if ($page -notmatch "(?s)$escapedSelector\s*\{[^}]*z-index\s*:\s*1\s*;") {
|
|
throw "F10 grid content must render above its decorative skin: $selector"
|
|
}
|
|
}
|
|
|
|
if ($catalog -match '(?m)^\s*f10\s*:') {
|
|
throw 'F10 obsolete page-catalog owner must be removed'
|
|
}
|
|
|
|
Write-Output 'F10-VIDEO-STATUS-CONTRACT PASS'
|