Skip to content

test(sap): the simulator models a modal and a table control - #480

Open
HappyDevs1 wants to merge 1 commit into
mainfrom
fix/478-simulator-shapes
Open

test(sap): the simulator models a modal and a table control#480
HappyDevs1 wants to merge 1 commit into
mainfrom
fix/478-simulator-shapes

Conversation

@HappyDevs1

Copy link
Copy Markdown
Collaborator

Summary

Why

sap_pipeline/sap_sim_e2e — the checks that run on every push — only ever exercised one flat VA01-shaped screen. Nothing but a human on the one real SAP machine would notice a regression in multi-window or table-control handling, including the window-scoping fix tracked by #475.

Test confirming the fix

cargo test -p flowproof-cli --test sap_sim_e2e — new assertions prove: the modal's controls are reachable and its text is disjoint from the background window's while open; a dismissed modal's controls stop resolving and stop appearing on the surface; the table control's nested cells survive FindById with bracket+comma ids.

Follow-up

sap_pipeline.rs's in-memory FakeEngine still models only the flat shape — extending it to the same two shapes was the natural next slice but didn't fit this change's line budget.

Note for whoever finishes #475: PR #467 is not yet merged, so the modal fixture intentionally does not assert !surface_text.contains(<background text>) while a modal is open (that would fail on today's main). The fixture is built so that assertion is one line to add once #467 lands — see the doctest comment on the new modal test.

Fixes #478

The simulated SAP screen was one flat wnd[0] with every field hanging
straight off it, so sap_sim_e2e could not fail when window scoping or
tree nesting broke — only a person at the one real SAP machine would
have noticed.

It now serves two more shapes. A classic GuiTableControl carries its
cells as children under SAP's real [column,row] ids, so the walk has to
recurse past depth two and FindById has to survive brackets and a comma.
Back opens a wnd[1] modal that sits in the session tree beside wnd[0]
and leaves it again when dismissed; the two windows deliberately share
no text, so which one a reader is reading has an answer.

sap_sim_e2e drives both through the production COM engine, and takes a
mutex around the simulator process: it publishes itself in the
machine-wide ROT under SAPGUI, so two at once would be a coin flip.

Closes #478

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 13, 2026 06:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

SAP: test simulator only models one screen shape — can't catch multi-window/table regressions in CI

2 participants