Add deterministic v17.7.1 E2E loader fix
This commit is contained in:
parent
69d483519e
commit
b3322e436a
11
ops/fix_v1771_e2e_wait.py
Normal file
11
ops/fix_v1771_e2e_wait.py
Normal file
@ -0,0 +1,11 @@
|
||||
from pathlib import Path
|
||||
p=Path('tests/app.spec.mjs')
|
||||
s=p.read_text(encoding='utf-8')
|
||||
old="await page.waitForFunction(()=>Boolean(window.CateriumDataV1771),null,{timeout:5000});"
|
||||
new="await page.waitForFunction(()=>Boolean(window.SunPerformance),null,{timeout:10000});await page.evaluate(()=>window.SunPerformance.loadDataLayer());await page.waitForFunction(()=>Boolean(window.CateriumDataV1771),null,{timeout:10000});"
|
||||
count=s.count(old)
|
||||
if count != 2:
|
||||
raise SystemExit(f'Expected 2 v17.7.1 loader waits, found {count}')
|
||||
s=s.replace(old,new)
|
||||
p.write_text(s,encoding='utf-8')
|
||||
print('Patched both v17.7.1 E2E loader waits')
|
||||
Loading…
Reference in New Issue
Block a user