Skip to content

Commit

Permalink
fix: e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaJastrz committed May 29, 2024
1 parent 909d039 commit 762f098
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: "http://127.0.0.1:3000",
baseURL: "http://localhost:3000",

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
Expand All @@ -46,7 +46,7 @@ export default defineConfig({
/* Run your local dev server before starting the tests */
webServer: {
command: process.env.CI ? "pnpm start" : "pnpm dev",
url: "http://127.0.0.1:3000",
url: "http://localhost:3000",
reuseExistingServer: !process.env.CI,
},
});
4 changes: 2 additions & 2 deletions tests/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test("opens a suggestion box and navigates to selected package", async ({ page,

expect(await page.getByRole("option").count()).toBe(0);

await page.waitForURL("http://127.0.0.1:3000/package/react-dom");
await page.waitForURL("/package/react-dom");

const search2 = page.getByRole("combobox", { name: /npm package/i });
await expect(search2).toHaveValue("react-dom");
Expand Down Expand Up @@ -54,7 +54,7 @@ test("navigates to package page without suggestions", async ({ page, worker }) =

expect(await page.getByRole("option").count()).toBe(0);

await page.waitForURL("http://127.0.0.1:3000/package/react");
await page.waitForURL("/package/react");

const search2 = page.getByRole("combobox", { name: /npm package/i });
await expect(search2).toHaveValue("react");
Expand Down

0 comments on commit 762f098

Please sign in to comment.