Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Cocoa committed May 8, 2024
1 parent 1893a6f commit cdc7116
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ If you require more detailed instructions on any of these steps, please see the
![pull request example](/docs/PR-example.png)

## Adding PDF Tests

We use [pdf-visual-diff](https://github.com/moshensky/pdf-visual-diff) to compare results for full workflow runs. To add a new baseline file to compare against:

1. Pick a file under /docs to use. Run it through the app, and save the output zip file. **Important**: if you're adding a test for for a 'classic' layout configuration, set the output to include signatures and to be duplexed.
2. Put the output file (wacky) or first signature (classic) in /pdf-test/files, and give it a descriptive name.
3. Open up /pdf-test/pdfTestCases.js and add a new entry to the `testCases` object. The key should be the same as the name you gave the file (without the .pdf extension), and the object should have two keys: `input`, which is the filename of the file you used, and `config`, which should have the contents of the object from the settings.txt file included in the output zip.
4. Generate new snapshots by running `npm run generate-snapshots` - this will clear existing snapshots and generate new ones for all files.
4. Generate new snapshots by running `npm run generate-snapshots` - this will clear existing snapshots and generate new ones for all files.
10 changes: 8 additions & 2 deletions src/utils/formUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import { schema } from '../models/configuration';
import { clearLocalSettings, getLocalSettings, setLocalSettings, } from './localStorageUtils';
import { renderFormFromSettings, renderInfoBox, renderPageCount, renderWacky, updatePageLayoutInfo } from './renderUtils';
import { clearLocalSettings, getLocalSettings, setLocalSettings } from './localStorageUtils';
import {
renderFormFromSettings,
renderInfoBox,
renderPageCount,
renderWacky,
updatePageLayoutInfo,
} from './renderUtils';
import { clearUrlParams, setUrlParams, toUrlParams, updateWindowLocation } from './uri';

/**
Expand Down

0 comments on commit cdc7116

Please sign in to comment.