Skip to content

Development setup

Andrew Huth edited this page Jan 12, 2021 · 10 revisions

To work on this project, you'll need to do some setup.

Requirements

Ensure you have the following installed

Clone the project

Clone the repo by navigating to the location on your system where you want the project to live, and running

git clone git@github.com:chanzuckerberg/axe-storybook-testing.git

When that's done, navigate to the project directory

cd axe-storybook-testing

Install project dependencies

Install the necessary development dependencies with

yarn install

Setup the demo app

Run

yarn demo:setup

This will install the demo app's dependencies and run yarn link in the right directories to make the demo app use the local project.

Test your setup

Make sure everything is working by running any or all of the following (each command is independent, and can be ran in any order):

  • yarn demo:storybook - Run the demo app's Storybook.
  • yarn demo - Run axe-storybook-testing on the demo app. There should be some "failures".
  • yarn all - Run linting, type checking, unit tests, and integration tests in one command.

Troubleshooting

I'm hitting an error "browserType.launch: Host system is missing dependencies"

You need to install some missing packages. Try

sudo apt-get install gconf-service libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libcairo2 \
libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 \
libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxss1 libxtst6 libappindicator1 \
libnss3 libasound2 libatk1.0-0 libc6 ca-certificates fonts-liberation lsb-release xdg-utils wget

reference

I can't load localhost:6006 when running Storybook

If you're using a dev server, make sure you have the following line in your local ~/.ssh/config:

LocalForward 6006 localhost:6006

And, you're done!

Congrats! You have a fully-functional development setup.

Clone this wiki locally