- (macOS only) Install Xcode Command Line Tools:
xcode-select --install
- Install GIT-LFS https://git-lfs.com/
- Install Node.js@16 (with NPM@8). We suggest using nvm or n for Node version management
- Run
npm install
To start the server: npm start
(runs the webpack dev server on http://localhost:9999)
To run tests: npm test
To lint code: npm run lint
To build production files: npm run build
By default, documentation is built using the development
environment. Use the --env.production
flag to switch it to production
. Environment has an effect on source map generation. It also affects the following parameters:
- port
- host
- hub (Hub server URI)
- clientId (Ring UI service client ID in Hub)
When we start developing a new major version, we make a branch with name develop-x.0
and make changes.
Beta builds could be published by this configuration (you need to pick branch youself!)
When version is ready, we
- Make a branch from
master
with namerelease-x.x
(current version) and put it for like LTE - Merge
develop-x.0
intomaster
and publish new version
When hotfixes needs to be delivered in old branches, one need to commit fix into that release-x.x
branch,
merge release-x.x -> master
and publish it
via this configuration.
Run the development server with npm start
before executing the commands listed below*
Ring UI uses Testplane for visual regression testing. Testplane works by taking screenshots and comparing them to existing reference images.
We use BrowserStack as a cloud Selenium grid. In order to use it on your local machine, you need to have a BrowserStack account. Credentials can be gathered on this page.
If you don't have credentials, ask project contributors how can you get them.
Set your username and access token as environment variables:
export BROWSERSTACK_NAME=yourlogin
export BROWSERSTACK_KEY=yourkey
Or prepend these variables before your commands:
BROWSERSTACK_NAME=**** BROWSERSTACK_KEY=**** npm run screenshots-test
After you make some visual changes, run npm run screenshots-test
to make sure there are no regressions.
To update the reference images for a certain component (for example, alert
):
npm run screenshots-gather -- -- --grep Components/Alert
.
It is very important for web components to be accessible for everyone. We have some accessibility tests set up.
To check current status on CI you may check teamcity configuration.
To run tests locally, run npm run a11y-audit
. Also, there is "Accessibility" tab on storybook pages,
so every component could be inspected via running storybook (npm start
) and then checking this tab.