The web UI for chpl
Git, Node.js, npm, and gulp are required to install and test this project.
Clone the repository using git:
See installation instructions here: nodejs
Yarn: yarn
yarn install
yarn build
: Build deployable artifactsyarn html
: Run HTML Linter with rules that should all passyarn html-lint:verbose
: Run HTML Linter with rules that don't play well with AngularJS, so some errors are expected, but this can find some errors that need to be fixedyarn start
: Run a local dev server at: http://localhost:3000/ with automatic reloadingyarn start:dev
: Run a local dev server at: http://localhost:3000/ with automatic reloading, but connecting to the DEV environment for datayarn start:prod
: Run a local dev server at: http://localhost:3000/ with automatic reloading, but using the production settings for js minification / packaging / etc.yarn profile
: Generate a webpack statistics output fileyarn test
: Run the unit tests onceyarn test:auto
: Run the unit tests continuously, re-running the tests on any file changeyarn test:ahrq
: Run tests once in a fashion suitable for the deployment environmentyarn test:ci
: Run the tests once in a fashion suitable for a Continuous Integration environmentyarn e2e
: Run the end to end integration tests, as well as e2e lintingyarn e2e:lint
: Run code and syntax rulesyarn e2e:clean
: Clear out old E2E artifacts
Usable on yarn build
and yarn start
, these parameters control configuration of some properties
--env.NODE_ENV=production
or--env.NODE_ENV=development
to indicate whether to build for development or production environments. Defaults todevelopment
if not provided--env.style
to create a a style guide page at url/style.html. Defaults to "don't create" if not provided
On most Yarn commands the CSS Linter, JS Linter and HTML Linters will run. Webpack may fail to compile if any of the linters report issues, depending on the severity of the issue
By default, E2E tests will be executed against http://localhost:3000/. This URL can be configured at runtime with the parameter baseUrl
. For example: yarn e2e --baseUrl http://www.example.com/
would set all tests to run against www.example.com
If a single spec file should be tested, instead of all of them, the command yarn e2e --spec path/to/file.spec.js
will exercise only that spec file
To change the loglevel, test could be run as yarn e2e --l info
To run a suite of tests, execute yarn e2e --suite suite-name
. For example, yarn e2e --suite components
will execute only the tests on the components. See wdio.conf.js
for a list of the suites
When debugging, taking screenshots can be useful. The command browser.saveScreenshot('path/to/file.png')
will save a screenshot to a location relative to the project root
Copy e2e/config/credentialsEXAMPLE.js
to the file e2e/config/credentials.js
and set the passwords for the users in the file to be valid users