Skip to content

Commit 398ff64

Browse files
committed
use the test command for e2e tests
1 parent b728069 commit 398ff64

File tree

31 files changed

+39
-33
lines changed

31 files changed

+39
-33
lines changed

exercises/01.basics/01.problem.install-and-configure/README.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npx playwright install --with-deps chromium
1818

1919
🐨 Next, create `playwright.config.ts` file at the root of your project. This is Playwright's configuration file. You will use it to set up Playwright in the way that makes sense for your project.
2020

21-
🐨 In `package.json`, create a new script called `test:e2e`. You will use this script to run your end-to-end tests at the end of this exercise. Use the `playwright test` command as the value for that script.
21+
🐨 In `package.json`, create a new script called `test`. You will use this script to run your end-to-end tests at the end of this exercise. Use the `npx playwright test` command as the value for that script.
2222

2323
🐨 Create a directory called `tests`. In that directory, create a new test file called `epicweb.test.ts`.
2424

@@ -45,4 +45,4 @@ To do that, your test would have to perform a series of steps:
4545
4646
3. Assert that the heading element is visible on the page via `await expect(element).toBeVisible()`.
4747

48-
🐨 Finally, run this test via `npm run test:e2e` in the terminal. You should see it passing.
48+
🐨 Finally, run this test via `npm test` in the terminal. You should see it passing.

exercises/01.basics/02.problem.running-the-app/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
🐨 Now that `webServer` is configured, it's time to write some tests! Let's start from testing the homepage of the app. I've already got a test file prepared for you at <InlineFile file="./tests/e2e/homepage.test.ts">`tests/e2e/homepage.test.ts`</InlineFile>. Open that file and write a test case there.
1010

11-
Once you're done, make sure that the added test is passing by running the `npm run test:e2e:run` command in your terminal.
11+
Once you're done, make sure that the added test is passing by running the `npm test` command in your terminal.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"setup": "npm run build && prisma migrate deploy && prisma generate --sql && playwright install",
1919
"start": "cross-env NODE_ENV=production node .",
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
21-
"test": "vitest",
21+
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
2323
"test:e2e": "npm run test:e2e:dev --silent",
2424
"test:e2e:dev": "npx playwright test --ui",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"setup": "npm run build && prisma migrate deploy && prisma generate --sql && playwright install",
1919
"start": "cross-env NODE_ENV=production node .",
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
21-
"test": "vitest",
21+
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
2323
"test:e2e": "npm run test:e2e:dev --silent",
2424
"test:e2e:dev": "npx playwright test --ui",

exercises/02.test-setup/01.problem.custom-fixtures/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
🐨 Once the fixture is ready, refactor the <InlineFile file="./tests/e2e/homepage.test.ts">`tests/e2e/homepage.test.ts`</InlineFile> test suite to use the newly created `navigate()` fixture.
1010

11-
And, of course, verify that the tests are passing in the end by running `npm run test:e2e:run`. Good luck!
11+
And, of course, verify that the tests are passing in the end by running `npm test`. Good luck!

exercises/02.test-setup/01.problem.custom-fixtures/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"setup": "npm run build && prisma migrate deploy && prisma generate --sql && playwright install",
1919
"start": "cross-env NODE_ENV=production node .",
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
21-
"test": "vitest",
21+
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
2323
"test:e2e": "npm run test:e2e:dev --silent",
2424
"test:e2e:dev": "npx playwright test --ui",

exercises/02.test-setup/01.solution.custom-fixtures/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"setup": "npm run build && prisma migrate deploy && prisma generate --sql && playwright install",
1919
"start": "cross-env NODE_ENV=production node .",
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
21-
"test": "vitest",
21+
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
2323
"test:e2e": "npm run test:e2e:dev --silent",
2424
"test:e2e:dev": "npx playwright test --ui",

exercises/02.test-setup/03.problem.authentication/README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ npm i playwright-persona -D
1414

1515
🐨 Once you've defined the `user` persona and created the `authenticate()` fixture, continue to the <InlineFile file="./tests/e2e/notes-create.test.ts">`tests/e2e/notes-create.test.ts`</InlineFile> test suite and finish the test case here.
1616

17-
Verify your solution by running the tests (`npm run test:e2e:dev`). The tests must pass!
17+
Verify your solution by running the tests (`npm test`). The tests must pass!

exercises/02.test-setup/03.problem.authentication/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"setup": "npm run build && prisma migrate deploy && prisma generate --sql && playwright install",
1919
"start": "cross-env NODE_ENV=production node .",
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
21-
"test": "vitest",
21+
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
2323
"test:e2e": "npm run test:e2e:dev --silent",
2424
"test:e2e:dev": "npx playwright test --ui",

exercises/02.test-setup/03.solution.authentication/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"setup": "npm run build && prisma migrate deploy && prisma generate --sql && playwright install",
1919
"start": "cross-env NODE_ENV=production node .",
2020
"start:mocks": "cross-env NODE_ENV=production MOCKS=true tsx .",
21-
"test": "vitest",
21+
"test": "npx playwright test",
2222
"coverage": "vitest run --coverage",
2323
"test:e2e": "npm run test:e2e:dev --silent",
2424
"test:e2e:dev": "npx playwright test --ui",

0 commit comments

Comments
 (0)