* fix(ci): skip unrelated required checks cleanly Matrix jobs had to start no-op runners to preserve interpolated required-check names. Static named jobs let GitHub report genuine skipped conclusions while keeping those names stable. * fix(ci): gate changes to install patching script * fix(ci): route cross-package test contracts narrowly * fix(ci): keep routed contracts merge-blocking * fix(server): exclude nested test utilities from builds * fix(ci): cover app-owned native and browser domains * refactor(ci): align tests with runtime domains Own browser specs, desktop specs, and Electron-only app code by stable directories so PR routing does not depend on filename conventions. Keep desktop integration coverage inside the required desktop check. * fix(ci): keep routing and desktop suites isolated The routing regression must run before dependency installation, and desktop Vitest must not collect Playwright-owned specs. * fix(ci): isolate desktop e2e runtime * perf(test): isolate Playwright workers * perf(test): parallelize Playwright within specs * fix(test): keep Playwright file scheduling * fix(test): share dynamic Metro fixture * fix(test): preserve own-host restart fixtures * fix(ci): preserve routed contracts after rebase * Stabilize Playwright wheel-scroll assertions
62 lines
2.0 KiB
TypeScript
62 lines
2.0 KiB
TypeScript
import { test, expect } from "../../app/e2e/support/fixtures";
|
|
import { gotoAppShell, openSettings } from "../../app/e2e/support/helpers/app";
|
|
|
|
test.describe("Settings sidebar scrolling", () => {
|
|
test.use({ viewport: { width: 900, height: 260 } });
|
|
|
|
test("desktop drag region does not cover the scroll body", async ({ page }) => {
|
|
await page.addInitScript(() => {
|
|
window.paseoDesktop = {
|
|
platform: "darwin",
|
|
events: { on: () => () => {} },
|
|
invoke: async (command: string) => {
|
|
if (command === "get_desktop_settings") {
|
|
return {
|
|
releaseChannel: "stable",
|
|
daemon: { manageBuiltInDaemon: true, keepRunningAfterQuit: true },
|
|
};
|
|
}
|
|
return null;
|
|
},
|
|
};
|
|
});
|
|
|
|
await gotoAppShell(page);
|
|
await openSettings(page);
|
|
|
|
const sidebar = page.getByTestId("settings-sidebar");
|
|
await expect(sidebar).toBeVisible();
|
|
|
|
const geometry = await sidebar.evaluate((node) => {
|
|
let scroller: HTMLElement | null = null;
|
|
for (const element of node.querySelectorAll<HTMLElement>("*")) {
|
|
if (element.scrollHeight > element.clientHeight) {
|
|
scroller = element;
|
|
break;
|
|
}
|
|
}
|
|
if (!scroller) return null;
|
|
|
|
const scrollerRect = scroller.getBoundingClientRect();
|
|
const dragRegions = [];
|
|
for (const element of node.querySelectorAll<HTMLElement>("*")) {
|
|
if (getComputedStyle(element).getPropertyValue("-webkit-app-region") === "drag") {
|
|
const rect = element.getBoundingClientRect();
|
|
dragRegions.push({ bottom: rect.bottom });
|
|
}
|
|
}
|
|
|
|
return {
|
|
scrollBodyTop: scrollerRect.top,
|
|
dragRegions,
|
|
};
|
|
});
|
|
|
|
expect(geometry).not.toBeNull();
|
|
expect(geometry!.dragRegions).not.toEqual([]);
|
|
for (const dragRegion of geometry!.dragRegions) {
|
|
expect(dragRegion.bottom).toBeLessThanOrEqual(geometry!.scrollBodyTop + 1);
|
|
}
|
|
});
|
|
});
|