A row scrolled out of its list is not on the screen, so no test may click it
CI found the gap the hard way: with every kind of asset in the project the new scene sits below the panel, and the right click for "Set as start scene" landed somewhere under the list instead of on the row. locate() only asked whether a text was visible, and a masked row still is - it is merely clipped away. locateAll and overlayTexts now walk the tree together (eachText) and carry the clip of every ancestor, measured on the widget that owns the mask: Pixi v8 hands a Graphics set as a mask to the mask effect and reports empty bounds for it, so asking the mask itself declares every masked text in the editor missing. Two hooks with two notions of "visible" was the second half of the same bug. The panel also scrolls the selected row into view now, the way the hierarchy has always done - an asset selected elsewhere has to be findable in the list, test or no test. And step 21 learned that scene is a property kind.
This commit is contained in:
1 parent
1e9d21cd5d
commit
150f2e0906
4 files changed
+76
-22
No files matched your search
@@ -90,8 +90,8 @@ export async function listTab(t) {
|
||||
'a list of its own offers every kind, the struct included',
|
||||
(await json('__gm.list.info()')).offers.join(',') ===
|
||||
// In the order of the kind table (`core/properties/kinds.ts`) – a new kind is a row there,
|
||||
// and `sound` (#45) is the newest of them.
|
||||
'number,text,boolean,color,texture,statemachine,sound,struct',
|
||||
// and `scene` (#39) is the newest of them.
|
||||
'number,text,boolean,color,texture,statemachine,sound,scene,struct',
|
||||
JSON.stringify((await json('__gm.list.info()')).offers),
|
||||
);
|
||||
await pickKind('Text');
|
||||
|
||||
@@ -114,7 +114,16 @@ export async function loadScene(t) {
|
||||
JSON.stringify(await playFrom()),
|
||||
);
|
||||
|
||||
// 35c. Naming one: right-click the scene in the assets panel.
|
||||
// 35c. Naming one: right-click the scene in the assets panel. By this point in the suite the
|
||||
// project holds every kind of asset, so the new scene is the last row of a list far longer
|
||||
// than the panel – selecting it brings it into view, which is what makes the click land.
|
||||
await evaluate("__gm.state.select({ kind: 'asset', assetId: 'ls-scene' })");
|
||||
await sleep(200);
|
||||
check(
|
||||
'selecting an asset scrolls its row into the panel',
|
||||
await has('Level 2'),
|
||||
JSON.stringify({ row: await json('__gm.assetRow("ls-scene")'), panel: await json('__gm.assetsRect()') }),
|
||||
);
|
||||
await clickText('Level 2', 'right');
|
||||
await sleep(250);
|
||||
await clickText('Set as start scene');
|
||||
|
||||
Reference in new issue
Block a user