Build card describes the build tool in general, not the selected piece

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 23:42:38 -04:00
co-authored by Claude Opus 5.5
parent dd8fc3d866
commit 971bcc2558
5 changed files with 26 additions and 11 deletions
+2 -1
View File
@@ -228,7 +228,8 @@ with sync_playwright() as p:
ev('GAME.wallMat = RSTONE; hudDirty = true')
check('build tool starts on wall blocks', ok)
settle(150)
check('the build tool shows a compact top-left card', pg.is_visible('#selcard') and pg.inner_text('#selcard .name') == ev('piece().name') and ev("costText(pieceCostNow(piece()), 1) || 'free'") in pg.inner_text('#selcard') and ev('piece().desc') not in pg.inner_text('#selcard'))
card = pg.inner_text('#selcard') if pg.is_visible('#selcard') else ''
check('the build tool card describes the build tool, not the piece', pg.inner_text('#selcard .name') == 'Build' and 'menu below' in card and ev('piece().name') not in card and ev("costText(pieceCostNow(piece()), 1) || 'free'") not in card and ev('piece().desc') not in card, card[:160])
check('the build menu has no status row', pg.locator('#buildbar .bb-status').count() == 0)
check('the build menu has no short description row', pg.locator('.bb-tip').count() == 0)
for id in ['wall', 'grate']: