test(sap): the simulator models a modal and a table control - #480
Open
HappyDevs1 wants to merge 1 commit into
Open
test(sap): the simulator models a modal and a table control#480HappyDevs1 wants to merge 1 commit into
HappyDevs1 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wnd[1]modal fixture (GuiModalWindow, disjoint text from the background window) and a classicGuiTableControlfixture (nested cells, bracket+comma ids) to the SAP test simulatorsap_sim_e2eassertions against both new shapes, exercised through the same recursion/depth/cap rules as the production COM engine's walkScreen.add_field(..., parent=...)as an extension point for future ALV/popup fixture shapes (SAP: no support for ALV grids (GuiGridView) #476, SAP: no support for search/tree popups (e.g. F4 value help) #477)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 surviveFindByIdwith bracket+comma ids.Follow-up
sap_pipeline.rs's in-memoryFakeEnginestill 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'smain). 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