* 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 { writeFile } from "node:fs/promises";
|
|
import path from "node:path";
|
|
import { test, expect } from "../support/fixtures";
|
|
import { TerminalE2EHarness } from "../support/helpers/terminal-dsl";
|
|
import { getTerminalBufferText, waitForTerminalContent } from "../support/helpers/terminal-perf";
|
|
|
|
const OSC11_CAPTURE_SCRIPT = `
|
|
let captured = Buffer.alloc(0);
|
|
|
|
function finish() {
|
|
process.stdout.write("PASEO_OSC11_CAPTURE:" + JSON.stringify(captured.toString("latin1")) + "\\n");
|
|
process.exit(0);
|
|
}
|
|
|
|
process.stdout.write("\\x1b]11;?\\x07");
|
|
if (process.stdin.isTTY) {
|
|
process.stdin.setRawMode(true);
|
|
}
|
|
process.stdin.resume();
|
|
process.stdin.on("data", (chunk) => {
|
|
captured = Buffer.concat([captured, chunk]);
|
|
if (captured.includes(Buffer.from("rgb:"))) {
|
|
finish();
|
|
}
|
|
});
|
|
setTimeout(finish, 700);
|
|
`;
|
|
|
|
test.describe("Terminal protocol queries", () => {
|
|
let harness: TerminalE2EHarness;
|
|
|
|
test.beforeAll(async () => {
|
|
harness = await TerminalE2EHarness.create({ tempPrefix: "terminal-protocol-query-" });
|
|
await writeFile(path.join(harness.tempRepo.path, "osc11-capture.cjs"), OSC11_CAPTURE_SCRIPT);
|
|
});
|
|
|
|
test.afterAll(async () => {
|
|
await harness?.cleanup();
|
|
});
|
|
|
|
test("does not send browser OSC 11 color-query replies back to the PTY", async ({ page }) => {
|
|
const terminalInstance = await harness.createTerminal({ name: "osc11-query" });
|
|
try {
|
|
await harness.openTerminal(page, { terminalId: terminalInstance.id });
|
|
await harness.setupPrompt(page);
|
|
|
|
const terminal = harness.terminalSurface(page);
|
|
await terminal.pressSequentially("node osc11-capture.cjs\n", { delay: 0 });
|
|
|
|
await waitForTerminalContent(page, (text) => text.includes("PASEO_OSC11_CAPTURE:"), 10_000);
|
|
await page.waitForTimeout(500);
|
|
|
|
const text = await getTerminalBufferText(page);
|
|
|
|
expect(text).toContain("rgb:0b0b/0b0b/0b0b");
|
|
expect(text).not.toContain("rgb:ffff/ffff/ffff");
|
|
} finally {
|
|
await harness.killTerminal(terminalInstance.id);
|
|
}
|
|
});
|
|
});
|