You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`npm run build` (run this every time you have changes to a test or utils file that you want to include in the next test run, and for utils files specifically those changes to be present when importing via `@utils/*`)
39
+
40
+
# Run Playwright Tests
41
+
42
+
- cwd should be `cmfive-boilerplate/test/playwright/`
43
+
-`npm run cleanup` (important! do this every time before you run tests on a system after already having done so previously)
44
+
-`npm run test`
45
+
- to run tests for a specific platform: `npm run test --platform="[insert browser]"`
46
+
- Example: `npm run test --platform="firefox"`
47
+
- to run a specific test file: `npm run test --module="[insert test file name]"`
48
+
- Example: `npm run test --module="admin"`
49
+
- see: https://playwright.dev/docs/test-cli (look for `--grep` instead of `--module`)
50
+
- if you want your tests to be attempted a certain number of times (for flaky tests) when they fail: `npm run test:with-retries`
51
+
- Example: `npm run test:with-retries --module="task|timelog" --attempts=2 --clean` (`--clean` runs `npm run cleanup` BEFORE your tests run if you have a possibly dirty setup, the script automatically handles the rest of the cleanups for retries)
52
+
53
+
# Setting up a new Playwright test for a module
54
+
55
+
- cd into the top level of the module (for example, cwd could be `cmfive-core/system/modules/help`)
0 commit comments