24 lines
869 B
PowerShell
24 lines
869 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$capture = Get-Content -LiteralPath (Join-Path $root 'scripts/capture-chrome-page.js') -Raw -Encoding utf8
|
|
|
|
foreach ($required in @(
|
|
'prepareG03State',
|
|
'g03-create-validation',
|
|
'g03-duplicate-reminder',
|
|
'g03-create-submitting',
|
|
'g03-create-error',
|
|
'g03-ancestor-validation',
|
|
'g03-ancestor-submitting',
|
|
'g03-ancestor-error',
|
|
'g03-ancestor-success'
|
|
)) {
|
|
if ($capture -notmatch [regex]::Escape($required)) { throw "G03 capture state missing: $required" }
|
|
}
|
|
|
|
if ($capture -notmatch 'await prepareG03State\(send, action\)') { throw 'Capture runner does not prepare G03 states' }
|
|
if ($capture -notmatch 'action\?\.endsWith\(''-submitting''\)') { throw 'Capture runner does not shorten settle time for transient submitting states' }
|
|
|
|
Write-Output 'CAPTURE-G03-STATES-CONTRACT PASS'
|