-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc(showcase): add a readme to explain how to update the screenshots …
…for visual testing (#2489) ## Proposed change <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. --> ## Related issues <!-- Please make sure to follow the [contribution guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md) --> *- No issue associated -* <!-- * 🐛 Fix #issue --> <!-- * 🐛 Fix resolves #issue --> <!-- * 🚀 Feature #issue --> <!-- * 🚀 Feature resolves #issue --> <!-- * Pull Request #issue -->
- Loading branch information
Showing
4 changed files
with
25 additions
and
4 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
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,14 @@ | ||
# How to generate screenshots for the visual testing | ||
|
||
To minimize discrepancies on the screenshots between different operating systems, we are generating the screenshots from inside a docker. | ||
The procedure is the following: | ||
|
||
1. Prerequisite: you need a docker setup (or podman), `docker` should be available globally | ||
2. Build your application with your latest modifications `yarn nx build showcase`. | ||
3. Serve the application on port 8080 `npx http-server ./apps/showcase/dist/browser`\ | ||
The script will look on all local interfaces for an app running on `http://localhost:8080` | ||
4. Make sure all your changes on the spec files are commited `git commit`\ | ||
The project is cloned inside the docker image using `git clone` to avoid polluting the original folder.\ | ||
Only the screenshots are exported. | ||
5. Run the script to launch the e2e-tests inside the docker image `yarn workspace @o3r/showcase run update-screenshots` | ||
6. You should now have the updated screenshots in your project. |