From e5acc612d013aff17241c86a2648ffa451451dca Mon Sep 17 00:00:00 2001 From: Dara Adedeji Date: Mon, 30 Nov 2026 07:38:03 -0500 Subject: [PATCH] The own-open run checks that page controls save through the store: each add, rename and delete is in the store, on the server and in the pages bar, and only the strategy-wide controls leave the server unchanged --- tool/drive/README.md | 2 +- tool/drive/scripts/cloud-store-own-open.json | 81 ++++++++++++-------- 2 files changed, 48 insertions(+), 35 deletions(-) diff --git a/tool/drive/README.md b/tool/drive/README.md index 7fd1e1105..e10b74d0b 100644 --- a/tool/drive/README.md +++ b/tool/drive/README.md @@ -190,7 +190,7 @@ Its steps: - `{"expectItem": id, "at": [x, y]}` waits (with `seconds`) for the item to be within half a unit of `(x, y)`, and fails if it never is. - `{"signOut": true, "says": text?, "shot": path?}` signs out through the guarded sign-out; with `says` it fails unless the confirmation shows exactly that text, and with `shot` it takes a screenshot of the confirmation before confirming. `store-signout-held-owner.json` with `store-signout-held-mate.json`, under `--cloud-store own`: the owner's move is held behind the teammate's; leaving the editor says what the held work waits on and offers no retry; the library banner names the strategy and why; signing out says the change stays on this computer for this account; after signing back in the chip still says what the work waits on, and after Use cloud it says Synced, each against the server. - `{"expectChipTellsServer": true}` reads the sync chip's tooltip and what the open store-owned strategy's work is waiting on, then reads the server's copy of the strategy as the signed-in account and compares it with what the store shows. It fails if the chip's state or the words it shows say synced while the server lacks something the store shows, except an item the script marked with `storeMayLag`, and logs both otherwise. `{"expectImages": n, "seconds": s?}` waits up to `s` seconds for `n` placed pictures. `store-chip-offline-owner.json` with `store-chip-offline-mate.json`, run through `linux-cut-network.sh` with the owner cut: the owner moves an agent, places a picture, then selects all, copies and pastes, all offline; its chip says Offline while the teammate's server copy has neither; once back online the move, both agents and both pictures are on both canvases and both chips say Synced. `store-chip-held-owner.json` with `store-chip-held-mate.json`, under `--cloud-store own`: a held conflict ended with Use cloud, and a move refused because the teammate deleted its page, ended by restoring the page and keeping the move; the chip's words are checked in each held state and after each ends, each against the server. -- `{"expectOldQueueEmpty": true}` fails if the old cloud queue holds or refused any work for the open strategy: the store is its one writer. `{"expectServerUnchanged": name}` remembers the server's rows of the open strategy on the first call with a name (each page's name, place, side and revision, each page's content revision and settings, each element's revision and payload, each lineup group's revision); a later call with the same name fails unless they are exactly as remembered. `cloud-store-own-open.json`, under `--library-store store --cloud-store own`, adds an item through the store, then presses every page-structure control the screen shows (add page, the page menu's rename and delete, the page list's rename and delete, the strategy's name menu, the all-pages side shortcut, and the neutral team colours toggle through `{"tapCheckboxBeside": title}`, which taps the checkbox in the row of that title) and requires the old queue empty and the server unchanged. It then makes canvas edits (the side toggle, which turns this page only, delete, undo, redo, copy and paste on the agent, the map and the theme) and a drag, waits for the store to hold each, and requires the old queue empty after each; then it moves the item through the store. +- `{"expectOldQueueEmpty": true}` fails if the old cloud queue holds or refused any work for the open strategy: the store is its one writer. `{"expectServerUnchanged": name}` remembers the server's rows of the open strategy on the first call with a name (each page's name, place, side and revision, each page's content revision and settings, each element's revision and payload, each lineup group's revision); a later call with the same name fails unless they are exactly as remembered. `cloud-store-own-open.json`, under `--library-store store --cloud-store own`, adds an item through the store, then uses the page controls the screen shows (add page, which copies the page on screen, the page menu's rename, the page list's rename icon, add page again, the page list's delete icon and the page menu's delete) and requires each change in the store, on the server and in the pages bar (`storeExpectPageOrder`), the canvas drawn from the store, and the old queue empty. It then presses the controls that are still off for a store-owned strategy (the strategy's name menu, the all-pages side shortcut, and the neutral team colours toggle through `{"tapCheckboxBeside": title}`, which taps the checkbox in the row of that title) and requires the server unchanged. It then makes canvas edits (the side toggle, which turns this page only, delete, undo, redo, copy and paste on the agent, the map and the theme) and a drag, waits for the store to hold each, and requires the old queue empty after each; then it moves the item through the store. - `{"storeExpect": true}` waits until the store holds the open strategy (60 s, or `"within": seconds`) and names it as one the end-of-run comparisons must judge; `{"storeExpect": "held"}` names the one cloud strategy the store holds, for a run that opens no editor. - `{"storeAdd": id, "kind": "agent", "at": [x, y]}` commits an add of an agent (or `"kind": "smoke"`, a Brimstone smoke) at map position `(x, y)` to the first page of the store's one cloud strategy, as the account signed in. In send mode the editor still writes to the server itself, and the sender reads nothing the queue does not ask for, so an item placed in the editor never reaches the store; a script that moves items through the store makes them this way. - `{"storeAddPage": true}` commits an add of a page to the store's one cloud strategy, as the account signed in, with no editor involved. diff --git a/tool/drive/scripts/cloud-store-own-open.json b/tool/drive/scripts/cloud-store-own-open.json index e9062cfdc..1d759d9e0 100644 --- a/tool/drive/scripts/cloud-store-own-open.json +++ b/tool/drive/scripts/cloud-store-own-open.json @@ -1,6 +1,7 @@ [ {"wait": 10}, {"tapIcon": "x", "optional": true}, + {"resize": [1600, 900]}, {"signIn": true}, {"wait": 4}, {"newCloudFolder": "Folder {run}"}, @@ -21,56 +22,67 @@ {"expectItem": "a1-{run}", "seconds": 20}, {"expectStoreEditable": true}, {"expectOldQueueEmpty": true}, - {"expectServerUnchanged": "before the page controls"}, {"tapAt": [33, 857]}, {"wait": 3}, + {"expectShownPage": 2}, + {"expectAgents": 1}, + {"expectCanvasIsTheStores": true}, {"shot": "{out}/after-add-page.png"}, + {"waitStoreSent": 60, "landed": "may wait"}, + {"storeExpectPageOrder": ["Page 1", "Page 2"], "seconds": 60}, {"tapAt": [206, 857]}, {"wait": 1}, - {"tapText": "Page 1", "button": "secondary"}, + {"tapText": "Page 2", "button": "secondary"}, {"wait": 1}, - {"texts": 1}, {"shot": "{out}/page-menu.png"}, - {"key": "escape"}, + {"tapText": "Rename"}, {"wait": 1}, - {"tapAt": [206, 857]}, + {"typeText": "Menu {run}"}, + {"tapText": "Rename"}, + {"wait": 2}, + {"waitStoreSent": 60, "landed": "may wait"}, + {"storeExpectPageOrder": ["Page 1", "Menu {run}"], "seconds": 60}, + {"tapAt": [176, 656]}, {"wait": 1}, + {"typeText": "Icon {run}"}, + {"tapText": "Rename"}, + {"wait": 2}, + {"waitStoreSent": 60, "landed": "may wait"}, + {"storeExpectPageOrder": ["Page 1", "Icon {run}"], "seconds": 60}, + {"tapAt": [33, 857]}, + {"wait": 3}, + {"expectShownPage": 3}, + {"expectAgents": 1}, + {"waitStoreSent": 60, "landed": "may wait"}, + {"storeExpectPageOrder": ["Page 1", "Icon {run}", "Page 3"], "seconds": 60}, {"shot": "{out}/pages-open.png"}, - {"tapAt": [175, 607]}, + {"tapAt": [202, 704]}, {"wait": 1}, - {"typeText": "Renamed {run}", "optional": true}, - {"shot": "{out}/after-rename-icon.png"}, + {"tapText": "Delete"}, + {"wait": 2}, + {"waitStoreSent": 60, "landed": "may wait"}, + {"storeExpectPageOrder": ["Page 1", "Icon {run}"], "seconds": 60}, + {"tapText": "Icon {run}", "button": "secondary"}, {"wait": 1}, - {"tapAt": [201, 607]}, + {"tapText": "Delete"}, {"wait": 1}, - {"tapText": "Delete", "optional": true}, + {"tapText": "Delete"}, {"wait": 2}, - {"key": "escape"}, + {"waitStoreSent": 60, "landed": "may wait"}, + {"storeExpectPageOrder": ["Page 1"], "seconds": 60}, + {"tapText": "Page 1"}, + {"wait": 2}, + {"expectShownPage": 1}, + {"expectAgents": 1}, + {"expectItem": "a1-{run}"}, + {"expectCanvasIsTheStores": true}, + {"expectOldQueueEmpty": true}, + {"shot": "{out}/after-page-controls.png"}, + {"expectServerUnchanged": "before the strategy-wide controls"}, {"tapAt": [850, 20]}, {"wait": 1}, {"shot": "{out}/name-menu.png"}, {"texts": 1}, - {"key": "escape"}, - {"wait": 1}, - {"tapText": "Duplicate", "optional": true}, - {"wait": 2}, - {"key": "escape"}, - {"tapText": "Page 1", "button": "secondary", "optional": true}, - {"wait": 1}, - {"tapText": "Rename", "optional": true}, - {"wait": 1}, - {"typeText": "Renamed {run}", "optional": true}, - {"tapText": "Rename", "optional": true}, - {"wait": 1}, - {"key": "escape"}, - {"tapText": "Page 1", "button": "secondary", "optional": true}, - {"wait": 1}, - {"tapText": "Delete", "optional": true}, - {"wait": 1}, - {"tapText": "Delete", "optional": true}, - {"wait": 2}, - {"key": "escape"}, - {"wait": 5}, {"tapAt": [850, 20]}, {"wait": 1}, {"shot": "{out}/before-side-every-page.png"}, @@ -83,10 +95,11 @@ {"wait": 2}, {"shot": "{out}/after-neutral-colours.png"}, {"key": "escape"}, - {"wait": 2}, + {"wait": 5}, + {"expectStoreEditable": true}, {"expectAgents": 1}, {"expectOldQueueEmpty": true}, - {"expectServerUnchanged": "before the page controls"}, + {"expectServerUnchanged": "before the strategy-wide controls"}, {"tapAt": [229, 80]}, {"wait": 3}, {"shot": "{out}/after-attack.png"},