1.0.8 • Published 3 years ago
@britishlibrary/component-library v1.0.8
React Component Library
A collection of React components written for The British Library web applications.
Installation
The British Library Component Library is available as an NPM package.
To install it, run the relevant command for your package manager:
// npm
npm install @britishlibrary/fonts @britishlibrary/component-library styled-components
// yarn
yarn add @britishlibrary/fonts @britishlibrary/component-library styled-componentsNote: styled-components is a required peer dependency and is installed with the above command.
End-to-end tests
End-to-end tests run in both Chrome and Firefox using Playwright. Tests are dependent on the Storybook running with a test configuration:
yarn storybook:testPlaywright browsers and dependencies also have to be installed:
yarn test:e2e:installRun all tests
yarn test:e2eRun specific tests
yarn test:e2e <regex>Run all tests with tracing
yarn test:e2e:traceOpen the HTML test report
yarn test:e2e:show-reportChromatic
Ship UIs faster with automated workflows for Storybook
Notes
- If you have issues with storybook, remove node modules and reinstall is a good first troubleshooter, failing that add --no-manager-cache to your start-storybook command. But remove it once rebuilt.