Files
openclaw/src/scripts/ci-changed-scope.control-ui.test.ts
Vincent Koc 90a22b4f50 chore(test): run browser copilot E2E in CI (#116407)
* test(browser): run copilot E2E in CI

* test(browser): stabilize copilot E2E synchronization

* test(browser): wake extension workers deterministically

* test(ci): route browser copilot command changes
2026-07-30 23:20:34 +08:00

30 lines
960 B
TypeScript

import { expect, it } from "vitest";
const { detectChangedScope } = await import("../../scripts/ci-changed-scope.mjs");
it("runs control-ui localization checks for production UI source", () => {
expect(detectChangedScope(["ui/src/pages/chat/chat-realtime.ts"])).toMatchObject({
runControlUiI18n: true,
runUiTests: true,
});
});
it("skips control-ui localization checks for test-only UI source", () => {
expect(detectChangedScope(["ui/src/pages/chat/chat-realtime.test.ts"]).runControlUiI18n).toBe(
false,
);
});
it("runs Chromium UI tests for browser copilot extension changes", () => {
expect(detectChangedScope(["extensions/browser/chrome-extension/sidepanel.ts"]).runUiTests).toBe(
true,
);
});
it.each(["package.json", ".github/workflows/ci.yml"])(
"runs Chromium UI tests when %s can change the browser copilot CI route",
(changedPath) => {
expect(detectChangedScope([changedPath]).runUiTests).toBe(true);
},
);