diff --git a/examples/api/e2e-tests/base.spec.ts b/examples/api/e2e/base.spec.ts similarity index 100% rename from examples/api/e2e-tests/base.spec.ts rename to examples/api/e2e/base.spec.ts diff --git a/examples/api/playwright.config.ts b/examples/api/e2e/playwright.config.ts similarity index 67% rename from examples/api/playwright.config.ts rename to examples/api/e2e/playwright.config.ts index 548ad14f..4bca883e 100644 --- a/examples/api/playwright.config.ts +++ b/examples/api/e2e/playwright.config.ts @@ -2,18 +2,11 @@ import { defineConfig, devices } from "@playwright/test"; declare var process: { env: Record }; -/** - * Read environment variables from file. - * https://github.com/motdotla/dotenv - */ -// import dotenv from 'dotenv'; -// dotenv.config({ path: path.resolve(__dirname, '.env') }); - /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - testDir: "./e2e-tests", + testDir: "./", /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ @@ -49,26 +42,6 @@ export default defineConfig({ name: "webkit", use: { ...devices["Desktop Safari"] }, }, - - /* Test against mobile viewports. */ - // { - // name: 'Mobile Chrome', - // use: { ...devices['Pixel 5'] }, - // }, - // { - // name: 'Mobile Safari', - // use: { ...devices['iPhone 12'] }, - // }, - - /* Test against branded browsers. */ - // { - // name: 'Microsoft Edge', - // use: { ...devices['Desktop Edge'], channel: 'msedge' }, - // }, - // { - // name: 'Google Chrome', - // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, - // }, ], /* Run your local dev server before starting the tests */ diff --git a/examples/api/playwright.dev.config.ts b/examples/api/e2e/playwright.dev.config.ts similarity index 67% rename from examples/api/playwright.dev.config.ts rename to examples/api/e2e/playwright.dev.config.ts index e3cc777b..d3d61c03 100644 --- a/examples/api/playwright.dev.config.ts +++ b/examples/api/e2e/playwright.dev.config.ts @@ -2,18 +2,11 @@ import { defineConfig, devices } from "@playwright/test"; declare var process: { env: Record }; -/** - * Read environment variables from file. - * https://github.com/motdotla/dotenv - */ -// import dotenv from 'dotenv'; -// dotenv.config({ path: path.resolve(__dirname, '.env') }); - /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - testDir: "./e2e-tests", + testDir: "./", /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ @@ -49,26 +42,6 @@ export default defineConfig({ name: "webkit", use: { ...devices["Desktop Safari"] }, }, - - /* Test against mobile viewports. */ - // { - // name: 'Mobile Chrome', - // use: { ...devices['Pixel 5'] }, - // }, - // { - // name: 'Mobile Safari', - // use: { ...devices['iPhone 12'] }, - // }, - - /* Test against branded browsers. */ - // { - // name: 'Microsoft Edge', - // use: { ...devices['Desktop Edge'], channel: 'msedge' }, - // }, - // { - // name: 'Google Chrome', - // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, - // }, ], /* Run your local dev server before starting the tests */ diff --git a/examples/api/package.json b/examples/api/package.json index 15ce8261..2beff6aa 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -10,8 +10,8 @@ "build:worker": "pnpm cloudflare", "dev:worker": "wrangler dev --port 8770", "preview:worker": "pnpm build:worker && pnpm dev:worker", - "e2e": "playwright test", - "e2e:dev": "playwright test -c playwright.dev.config.ts", + "e2e": "playwright test -c e2e/playwright.dev.config.ts", + "e2e:dev": "playwright test -c e2e/playwright.dev.config.ts", "cf-typegen": "wrangler types --env-interface CloudflareEnv" }, "dependencies": { diff --git a/examples/create-next-app/e2e/playwright.config.ts b/examples/create-next-app/e2e/playwright.config.ts index a0c91ba6..6aad04dd 100644 --- a/examples/create-next-app/e2e/playwright.config.ts +++ b/examples/create-next-app/e2e/playwright.config.ts @@ -2,13 +2,6 @@ import { defineConfig, devices } from "@playwright/test"; declare const process: { env: Record }; -/** - * Read environment variables from file. - * https://github.com/motdotla/dotenv - */ -// import dotenv from 'dotenv'; -// dotenv.config({ path: path.resolve(__dirname, '.env') }); - /** * See https://playwright.dev/docs/test-configuration. */ @@ -49,26 +42,6 @@ export default defineConfig({ name: "webkit", use: { ...devices["Desktop Safari"] }, }, - - /* Test against mobile viewports. */ - // { - // name: 'Mobile Chrome', - // use: { ...devices['Pixel 5'] }, - // }, - // { - // name: 'Mobile Safari', - // use: { ...devices['iPhone 12'] }, - // }, - - /* Test against branded browsers. */ - // { - // name: 'Microsoft Edge', - // use: { ...devices['Desktop Edge'], channel: 'msedge' }, - // }, - // { - // name: 'Google Chrome', - // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, - // }, ], /* Run your local dev server before starting the tests */