@commandbar/foobar
Usage
npm install @commandbar/foobar
or
yarn add @commandbar/foobar
First initialize CommandBar and then boot it up!
// App.js
import { init as initCommandBar } from '@commandbar/foobar';
initCommandBar('MY_ORG_ID');
// Identify user...
const userID = ...
window.CommandBar.boot(userID);
Run Tests as in CI
Tests in CI run in a linux container, to run these locally run:
yarn playwright:linux
After this, you'll have a full linux environment that can be used to run CI-like tests locally with yarn playwright test
for example.
Regenerate Screenshots
To regenerate the screenshots for local runs, you just need to run the commands with -u
at the end, like yarn test-storybook -u
or yarn playwright test -u
.
To regenerate screenshots for CI, you need to have docker
installed. After this, you're able to recreate the screenshots:
Component Tests
yarn test-storybook:regenerate
Integration Tests
yarn playwright:regenerate
Customer Tests
yarn playwright:e2e:regenerate
Bear in mind that the commands above may break your node_modules
installation, because they're mounting it in a linux container. Running yarn
after the screenshots have been updated will sort it out.