Skip to content

Commit fa540a2

Browse files
committed
Moved Playwright test to separate folder
1 parent a64ecc5 commit fa540a2

15 files changed

Lines changed: 22 additions & 9 deletions

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,10 @@ package-lock.json
4949

5050
# ignore .astro directory
5151
.astro
52+
53+
# Playwright
54+
node_modules/
55+
/test-results/
56+
/playwright-report/
57+
/blob-report/
58+
/playwright/.cache/

apps/contact/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "next build",
99
"start": "next start",
1010
"lint": "next lint",
11-
"test": "npx jest && npx playwright test"
11+
"test": "npx jest"
1212
},
1313
"dependencies": {
1414
"react": "^19.0.0",
@@ -20,7 +20,6 @@
2020
"zod": "^4.0.17"
2121
},
2222
"devDependencies": {
23-
"@playwright/test": "^1.55.0",
2423
"@types/jest": "^30.0.0",
2524
"@types/node": "^24",
2625
"@types/node-fetch": "^2.6.13",

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
"build": "turbo build",
66
"dev": "turbo dev",
77
"lint": "turbo lint",
8-
"format": "prettier --write \"**/*.{ts,tsx,astro}\""
8+
"format": "prettier --write \"**/*.{ts,tsx,astro}\"",
9+
"test:playwright": "cd tests && npx playwright test"
910
},
1011
"devDependencies": {
12+
"@playwright/test": "^1.55.0",
1113
"turbo": "^2.5.6"
1214
},
1315
"engines": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { defineConfig, devices } from "@playwright/test";
1212
* See https://playwright.dev/docs/test-configuration.
1313
*/
1414
export default defineConfig({
15-
testDir: "./tests/playwright",
15+
testDir: "./playwright",
1616
/* Run tests in files in parallel */
1717
fullyParallel: true,
1818
/* Fail the build on CI if you accidentally left test.only in the source code. */
File renamed without changes.
File renamed without changes.

apps/contact/tests/playwright/forCtosMobile.spec.ts renamed to tests/playwright/forCtosMobile.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { test, expect, Page, devices } from "@playwright/test";
1+
import { test, expect, devices } from "@playwright/test";
2+
import type { Page } from "@playwright/test";
23

34
// const baseUrl = "http://localhost:4321";
45
const baseUrl = "https://www.crocoder.dev";
File renamed without changes.

apps/contact/tests/playwright/formMobile.spec.ts renamed to tests/playwright/formMobile.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { test, expect, Page, devices } from "@playwright/test";
1+
import { test, expect, devices } from "@playwright/test";
2+
import type { Page } from "@playwright/test";
23

34
// const baseUrl = "http://localhost:4321";
45
const baseUrl = "https://www.crocoder.dev";
File renamed without changes.

0 commit comments

Comments
 (0)