From cdc71169e0063715dfdad633c95cfef1ddb35bb0 Mon Sep 17 00:00:00 2001 From: Cocoa Date: Wed, 8 May 2024 17:12:47 -0400 Subject: [PATCH] Formatting --- CONTRIBUTING.md | 4 +++- src/utils/formUtils.js | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9999728..d1b197d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. \ No newline at end of file +4. Generate new snapshots by running `npm run generate-snapshots` - this will clear existing snapshots and generate new ones for all files. diff --git a/src/utils/formUtils.js b/src/utils/formUtils.js index 53f4007..fcf9b6f 100644 --- a/src/utils/formUtils.js +++ b/src/utils/formUtils.js @@ -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'; /**