Skip to content

Commit 9a91406

Browse files
committed
Use Playwright baseURL for fixture navigation
1 parent b6d2f2c commit 9a91406

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

e2e/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const FIXTURE_SERVER_PORT = 51234;
2-
export const STABLE_TEST_PAGE_URL = `http://127.0.0.1:${FIXTURE_SERVER_PORT}/inspector-playground.html`;
2+
export const STABLE_TEST_PAGE_PATH = "/inspector-playground.html";

e2e/pages/web.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { BrowserContext, Page } from "@playwright/test";
22
import path from "path";
33

4-
import { STABLE_TEST_PAGE_URL } from "../constants";
4+
import { STABLE_TEST_PAGE_PATH } from "../constants";
55

66
declare const chrome: {
77
storage: {
@@ -12,7 +12,7 @@ declare const chrome: {
1212
};
1313

1414
export async function openStableTestPage(page: Page) {
15-
await page.goto(STABLE_TEST_PAGE_URL);
15+
await page.goto(STABLE_TEST_PAGE_PATH);
1616
await page.waitForLoadState("domcontentloaded");
1717
await page.waitForSelector('[data-testid="playground-main"]');
1818
}
@@ -35,7 +35,7 @@ export async function enableDomainInStorage(context: BrowserContext, domain: str
3535
}
3636

3737
export async function enableStableDomainInStorage(context: BrowserContext) {
38-
const domain = new URL(STABLE_TEST_PAGE_URL).host;
38+
const domain = "127.0.0.1:51234";
3939
await enableDomainInStorage(context, domain);
4040
}
4141

playwright.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ export default defineConfig({
1515
testDir: "./e2e",
1616
testMatch: "tests/**/*.spec.ts",
1717
/* Run tests in files in parallel */
18-
// fullyParallel: true,
18+
fullyParallel: true,
1919
/* Fail the build on CI if you accidentally left test.only in the source code. */
2020
forbidOnly: !!process.env.CI,
2121
/* Retry on CI only */
22-
retries: process.env.CI ? 2 : 0,
22+
retries: process.env.CI ? 1 : 0,
2323
/* Opt out of parallel tests on CI. */
24-
workers: process.env.CI ? 1 : undefined,
24+
// workers: process.env.CI ? 1 : undefined,
2525
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
2626
reporter: process.env.CI ? [["list"], ["html"], ["github"]] : "list",
2727
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2828
use: {
2929
/* Base URL to use in actions like `await page.goto('/')`. */
30-
// baseURL: 'http://localhost:3000',
30+
baseURL: "http://127.0.0.1:51234",
3131

3232
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
3333
trace: "on-first-retry",
@@ -61,7 +61,7 @@ export default defineConfig({
6161
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
6262
// },
6363
],
64-
timeout: process.env.CI ? 60_000 : 5_000,
64+
timeout: process.env.CI ? 30_000 : 5_000,
6565
webServer: {
6666
command: "node e2e/serve-fixtures.mjs 51234",
6767
url: "http://127.0.0.1:51234/inspector-playground.html",

0 commit comments

Comments
 (0)