Loading a world clears cards left from the last one (t11)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,7 @@ with sync_playwright() as p:
|
||||
if not pg.is_visible('#nw-seed'): pg.click('#btn-new')
|
||||
pg.fill('#nw-seed', str(seed)); pg.click('#btn-generate')
|
||||
pg.wait_for_function('GAME.running', timeout=20000)
|
||||
check(f'new world {seed} shows the Welcome card', pg.evaluate("[...$('cards').children].some(c => c.textContent.includes('Welcome'))"))
|
||||
pg.evaluate('quitToTitle()')
|
||||
pg.wait_for_function("!$('title').hidden")
|
||||
pg.click('#btn-worlds'); pg.locator('#m-worlds').wait_for(state='visible')
|
||||
@@ -61,6 +62,7 @@ with sync_playwright() as p:
|
||||
row = pg.locator(f'[data-world="{ids[str(seed)]}"]')
|
||||
row.get_by_role('button', name='Load', exact=True).click(); pg.wait_for_function('GAME.running')
|
||||
check(f'Load switches to seed {seed}', pg.evaluate('worldSeed') == seed and pg.evaluate('GAME.worldId') == ids[str(seed)])
|
||||
check(f'loading seed {seed} shows no cards left from another world', pg.evaluate("$('cards').children.length") == 0)
|
||||
pg.evaluate('quitToTitle()'); pg.click('#btn-worlds')
|
||||
row = pg.locator(f'[data-world="{ids["222"]}"]')
|
||||
row.get_by_role('button', name='Rename', exact=True).click()
|
||||
|
||||
Reference in New Issue
Block a user