@@ -96,7 +96,8 @@ The package contains three types of tests:
9696
9797- ** Build-tool tests** test the build-tools code in a NodeJS context.
9898- ** Unit tests** emulate a browser environment using JSDOM.
99- - ** Integration tests** test against real browser behavior on Chrome.
99+ - ** Integration tests** test against real browser behavior on Chrome, with motion disabled.
100+ - ** Motion tests** run a specific set of tests on Chrome, with motion enabled.
100101
101102#### Run all tests:
102103
@@ -128,6 +129,21 @@ npm start
128129npm run test:integ
129130```
130131
132+ #### Run motion tests:
133+
134+ As in integration tests, make sure you have ChromeDriver installed and start the dev server:
135+
136+ ```
137+ npm i -g chromedriver
138+ npm start
139+ ```
140+
141+ Then, run the motion tests in a separate terminal:
142+
143+ ```
144+ npm test:motion
145+ ```
146+
131147#### Run a single test suite
132148
133149To run a single test suite, you can call Jest directly using the appropriate config:
@@ -139,6 +155,9 @@ npx jest -c jest.unit.config.js src/button/__tests__/button.test.tsx
139155# Run all input integration tests
140156npx jest -c jest.integ.config.js src/input
141157
158+ # Run motion tests for the flashbar component
159+ npx jest -c jest.motion.config.js src/flashbar
160+
142161# Test all stylelint rules
143162npx jest -c jest.build-tools.config.js build-tools/stylelint
144163```
@@ -202,6 +221,7 @@ After the test is done, you can find a report in `backstop/html_report/index.htm
202221│ ├── <component-dir>
203222│ │ ├── __tests__ - jest unit tests
204223│ │ ├── __integ__ - jest integration tests
224+ │ │ ├── __motion__ - jest motion tests
205225│ │ ├── index.tsx - main component file (imports other files and styles)
206226│ │ └── styles.scss - main SCSS file
207227| │
0 commit comments