fix: use page scrolling for dragon tiger
This commit is contained in:
@@ -1400,25 +1400,31 @@ test("dragon-tiger redesign keeps the merged empty state and independent card hi
|
||||
await expect(page.locator("#stockDialog")).toBeVisible();
|
||||
await page.locator("#closeStockDialog").click();
|
||||
|
||||
await page.setViewportSize({ width: 1366, height: 768 });
|
||||
const scrollOwnership = await page.evaluate(() => {
|
||||
const body = document.querySelector("#dragonTraderDetail tbody");
|
||||
const seed = body.querySelector("tr");
|
||||
for (let index = 0; index < 20; index += 1) body.appendChild(seed.cloneNode(true));
|
||||
const main = document.querySelector(".app-main");
|
||||
const daily = document.querySelector("#dragonDailyContent");
|
||||
const operations = document.querySelector("#dragonTraderDetail .trader-operations");
|
||||
return {
|
||||
mainOverflow: getComputedStyle(main).overflowY,
|
||||
pageScrolls: main.scrollHeight > main.clientHeight,
|
||||
dailyOverflow: getComputedStyle(daily).overflowY,
|
||||
dailyFits: daily.scrollHeight <= daily.clientHeight + 1,
|
||||
operationOverflow: getComputedStyle(operations).overflowY,
|
||||
operationsScroll: operations.scrollHeight > operations.clientHeight,
|
||||
operationsFit: operations.scrollHeight <= operations.clientHeight + 1,
|
||||
descriptionSize: parseFloat(getComputedStyle(document.querySelector("#dragonTraderDetail .dragon-detail-header p")).fontSize),
|
||||
};
|
||||
});
|
||||
expect(scrollOwnership).toEqual({
|
||||
dailyOverflow: "hidden",
|
||||
mainOverflow: "auto",
|
||||
pageScrolls: true,
|
||||
dailyOverflow: "visible",
|
||||
dailyFits: true,
|
||||
operationOverflow: "auto",
|
||||
operationsScroll: true,
|
||||
operationsFit: true,
|
||||
descriptionSize: 13,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user