// Run with Node's test runner and Playwright on the module path; see README.md. // The owner: Settings' Search API menu scrolled under a thick dark bar on a // Mac. A menu (.pop.proto-menu, .pop.row-menu) and a picker's list (.pop ul) // were left to the system's scrollbar there, which with a mouse, or "Show // scroll bars: Always", is the classic wide one with a dark track. They now // scroll under the page's thin thumb, on a Mac and off one, in both engines. const assert = require("node:assert/strict"); const fs = require("node:fs/promises"); const path = require("node:path"); const { test } = require("node:test"); const playwright = require("playwright"); const css = path.resolve(__dirname, "../assets/app.css"); const engines = process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"]; async function gutters(engine, mac) { // headless Chromium hides scrollbars unless asked not to const browser = await playwright[engine].launch(engine === "chromium" ? { ignoreDefaultArgs: ["--hide-scrollbars"] } : {}); try { const page = await browser.newPage({ viewport: { width: 700, height: 500 } }); const items = Array.from({ length: 30 }, (_, i) => ``).join(""); const lis = Array.from({ length: 30 }, (_, i) => `