Refactor round: ship web/index.html, drop the remote browser, fix stale comments and README
- `.gitignore` said `index.html` unanchored, which also caught the Vite source page; a fresh clone could neither `dev` nor `build`. Anchored to `/index.html`, page added. - Removed GM_REMOTE (tools/remote/gm-browser.ps1 and the ssh/scp branch in browser.mjs): the Windows test machine is gone and the only flaky check that lived on it is closed (#37). - Removed `npm run preview`, undocumented and unused. - Comments: wrong number in collider.test.ts (250 → 200), the "declarations used to…" history in listItems.ts and friends, the 24 px/28 contradiction, section banners in nodes/index.ts, node-catalog.test.ts and api/index.php, name paraphrases, and the stale step numbers in tools/e2e/11-…23- from the old global count. - README: asset types include `animation`, kind order Number/Text/Boolean, tagged colour and texture items, 6/5 kinds, the `Texture` node, `./build.sh`, PROJECT_FORMAT_VERSION, and the file tree (kinds.ts, listItems.ts, propertyPorts.ts, Breadcrumb.ts, beads.ts, tools/assets/). - tests/helpers.ts takes the duplicated `findObject` and `sceneWithCamera`. Proof: ./check.sh 797 tests, full e2e ALL PASSED 633 checks against this bundle. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
d86a655a4d
commit
6471671f7d
44 files changed
+196
-445
No files matched your search
@@ -44,7 +44,7 @@ export async function structVariable(t) {
|
||||
`);
|
||||
await sleep(150);
|
||||
|
||||
// 1. The declaration is what the inspector draws: a head that can add fields, a row per field.
|
||||
// 22a. The declaration is what the inspector draws: a head that can add fields, a row per field.
|
||||
check('a struct variable carries the add-a-field control', (await find('+ Field')) !== null);
|
||||
check('and a row for each declared field', (await find('x')) !== null && (await find('tag')) !== null);
|
||||
check('whose value is shown, not a summary of the bundle', (await find('30.000')) !== null);
|
||||
@@ -56,7 +56,7 @@ export async function structVariable(t) {
|
||||
);
|
||||
await shot('01-struct-rows');
|
||||
|
||||
// 2. Writing one field keeps the others. Two edits in a row without a rebuild in between is
|
||||
// 22b. Writing one field keeps the others. Two edits in a row without a rebuild in between is
|
||||
// exactly where handlers sharing one snapshot of the bundle would revive the first value.
|
||||
const xField = await json("__gm.inspectorField('x')");
|
||||
await click(xField.x, xField.y);
|
||||
@@ -77,13 +77,13 @@ export async function structVariable(t) {
|
||||
JSON.stringify(await piece()),
|
||||
);
|
||||
|
||||
// 3. One undo step per field.
|
||||
// 22c. One undo step per field.
|
||||
await undo();
|
||||
check('undo takes back just the last field', (await piece()).tag === 'tee' && (await piece()).x === 42);
|
||||
await undo();
|
||||
check('and the one before it', (await piece()).x === 30, JSON.stringify(await piece()));
|
||||
|
||||
// 4. Adding a field reaches the declaration and the value at once.
|
||||
// 22d. Adding a field reaches the declaration and the value at once.
|
||||
await clickText('+ Field');
|
||||
await sleep(150);
|
||||
await pickKind('Boolean');
|
||||
@@ -96,7 +96,7 @@ export async function structVariable(t) {
|
||||
await sleep(200);
|
||||
check('undo takes it out of the value too', !('field1' in (await piece())), JSON.stringify(await piece()));
|
||||
|
||||
// 5. Renaming a field carries its value along.
|
||||
// 22e. Renaming a field carries its value along.
|
||||
const nameField = await json("__gm.locate('x')");
|
||||
await click(nameField.x, nameField.y);
|
||||
await press('a', { ctrl: true });
|
||||
@@ -109,7 +109,7 @@ export async function structVariable(t) {
|
||||
JSON.stringify(await piece()),
|
||||
);
|
||||
|
||||
// 6. A field may itself be a list. Its row is the same "n items" button a list property has,
|
||||
// 22f. A field may itself be a list. Its row is the same "n items" button a list property has,
|
||||
// and it opens the List tab one level down – on the field, not on the whole bundle.
|
||||
await clickText('+ Field');
|
||||
await sleep(150);
|
||||
@@ -160,7 +160,7 @@ export async function structVariable(t) {
|
||||
await mutate('__gm.state.openList(null)');
|
||||
await sleep(200);
|
||||
|
||||
// 7. The same bundle on a placed object. An override is sparse – it starts out unset – while a
|
||||
// 22g. The same bundle on a placed object. An override is sparse – it starts out unset – while a
|
||||
// field edit rebuilds the whole bundle, so the untouched fields have to come from what the row
|
||||
// shows (the asset's values) rather than from the empty form of the declaration.
|
||||
const placed = () => json("__gm.state.activeScene.objects.find((o) => o.id === 'ostruct').overrides.piece");
|
||||
@@ -180,7 +180,7 @@ export async function structVariable(t) {
|
||||
await sleep(200);
|
||||
check('a placed behavior shows its bundle, filled from the asset', (await find('tee')) !== null);
|
||||
|
||||
// 8. It reads exactly like the asset does: a head carrying the struct mark, then one row per
|
||||
// 22h. It reads exactly like the asset does: a head carrying the struct mark, then one row per
|
||||
// field with its kind mark, its name and its value. What is missing is the shape editing –
|
||||
// a placed object overrides values, the declaration stays with the asset that owns it.
|
||||
const bundleMark = await find('⊞');
|
||||
|
||||
Reference in new issue
Block a user