-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: DB UX Design System development (#3537)
* docs: DB UX Design System development extracting Development section to not confuse any developers consuming our work. * Update README.md
- Loading branch information
Showing
2 changed files
with
41 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## Development | ||
|
||
### Tests | ||
|
||
TODO: Elaborate on testing setup | ||
|
||
#### Component Tests | ||
|
||
**Visual regression tests** | ||
|
||
Playwright is used to create and compare screenshots of each individual component. | ||
|
||
To update screenshots just run the following (you need Docker installed and available on your shell): | ||
|
||
```shell | ||
npm run regenerate:screenshots | ||
``` | ||
|
||
If you want to generate the screenshots manually, do the following: | ||
|
||
```shell | ||
npm run build | ||
|
||
# unix | ||
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.30.0-focal /bin/bash | ||
|
||
# windows - allow file sharing (windows pop up) | ||
docker run --rm --network host -v ${PWD}:/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.30.0-focal /bin/bash | ||
|
||
npm install | ||
|
||
cd output/${frameworkFolder} | ||
|
||
npx playwright test --update-snapshots | ||
``` | ||
|
||
You can also use `docker-compose` to test or regenerate screenshots. | ||
|
||
- testing: `docker-compose -f ./e2e/docker-compose.yml up` | ||
- update screenshots: `docker-compose -f ./e2e/docker-compose.regenerate.yml up` |