unit-tests.trust-online.js
v0.0.0
Published
UnitTests.TrustOnline.JS
Downloads
5
Readme
In order to run end to end tests locally:
- Puppeteer needs to be installed globally using following command: npm install -g puppeteer
- Add testhelperws application in IIS Name: testhelperws PhysicalPath: C:\Development\TrustOnline\TrustOnline\UnitTests.TrustOnline.HelperWS\bin\publish
- Add App pool with properties: .Net CLR Version: No Managed Code Pipeline mode: Integrated
- Then in the root folder run after building TrustOnline, TrustOnline.Web.Facility, TrustOnline.Web.Intake and UnitTests.TrustOnline.HelperWS projects: npm run test-e2e
Configuration
We have added the following environment variable to allow us to control puppeteer behavior.
- PPTR_PRODUCT: The browser to use - 'chrome' (default) or 'firefox'. Assumes agent is already configured.
- PPTR_NONHEADLESS_MODE: Run puppeteer in full mode (non-headless) when set to 'true'. Defaults to false for headless mode.
- PPTR_SLOW_MO: Slows down puppeteer by this value in milliseconds. Defaults to 0.
- PPTR_BROWSER_LAUNCH_TIMEOUT: Milliseconds puppeteer will wait for the browser to launch. Default is 30000 (matches puppeteer default).
- PPTR_PAGE_NAV_TIMEOUT: Timeout value, in milliseconds, passed to page.setDefaultNavigationTimeout. Default is 60000 (matches puppeteer default).
Run Unit Tests locally
- (one-time setup)
npm install -g jshint
cd UnitTests.TrustOnline.JS
npm install
npm run test-auto