@luomus/laji-form 15.1.6 → 15.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -159,22 +159,26 @@ http://localhost:8083?id=MHL.1&localFormData=true Line transect form with local
159
159
 
160
160
  ## Tests
161
161
 
162
- You need to update the webdriver before testing:
162
+ You might need to install playwright dependencies to run the tests:
163
163
 
164
164
  ```
165
- webdriver-manager update
165
+ npx playwright install
166
166
  ```
167
167
 
168
- The playground server must be running before running the tests.
168
+ The playground server can be running or or not. If it's not running, it will be automatically started.
169
169
 
170
- Run the tests with `npm test`.
170
+ Run the tests:
171
171
 
172
- ### Test parameters
172
+ ```
173
+ npm test
174
+ ```
173
175
 
174
- Parameters are given as envirnment variables, i.e. `TEST_BROWSER=chrome npm test`
176
+ If you run into issues with browser dependencies etc, there's also a dockerized runner:
175
177
 
176
- Option | Default | Description
177
- ---------------|---------|-----------------------------------------------------------------------------------------------
178
- TEST_BROWSER | - | `chrome` or `firefox`. Tests are run for both by default.
179
- HEADLESS | `true` | Run the tests in a visible browser window if `true`.
180
- THREADS | 4 | How many browser instances to use for parallel testing.
178
+ ```
179
+ # Run all tests (builds docker image & runs it)
180
+ npm run test:docker
181
+
182
+ # Or if you want to give playwright params, run certain tests etc:
183
+ npm run test:docker -- test/mobile-form.spec.ts --project chromium
184
+ ```