Review changes batch 6 of 6
This commit is contained in:
@@ -12,8 +12,8 @@ $captureScript = Get-Content -LiteralPath $captureScriptPath -Raw -Encoding utf8
|
||||
if ($captureScript -notmatch "const renderSettleMilliseconds = 900") {
|
||||
throw 'Chrome capture must define a 900ms render-settle delay after the target selector appears'
|
||||
}
|
||||
if ($captureScript -notmatch 'await sleep\(renderSettleMilliseconds\)') {
|
||||
throw 'Chrome capture must wait for the render-settle delay before taking a screenshot'
|
||||
if ($captureScript -notmatch "await sleep\(action\?\.endsWith\('-submitting'\) \? 80 : renderSettleMilliseconds\)") {
|
||||
throw 'Chrome capture must wait for the standard render-settle delay except for verified transient submitting states'
|
||||
}
|
||||
if ($captureScript -match 'await sleep\(300\)') {
|
||||
throw 'Chrome capture must not retain the unstable 300ms post-selector delay'
|
||||
@@ -27,10 +27,10 @@ if ($captureScript -notmatch 'Array\.from\(document\.images\)\.every') {
|
||||
if ($captureScript -notmatch 'await waitForLoadedImages\(send\)') {
|
||||
throw 'Chrome capture must wait for document images after the target selector renders'
|
||||
}
|
||||
if ($captureScript -notmatch "await send\('Page.reload'\)") {
|
||||
throw 'Chrome capture must reload after navigation so route screenshots do not inherit a prior Vue state'
|
||||
if ($captureScript -notmatch "await waitForPageLoad\(socket, \(\) => send\('Page.reload'\)\)") {
|
||||
throw 'Chrome capture must reload and await Page.loadEventFired so route screenshots do not inherit a prior Vue state'
|
||||
}
|
||||
if ($captureScript.IndexOf("await send('Page.navigate'") -ge $captureScript.IndexOf("await send('Page.reload')")) {
|
||||
if ($captureScript.IndexOf("await send('Page.navigate'") -ge $captureScript.IndexOf("await waitForPageLoad(socket, () => send('Page.reload'))")) {
|
||||
throw 'Chrome capture must reload only after it has navigated to the requested URL'
|
||||
}
|
||||
if ($captureScript -notmatch 'const waitForFreshDocument = async \(send, documentTimeOrigin\) =>') {
|
||||
@@ -45,7 +45,7 @@ if ($captureScript -notmatch 'await waitForFreshDocument\(send, documentTimeOrig
|
||||
if ($captureScript -notmatch "action !== 'fresh-navigation'") {
|
||||
throw 'Chrome capture must support fresh-navigation for root pages whose tab lifecycle closes a reloaded CDP target'
|
||||
}
|
||||
foreach ($g06Action in @('g06-results', 'g06-empty', 'g06-invite')) {
|
||||
foreach ($g06Action in @('g06-results', 'g06-empty', 'g06-error', 'g06-invite', 'g06-invite-invalid')) {
|
||||
if ($captureScript -notmatch [regex]::Escape($g06Action)) {
|
||||
throw "Chrome capture must support the $g06Action visual state"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user