Skip to content

Commit 1e722e5

Browse files
committed
proper test:e2e command cascading
1 parent 698239f commit 1e722e5

File tree

27 files changed

+59
-54
lines changed

27 files changed

+59
-54
lines changed

exercises/01.fundamentals/02.problem.running-the-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

exercises/01.fundamentals/02.solution.running-the-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

exercises/01.fundamentals/03.problem.custom-fixtures/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

exercises/01.fundamentals/03.solution.custom-fixtures/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

exercises/02.authentication/01.problem.basic/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

exercises/02.authentication/01.solution.basic/README.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44

55
## Summary
66

7+
1. In `db-utils,` implement the `createUser` utility, following the steps.
8+
1. Mention the `asyncDispose` for clean up of the created user. Handy!
9+
1. `createUser` creates a _test_ user. You might've heard that "test users" should be avoided. Talk about the difference between the two (we aren't creating a user that acts and asserts on internals; "test user" simply means an actual user record we created for test purposes).
10+
11+
---
12+
713
1. Create new test at `tests/e2e/authentication-basic.test.ts`.
814
1. Create a new test case for successful authentication using email and password.
9-
1. In the test, use the existing `createUser()` utility, which generates a new user and creates it in the database.
15+
1. In the test, use the newly created `createUser()` utility, which generates a new user and creates it in the database.
1016
1. Log in by filling the log in form as the user would.
11-
1. Talk about _locators_ in Playwright. They are promises to values.
1217
1. Assert that the authentication is successful based on the user profile link being visible on the screen.
1318
1. `npm run test:e2e:run`.
1419

exercises/02.authentication/01.solution.basic/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

exercises/02.authentication/02.problem.2fa/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

exercises/02.authentication/02.solution.2fa/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

exercises/02.authentication/03.problem.passkeys/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
2121
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
23-
"test:e2e": "npm run test:e2e:dev --silent",
24-
"test:e2e:dev": "npx playwright test --ui",
23+
"test:e2e": "npx playwright test",
24+
"test:e2e:dev": "npm run test:e2e -- --ui",
2525
"pretest:e2e:run": "npm run build",
2626
"test:e2e:run": "npx cross-env CI=true npx playwright test",
2727
"test:e2e:install": "npx playwright install --with-deps chromium",

0 commit comments

Comments
 (0)