Skip to content

Commit bf163b6

Browse files
committed
fix(test): keep Control UI changed tests in UI lane
1 parent 0767902 commit bf163b6

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎scripts/test-projects.test-support.mts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3262,7 +3262,7 @@ function classifyTarget(arg: string, cwd: string) {
32623262
if (isUiIsolatedTestFile(relative)) {
32633263
return "uiIsolated";
32643264
}
3265-
if (isPathAtOrUnder(relative, "ui/src")) {
3265+
if (isPathAtOrUnder(relative, "ui")) {
32663266
return "ui";
32673267
}
32683268
if (relative.startsWith("src/tui/tui-pty-")) {

‎test/scripts/test-projects.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,6 +2387,19 @@ describe("scripts/test-projects changed-target routing", () => {
23872387
]);
23882388
});
23892389

2390+
it("keeps mixed Control UI root and source changes in the UI lane", () => {
2391+
const plans = buildVitestRunPlans(["--changed", "origin/main"], process.cwd(), () => [
2392+
"ui/index.html",
2393+
"ui/src/components/markdown.test.ts",
2394+
"ui/src/pages/agents/memory/dreaming.test.ts",
2395+
]);
2396+
2397+
expect(plans.map((plan) => plan.config)).toEqual([
2398+
"test/vitest/vitest.ui.config.ts",
2399+
"test/vitest/vitest.ui-isolated.config.ts",
2400+
]);
2401+
});
2402+
23902403
it.each([
23912404
["ui/config/control-ui-chunking.ts", "ui/src/app/control-ui-chunking.test.ts"],
23922405
["ui/config/control-ui-locales.ts", "ui/src/app/vite-config.node.test.ts"],

0 commit comments

Comments
 (0)