Skip to content

Run the e2e smoke against the frontend of abap2UI5 main again - #233

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/beautiful-ramanujan-yhuhs6
Sep 23, 2026
Merged

oblomov-dev merged 1 commit into
mainfrom
claude/beautiful-ramanujan-yhuhs6

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Why

Three abap2UI5 changes from 2026-09-22/23 broke the e2e smoke. The breakage is in the test harness, not the ports. Against abap2UI5 main (c7ea4c1), every one of the 628 apps failed with the current harness. Tonight's nightly clones main, so all four shards would go red.

With this PR, 628 / 628 pass locally against main (full --strict run, plus a targeted rebuild for 109 and 307).

What

1. CSP without 'unsafe-eval' (abap2UI5#2778).
The smoke loads UI5 from the @openui5 npm sources. Those have no preload bundles, so the ui5loader evals every module, and every app died at boot with Refused to evaluate a string as JavaScript.

  • e2e-smoke.mjs now adds 'unsafe-eval' to the served document's script-src, via allowEvalForSourceUi5( ) in lib-smoke.mjs.
  • This is the same relaxation abap2UI5's own node/tests/e2e/fixtures.js applies to its offline run.
  • Only the harness is affected: a real system loads UI5 from the CDN and needs no eval.

2. The frontend state moved to a per-component context (abap2UI5#2780).
AppState.state is now undefined, and nothing threw:

  • The 11 bookmark-restore legs reported "no draft id on the response".
  • waitForIdle took its "older frontend" exit and stopped waiting at all. That surfaced as dead wires on 012, 101, 558, 575, 578, 579, 584 and demo_001/004.

lib-e2e.mjs gets FRONTEND_STATE and draftId( ):

  • The state is found through Component.registry → ctx.state.
  • It falls back to AppState.state for pins between #2777 and #2780.
  • Every reader now uses them.

3. page.waitForFunction(fn, { timeout }) had no timeout.
The object was passed as the page function's arg, so Playwright's 30 s default applied. This hit the smoke's own 60 s boot wait and 14 waits in interaction modules. They now pass undefined in between.

4. Ports 109 and 307 (red in the nightly before this, issues #229 / #223).

  • Both read the marshalled DateRange array with find( ... case = abap_false ) for "startdate".
  • @abaplint/runtime 2.13.87 ignores case on a sub search, so it matched nothing against the "startDate" the framework writes, and the toast / list stayed empty.
  • They now match the key in its exact case, which is also correct on a system.

The e2e-debugging skill and meta/interactions/README.md record all three harness lessons.

Checks

  • npm run check: green
  • npx abaplint ./abaplint.jsonc: 0 issues (1299 files)
  • node scripts/e2e-smoke.mjs --strict against abap2UI5 main: 626 / 628 on the full run; 109 and 307 pass after the fix

🤖 Generated with Claude Code

https://claude.ai/code/session_01HPFnCq1yiXQKsQcrs64g48


Generated by Claude Code

Three framework changes of 2026-09-22/23 reddened the smoke as a harness,
not as a corpus. Against abap2UI5 main (c7ea4c1) every one of the 628 apps
failed before this, and 626 pass with it.

- The GET page's CSP lost 'unsafe-eval' (abap2UI5#2778). The smoke serves
  UI5 from the @openui5 npm sources, which have no preload bundles, so the
  ui5loader evals every module, and every app died at boot on "Refused to
  evaluate a string as JavaScript". e2e-smoke now adds 'unsafe-eval' to
  the served document's script-src through allowEvalForSourceUi5( ) in
  lib-smoke.mjs, the same thing abap2UI5's own node/tests/e2e/fixtures.js
  does for its offline run. A real system loads UI5 from the CDN and needs
  no eval.

- The frontend state left the AppState module for a per-component context
  (abap2UI5#2780). AppState.state is undefined now, and nothing threw: the
  eleven bookmark-restore legs said "no draft id on the response", and
  waitForIdle took its "older frontend" exit and stopped waiting, which
  showed up as dead wires on 012, 101, 558, 575, 578, 579, 584 and
  demo_001/004. lib-e2e.mjs gets FRONTEND_STATE, which finds the component
  through Component.registry and reads ctx.state, falling back to the
  older AppState.state, plus draftId( ). Every reader now goes through
  them.

- page.waitForFunction(fn, { timeout }) passes the object as the page
  function's ARG, so Playwright's 30 s default applied. That covers the
  smoke's own 60 s boot wait and fourteen more waits in the interaction
  modules. They now pass undefined in between.

109 and 307, red in the nightly since before this, were a runtime gap
rather than a port defect. Both read the marshalled DateRange array with
find( ... case = abap_false ) for "startdate", and @abaplint/runtime
2.13.87 ignores `case` on a sub search, so it matched nothing against the
"startDate" the framework writes. They now match the key in its exact case,
which is correct on a system too.

The e2e-debugging skill and the interactions README record all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HPFnCq1yiXQKsQcrs64g48
@oblomov-dev
oblomov-dev merged commit c57ddcf into main Sep 23, 2026
21 checks passed
@oblomov-dev
oblomov-dev deleted the claude/beautiful-ramanujan-yhuhs6 branch September 23, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants