0.2.6-dev: browser tests read the round's real rules — free deploy tiles come from the client's own placement legality (terrain 机变 cards, devices, the boss half) instead of the stage's plain tiles, the facing tour waits for a later round when its purchase merged into an elite, and real.e2e skips its one strategy turn only while 跳过 is enabled (PR #546); golden: unchanged

This commit is contained in:
sganggs committed 2026-10-13 14:20:02 +08:00
1 parent a1f0d1bb6e
commit 2b685011e9
3 files changed
+42 -11

No files matched your search

+9 -3
View File
@@ -500,10 +500,16 @@ describe('real server + real browsers', { skip: !ENABLED && 'set SP_REAL_E2E=1 (
if (s.phase !== 'BAND_DRAFT' || picked.has(c.label) || s.draft?.turn !== s.me) continue;
if (!shotDraft) { await sleep(600); await c.shot('draft'); shotDraft = true; }
if (c === guest && !guestSkipped) {
await c.click('.draft-detail__btns .btn', '跳过');
guestSkipped = true;
c.note('skipped once');
continue;
// one skip — only while someone is left to pass to: the last player still to pick sees 跳过 disabled (PR #546)
const canSkip = await c.page.evaluate(() => [...document.querySelectorAll('.draft-detail__btns .btn')]
.some((b) => b.textContent.includes('跳过') && !b.disabled));
if (canSkip) {
await c.click('.draft-detail__btns .btn', '跳过');
c.note('skipped once');
continue;
}
c.note('跳过 disabled (the last player still to pick)');
}
await c.click('.dband:not(.is-taken)', null, { nth: c === host ? 3 : 7 });
await c.click('.draft-detail__btns .btn--primary', '确认选择');