From 3a6ec26127b4a06bf1e39c241c5222f3ac298440 Mon Sep 17 00:00:00 2001 From: sganggs Date: Tue, 13 Oct 2026 06:13:39 +0800 Subject: [PATCH] =?UTF-8?q?0.2.6-dev:=20the=20co-op=20browser=20test=20ski?= =?UTF-8?q?ps=20its=20one=20strategy=20turn=20only=20while=20=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=20is=20enabled=20=E2=80=94=20since=20PR=20#546=20the?= =?UTF-8?q?=20last=20player=20still=20to=20pick=20sees=20it=20disabled,=20?= =?UTF-8?q?which=20a=20random=20draft=20order=20gives=20the=20guest=20abou?= =?UTF-8?q?t=20one=20time=20in=20three;=20golden:=20unchanged?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/e2e/coop.e2e.mjs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/e2e/coop.e2e.mjs b/test/e2e/coop.e2e.mjs index add4aead..29f157f6 100644 --- a/test/e2e/coop.e2e.mjs +++ b/test/e2e/coop.e2e.mjs @@ -1062,10 +1062,17 @@ describe('browser E2E against the real server', { skip: !ENABLED && 'needs Chrom if (!shotDraft.has(c.label)) { shotDraft.add(c.label); await sleep(700); await c.shot(s.draft?.turn === s.me ? 'draft-myturn' : 'draft-waiting'); } if (picked.has(c.label) || s.draft?.turn !== s.me) continue; if (c === guest && !guestSkipped) { - await c.click('.draft-detail__btns .btn', '跳过'); guestSkipped = true; - c.note('band draft: skipped once'); - continue; + // one skip — only while someone is left to pass to: the last player still to pick sees 跳过 disabled + // (PR #546), which a random draft order gives the guest about one time in three + 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('band draft: skipped once'); + continue; + } + c.note('band draft: 跳过 disabled (the last player still to pick)'); } if ((s.draft?.picks || 0) > 0) { // research 09 §5: a strategy a teammate (human or AI) picked is marked 队友已选 and cannot be chosen