Add web layout probe evidence
This commit is contained in:
parent
e01b71495a
commit
c0c17beb45
17 changed files with 605 additions and 7 deletions
59
scripts/run-web-reference-layout-probe-smoke.ps1
Normal file
59
scripts/run-web-reference-layout-probe-smoke.ps1
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
param(
|
||||
[string] $ProviderId = "gamecult.eve.embedded-demo",
|
||||
[string] $FixtureId = "embedded-surface",
|
||||
[string] $OutputPath = "artifacts\web-reference-layout-probe\latest\embedded-surface.json",
|
||||
[int] $Port = 8892,
|
||||
[int] $Width = 1280,
|
||||
[int] $Height = 720
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$absoluteOutputPath = if ([System.IO.Path]::IsPathRooted($OutputPath)) {
|
||||
$OutputPath
|
||||
} else {
|
||||
Join-Path $projectRoot $OutputPath
|
||||
}
|
||||
|
||||
Push-Location $projectRoot
|
||||
try {
|
||||
npm --prefix packages/eve-browser-lowering run build | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Eve browser lowering build failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
node .\tools\web-reference\run-layout-probe.mjs `
|
||||
--provider $ProviderId `
|
||||
--fixture $FixtureId `
|
||||
--output $OutputPath `
|
||||
--port $Port `
|
||||
--width $Width `
|
||||
--height $Height | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Web reference layout probe failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
if (-not (Test-Path $absoluteOutputPath)) {
|
||||
throw "Web reference layout probe did not write output: $absoluteOutputPath"
|
||||
}
|
||||
$probe = Get-Content $absoluteOutputPath -Raw | ConvertFrom-Json
|
||||
if ($probe.schema -ne "gamecult.eve.web_layout_probe.v1") {
|
||||
throw "Unexpected web layout probe schema: $($probe.schema)"
|
||||
}
|
||||
if ($probe.runtimeId -ne "web") {
|
||||
throw "Unexpected web layout probe runtime: $($probe.runtimeId)"
|
||||
}
|
||||
if ($probe.providerId -ne $ProviderId) {
|
||||
throw "Unexpected web layout probe provider: $($probe.providerId)"
|
||||
}
|
||||
if ($probe.fixtureId -ne $FixtureId) {
|
||||
throw "Unexpected web layout probe fixture: $($probe.fixtureId)"
|
||||
}
|
||||
if ($probe.summary.measuredNodeCount -le 0) {
|
||||
throw "Web layout probe measured no node boxes."
|
||||
}
|
||||
Write-Host "Web reference layout probe smoke passed: $absoluteOutputPath"
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
Loading…
Reference in a new issue