Skip to content

Commit 12b7f30

Browse files
authored
[INT-22] pdf: add example scripts and README (#796)
* [INT-22] pdf: add example scripts and README * [INT-22] pdf: update package version and link in readme * [INT-22] pdf: merge request suggestions * [INT-22] pdf: remove TODO comment
1 parent 76d2c12 commit 12b7f30

File tree

7 files changed

+2800
-0
lines changed

7 files changed

+2800
-0
lines changed

pdf/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Creating PDF snapshots
2+
3+
## Prerequisites
4+
5+
- NodeJS 18
6+
- Sauce Labs Account
7+
8+
## Run the demo
9+
10+
- Install `npm` dependencies:
11+
```
12+
npm install
13+
```
14+
- Configure with your Sauce credentials from https://app.saucelabs.com/user-settings :
15+
```sh
16+
export SAUCE_USERNAME=__YOUR_SAUCE_USER_NAME__
17+
export SAUCE_ACCESS_KEY=__YOUR_SAUCE_ACCESS_KEY__
18+
export SAUCE_REGION=__YOUR_REGION_NAME__ # default - us-west-1
19+
```
20+
- Upload baseline snapshots:
21+
```
22+
npm run sauce-visual
23+
```
24+
- Review your snapshots by clicking on the URL printed in the test, or go to https://app.saucelabs.com/visual/builds.
25+
- Accept uploaded diffs, so they become new baselines.
26+
- Re-run the tests:
27+
```
28+
npm run sauce-visual-check
29+
```
30+
- Open the test or go to https://app.saucelabs.com/visual/builds to review changes.
31+
- The changes should be detected and differences displayed between the two runs.
32+
33+
## Installation and usage
34+
35+
View installation and usage instructions on the [Sauce Docs website](https://docs.saucelabs.com/visual-testing/integrations/snapshots-cli/).

pdf/files/1/file1.pdf

15.6 KB
Binary file not shown.

pdf/files/1/file2.pdf

51.7 KB
Binary file not shown.

pdf/files/2/file1.pdf

15.8 KB
Binary file not shown.

pdf/files/2/file2.pdf

51.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)