From baf77724ae0ff0379cc42d0c049eb43c4084e739 Mon Sep 17 00:00:00 2001 From: pavlov346346-source Date: Wed, 9 Sep 2026 02:50:00 +0300 Subject: [PATCH] Use isolated module injection in v17.7.1 E2E tests --- ops/fix_v1771_e2e_wait.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ops/fix_v1771_e2e_wait.py b/ops/fix_v1771_e2e_wait.py index 8b29654..ce65fb8 100644 --- a/ops/fix_v1771_e2e_wait.py +++ b/ops/fix_v1771_e2e_wait.py @@ -2,10 +2,10 @@ 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});" +new="await injectCore(page,'data-layer-v1771.js','CateriumDataV1771');" 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') +print('Patched both v17.7.1 E2E tests to inject the isolated data layer module')