A step opens a tab the way a person has to, through the menu when it is hidden
CI run 35 was red: the suite died after step 15 with `widget with text "Container" not found`. Nothing in the editor broke — the tenth tab (#73) pushed Container behind the `»` button at the test window's 1280 px, exactly the case #84 was built for, and three steps still clicked the tab name directly. openTab(t, tab) in tools/e2e/lib/scaffold.mjs asks tabRow() whether the tab is hidden and goes through the menu when it is, so the fix lives in one place rather than in every step that opens a tab. The LABELS record moves there as TAB_LABELS, since both the helper and 14-overflow need it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f9e1611d1
commit
4feb4c2cf6
5 files changed
+43
-24
No files matched your search
@@ -100,3 +100,32 @@ export async function scaffoldBehavior(t, options) {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/** What each tab button reads – the text a check has to click to open it. */
|
||||
export const TAB_LABELS = {
|
||||
scene: 'Scene',
|
||||
game: 'Game',
|
||||
graph: 'Behavior',
|
||||
statemachine: 'State machine',
|
||||
shader: 'Shader',
|
||||
texture: 'Texture',
|
||||
animation: 'Animation',
|
||||
container: 'Container',
|
||||
list: 'List',
|
||||
particles: 'Particles',
|
||||
};
|
||||
|
||||
/**
|
||||
* Opens a tab by clicking it, through the `»` menu when the row had to hide it. Since the tenth tab
|
||||
* (#73) that is the normal case at the test window's width: a plain `clickText('Container')` found
|
||||
* nothing and took the whole suite down with it.
|
||||
*/
|
||||
export async function openTab(t, tab) {
|
||||
const row = await t.json('__gm.tabRow()');
|
||||
if (row.hidden.includes(tab)) {
|
||||
await t.clickText('»');
|
||||
await t.sleep(300);
|
||||
}
|
||||
await t.clickText(TAB_LABELS[tab]);
|
||||
await t.sleep(400);
|
||||
}
|
||||
Reference in new issue
Block a user