From ad8d0bf6b1f0808564887a89c341d3b457c8bd94 Mon Sep 17 00:00:00 2001 From: sganggs Date: Sat, 3 Oct 2026 16:33:54 +0800 Subject: [PATCH] feedback1 draft-info: the devices e2e left-detail-card check taps a shop card that completes no merge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At 640ร—360 the mock's first shop card completes a merge; its detail opens in the left slot and moves to the right one 20-40 ms later because the elite's lit board tile lies under the left slot (screens/game.js dSide, DESIGN ยง20.11). The check caught the left card only sometimes and then measured the corner buttons against the right one. It now taps a card without a merge and asserts the card stays left. --- test/ui/devices.e2e.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/ui/devices.e2e.test.js b/test/ui/devices.e2e.test.js index db96939a..bb9e3947 100644 --- a/test/ui/devices.e2e.test.js +++ b/test/ui/devices.e2e.test.js @@ -250,10 +250,14 @@ describe('multi-device (Chrome device emulation)', { skip: !ENABLED && 'set SP_E for (const dev of ['phone-min', 'iphone14']) { test(`${dev}: the left detail card leaves the corner buttons (โš™ ๐Ÿ“– โ›ถ) usable`, async () => { const { page, problems } = await open(dev, 'phase=PREP'); - const card = await page.$eval('.shopbar__cards .scard:not(.scard--sold):not(.is-disabled)', (el) => { const b = el.getBoundingClientRect(); return { x: b.left + b.width / 2, y: b.top + b.height / 2 }; }); + // not a card that completes a merge: it lights its elite's board tile, and the card moves to the right slot when that + // tile lies under the left one (screens/game.js dSide, DESIGN ยง20.11) โ€” 20โ€“40 ms after it opened on the left, at + // 640ร—360 for the mock's first card, so the left card was caught only sometimes and the check below saw the right one + const card = await page.$eval('.shopbar__cards .scard:not(.scard--sold):not(.is-disabled):not(.is-merge)', (el) => { const b = el.getBoundingClientRect(); return { x: b.left + b.width / 2, y: b.top + b.height / 2 }; }); await page.touchscreen.tap(card.x, card.y); await page.waitForSelector('.dpanel:not(.dpanel--right)', { timeout: 3000 }); await sleep(400); + assert.equal(await page.$('.dpanel.dpanel--right'), null, `${dev}: the card stays in the left slot`); const covered = await page.evaluate(() => [...document.querySelectorAll('.gm__corner .gm__gear')].map((el) => { const r = el.getBoundingClientRect(); const t = document.elementFromPoint(r.left + r.width / 2, r.top + r.height / 2);