feedback7 R22-E2EFIX: loadout e2e's pickChess waits for the detail to show the picked chess at the top before clicking in it; golden: unchanged
loadout.e2e 「局内数值 (desktop)…」 failed with 'Node is either not clickable or not an Element' on the 局内数值 精锐 tab right after picking 信仰搅拌机. pickChess returned as soon as a stats cell was visible — the previous chess's — and the detail resets its scroll for a new chess after paint (screens/loadout.js), so puppeteer scrolled the tab into view and the reset then moved it below the viewport before the click (measured: scrollTop 366 → 0, the tab at y 1201 of 1080). The 0.2.2 detail opens with 潜能与练度 and 特质, so 局内数值 / 模组 sit below the fold and need that scroll. pickChess now waits for the detail's name and its body back at scrollTop 0. A player is not affected (the reset is the intended behaviour); the assertions are unchanged. - Tests (SP_E2E=1): loadout.e2e 11/11.
This commit is contained in:
1 parent
267a826b58
commit
917e89240c
1 file changed
+4
@@ -455,6 +455,10 @@ describe('干员调配 overlay (real server, headless Chrome)', { skip: !ENABLED
|
|||||||
await page.type('.lo-search input', name);
|
await page.type('.lo-search input', name);
|
||||||
await page.waitForFunction((n) => document.querySelectorAll('.lo-card').length === 1 && document.querySelector('.lo-card .lo-card__name')?.textContent === n, { timeout: 5000 }, name);
|
await page.waitForFunction((n) => document.querySelectorAll('.lo-card').length === 1 && document.querySelector('.lo-card .lo-card__name')?.textContent === n, { timeout: 5000 }, name);
|
||||||
await page.click('.lo-card__pick');
|
await page.click('.lo-card__pick');
|
||||||
|
// the detail shows the picked chess and its body is back at the top: screens/loadout.js resets the scroll for a new
|
||||||
|
// chess after paint, and a click that puppeteer scrolled into view before that reset lands outside the viewport (the
|
||||||
|
// 0.2.2 detail opens with 潜能与练度 and 特质, so 局内数值 / 模组 sit below the fold at 1920 × 1080)
|
||||||
|
await page.waitForFunction((n) => document.querySelector('.lo-dhead__name')?.textContent === n && document.querySelector('.lo-detail__body')?.scrollTop === 0, { timeout: 5000 }, name);
|
||||||
await page.waitForSelector('.lo-sec--stats .dstat', { visible: true });
|
await page.waitForSelector('.lo-sec--stats .dstat', { visible: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user