0.0.0 • Published 8 months ago
unit-tests.trust-online.js v0.0.0
In order to run end to end tests locally: 1. Puppeteer needs to be installed globally using following command: npm install -g puppeteer 2. Add testhelperws application in IIS Name: testhelperws PhysicalPath: C:\Development\TrustOnline\TrustOnline\UnitTests.TrustOnline.HelperWS\bin\publish 3. Add App pool with properties: .Net CLR Version: No Managed Code Pipeline mode: Integrated 4. 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
0.0.0
8 months ago