⚠️

unit-tests.trust-online.js

0.0.0 • Public • Published

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.

1. PPTR_PRODUCT: The browser to use - 'chrome' (default) or 'firefox'. Assumes agent is already configured.
2. PPTR_NONHEADLESS_MODE: Run puppeteer in full mode (non-headless) when set to 'true'. Defaults to false for headless mode.
3. PPTR_SLOW_MO: Slows down puppeteer by this value in milliseconds. Defaults to 0.
4. PPTR_BROWSER_LAUNCH_TIMEOUT: Milliseconds puppeteer will wait for the browser to launch. Default is 30000 (matches puppeteer default).
5. PPTR_PAGE_NAV_TIMEOUT: Timeout value, in milliseconds, passed to page.setDefaultNavigationTimeout. Default is 60000 (matches puppeteer default).

Run Unit Tests locally

1. (one-time setup) `npm install -g jshint`
1. `cd UnitTests.TrustOnline.JS`
1. `npm install`
1. `npm run test-auto`

Readme

Keywords

none