Skip to content

Commit c85e002

Browse files
gustavoliraclaude
andcommitted
ci(e2e): conform harness config to Oxc (oxlint/oxfmt) after main migration
main migrated e2e-tests from ESLint/Prettier/tsc to oxlint + oxfmt. Reformat the harness files with oxfmt and satisfy oxlint: a shared isCI constant (process.env.CI !== undefined && !== ''), nullish coalescing, the regexp u flag, and no inline comments. Matches the pattern in playwright.config.ts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4813459 commit c85e002

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

e2e-tests/playwright.legacy-local.config.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { defineConfig, devices } from "@playwright/test";
21
import { resolve } from "path";
32

3+
import { defineConfig, devices } from "@playwright/test";
4+
45
/**
56
* Cluster-free local E2E harness for the legacy frontend (`packages/app`) — Tier B.
67
*
@@ -29,6 +30,7 @@ const frontendUrl = "http://localhost:3000";
2930
const backendReadiness = "http://localhost:7007/.backstage/health/v1/readiness";
3031
const repoRootBin = resolve(process.cwd(), "..", "node_modules", ".bin");
3132
const pathWithRepoBin = `${repoRootBin}:${process.env.PATH ?? ""}`;
33+
const isCI = process.env.CI !== undefined && process.env.CI !== "";
3234

3335
const sharedConfigArgs = [
3436
"--config ../../app-config.yaml",
@@ -46,19 +48,19 @@ export default defineConfig({
4648
// profile dropdown (needs the global-header plugin) or need per-spec config. See
4749
// docs/e2e-tests/local-e2e-harness.md "Known issues". Widen as specs are validated.
4850
testMatch: ["e2e/guest-signin-happy-path.spec.ts"],
49-
grep: /Homepage renders with Search Bar/,
51+
grep: /Homepage renders with Search Bar/u,
5052
timeout: 90 * 1000,
51-
forbidOnly: !!process.env.CI,
52-
retries: process.env.CI ? 1 : 0,
53-
workers: 1, // serial: a single shared backend + dev server
53+
forbidOnly: isCI,
54+
retries: isCI ? 1 : 0,
55+
// serial: a single shared backend + dev server
56+
workers: 1,
5457
reporter: [
5558
["list"],
5659
["html", { open: "never", outputFolder: "playwright-report-legacy-local" }],
5760
[
5861
"junit",
5962
{
60-
outputFile:
61-
process.env.JUNIT_RESULTS || "junit-results-legacy-local.xml",
63+
outputFile: process.env.JUNIT_RESULTS ?? "junit-results-legacy-local.xml",
6264
},
6365
],
6466
],
@@ -90,7 +92,7 @@ export default defineConfig({
9092
NODE_OPTIONS: "--no-node-snapshot",
9193
},
9294
url: backendReadiness,
93-
reuseExistingServer: !process.env.CI,
95+
reuseExistingServer: !isCI,
9496
timeout: 180 * 1000,
9597
stdout: "pipe",
9698
stderr: "pipe",
@@ -100,7 +102,7 @@ export default defineConfig({
100102
cwd: "../packages/app",
101103
env: { ...process.env, PATH: pathWithRepoBin },
102104
url: frontendUrl,
103-
reuseExistingServer: !process.env.CI,
105+
reuseExistingServer: !isCI,
104106
timeout: 240 * 1000,
105107
stdout: "pipe",
106108
stderr: "pipe",

e2e-tests/playwright/support/local-harness-global-setup.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ export default function requireDynamicPluginsPopulated(): void {
1414

1515
let pluginCount = 0;
1616
try {
17-
pluginCount = readdirSync(root).filter(
18-
(entry) => entry !== ".gitkeep",
19-
).length;
17+
pluginCount = readdirSync(root).filter((entry) => entry !== ".gitkeep").length;
2018
} catch {
2119
// root missing — treated as empty below.
2220
}

0 commit comments

Comments
 (0)