Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(readme): script for running interaction test correction #309

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 45 additions & 14 deletions packages/storybook/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,68 @@
# Accord Project Web Components Storybook
# Accord Project Web Components

[![Build Status](https://travis-ci.org/accordproject/web-components.svg?branch=master)](https://travis-ci.org/accordproject/web-components)
[![join slack](https://img.shields.io/badge/Accord%20Project-Join%20Slack-blue)](https://accord-project-slack-signup.herokuapp.com/)

This repository contains a [React Storybook](https://storybook.js.org), and contains all the stories for all the sub-packages to discover the components and their properties.
This repository contains a library of user interface components that can be used to create web-applications based on Accord Project technology. The components use the [React](https://reactjs.org) web application framework.

### View Storybook
Use the interactive [Storybook][storybook] to discover the components and their properties.

## View the Live Demo or Run Locally

### Visit the [Storybook Demo][storybook]

### Sample Project

To use these components refer to: https://github.com/accordproject/web-components-starter
If you are not already using semantic-ui-react in your project, be sure to include `import 'semantic-ui-css/semantic.min.css'` in the entry point of your react app.

### Run Locally

```sh
npm install -g lerna
lerna clean && lerna bootstrap && lerna run build
cd packages/storybook
npm run storybook
```
### User Interaction Testing (e2e tests)

### Develop inside Storybook
Install cypress app on your local system:
https://download.cypress.io/desktop

While Storybook is running, if you make a change in a package that you want to see reflected in the demo, in a new terminal:
Check if the system requirements are matched:
https://docs.cypress.io/guides/getting-started/installing-cypress.html#System-requirements

Start the storybook
```sh
cd packages/<PACKAGE>
npm run build
cd packages/storybook
npm run storybook
```

Storybook will reload with the applied changes.

### Run tests

Execute the following script to start e2e tesing
```sh
npm run test:e2e
```
If you are writing the tests and want to see the tests in a browser, then do the following
```sh
cd packages/storybook
npm run test
npx cypress open
```

## Repository Structure

This repository is a monorepo, built using [lerna](https://lerna.js.org). Each package is published as an independent npm module.

- [Markdown Editor](packages/ui-markdown-editor): A WYSIWYG editor based on [Slate](https://www.slatejs.org) for markdown that conforms to the [CommonMark](https://spec.commonmark.org) specification.
- [Contract Editor](packages/ui-contract-editor): An editor based on our [Markdown Editor](packages/ui-markdown-editor) for handling smart legal contracts.
- [Concerto UI](packages/ui-concerto): React components for models written in the [Concerto Modeling Language](https://github.com/accordproject/concerto).
- [Web Components](packages/ui-components): Tools for implementing React components in your contract editing studio.
- [Storybook](packages/storybook): A [React Storybook](https://storybook.js.org), and contains all the stories for all the sub-packages.

Netlify is used to automatically publish the static site generated by Storybook.

---

<a href="https://www.accordproject.org/">
<img src="../../assets/APLogo.png" alt="Accord Project Logo" width="400" />
<img src="assets/APLogo.png" alt="Accord Project Logo" width="400" />
</a>

Accord Project is an open source, non-profit, initiative working to transform contract management and contract automation by digitizing contracts. Accord Project operates under the umbrella of the [Linux Foundation][linuxfound]. The technical charter for the Accord Project can be found [here][charter].
Expand Down Expand Up @@ -76,6 +105,8 @@ Copyright 2018-2019 Clause, Inc. All trademarks are the property of their respec
[apdoc]: https://docs.accordproject.org/
[apslack]: https://accord-project-slack-signup.herokuapp.com

[storybook]: https://ap-web-components.netlify.app/

[contributing]: https://github.com/accordproject/web-components/blob/master/CONTRIBUTING.md
[developers]: https://github.com/accordproject/web-components/blob/master/DEVELOPERS.md

Expand Down