Fix v17.7.1 E2E data layer module checks

This commit is contained in:
github-actions[bot] 2026-09-08 23:51:20 +00:00
parent 95adfc5e3d
commit dffbd6a27d
4 changed files with 2 additions and 83 deletions

View File

@ -1,32 +0,0 @@
name: Fix Caterium v17.7.1 E2E module checks
on:
push:
branches:
- main
paths:
- '.github/workflows/fix-v1771-e2e-loader.yml'
permissions:
contents: write
jobs:
fix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Apply isolated module checks
run: python ops/fix_v1771_e2e_wait.py
- run: npm install
- run: npm run check:deploy
- run: npx playwright install --with-deps chromium
- name: Run full browser QA
run: npm run test:e2e
- name: Commit verified fix
run: |
rm -f .github/workflows/fix-v1771-e2e-loader.yml ops/fix_v1771_e2e_wait.py ops/browser-diag-v1771.txt
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "Fix v17.7.1 E2E data layer module checks"
git push

View File

@ -1,38 +0,0 @@
{
"state": {
"readyState": "complete",
"performanceLoaded": true,
"data1771": true,
"data1770": true,
"dataCurrent": true,
"perfScript": "http://127.0.0.1:4173/core/performance.js?v=20260909-v17-7-1-data-layer-adoption",
"dataScript": "http://127.0.0.1:4173/core/data-layer-v1771.js?v=20260909-v17-7-1-data-layer-adoption",
"dataFetch": {
"status": 200,
"ok": true,
"head": "(()=>{\n 'use strict';\n if(window.CateriumDataV1771)return;\n\n const VERSION='1"
}
},
"events": [
{
"type": "response",
"url": "http://127.0.0.1:4173/core/performance.js?v=20260909-v17-7-1-data-layer-adoption",
"status": 200
},
{
"type": "response",
"url": "http://127.0.0.1:4173/core/data-layer-v1771.js?v=20260909-v17-7-1-data-layer-adoption",
"status": 200
},
{
"type": "response",
"url": "http://127.0.0.1:4173/core/server-automation-v1770.js?v=20260909-v17-7-1-data-layer-adoption",
"status": 200
},
{
"type": "response",
"url": "http://127.0.0.1:4173/core/data-layer-v1771.js",
"status": 200
}
]
}

View File

@ -1,11 +0,0 @@
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 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 tests to inject the isolated data layer module')

View File

@ -261,7 +261,7 @@ test('v17.6.9 offer workspace module boots', async ({ page }) => {
test('v17.7.1 data layer can update orders without direct UI globals', async ({ page }) => {
await page.goto('/index.html',{waitUntil:'domcontentloaded'});
await page.waitForFunction(()=>Boolean(window.CateriumDataV1771),null,{timeout:5000});
await injectCore(page,'data-layer-v1771.js','CateriumDataV1771');
const result=await page.evaluate(()=>{const d=window.CateriumDataV1771;d.orders.replace([{id:77,status:'Новый',total:1000}],{persistLocal:false,reason:'e2e-seed'});const before=d.orders.get(77);d.orders.update(77,o=>({...o,status:'Тест'}),{persistLocal:false});return {before:before.status,after:d.orders.get(77).status,version:d.VERSION,alias:window.CateriumDataV1770===d}});
expect(result).toEqual({before:'Новый',after:'Тест',version:'17.7.1',alias:true});
});
@ -277,7 +277,7 @@ test('v17.7.0 server automation applies returned normalized orders through data
test('v17.7.1 data layer serves orders and catalog with v17.7.0 compatibility alias', async ({ page }) => {
await page.goto('/index.html',{waitUntil:'domcontentloaded'});
await page.waitForFunction(()=>Boolean(window.CateriumDataV1771),null,{timeout:5000});
await injectCore(page,'data-layer-v1771.js','CateriumDataV1771');
const result=await page.evaluate(()=>{
const d=window.CateriumDataV1771,beforeOrders=d.orders.list(),beforeCatalog=d.catalog.list();
d.orders.replace([...beforeOrders,{id:'qa-v1771',event:'QA',lines:[]}],{persistLocal:false,reason:'qa-order'});