element-web/README.md

47 lines
2 KiB
Markdown
Raw Normal View History

2018-07-05 10:56:19 +00:00
# Matrix React Web App End-to-End tests
This repository contains tests for the matrix-react-sdk web app. The tests fire up a headless chrome and simulate user interaction (end-to-end). Note that end-to-end has little to do with the end-to-end encryption matrix supports, just that we test the full stack, going from user interaction to expected DOM in the browser.
## Current tests
- test riot loads (check title)
- signup with custom homeserver
2018-07-09 16:21:05 +00:00
- join preexisting room
2018-07-05 10:56:19 +00:00
## Roadmap
- get rid of jest, as a test framework won't be helpful to have a continuous flow going from one use case to another (think: do login, create a room, invite a user, ...). a test framework usually assumes the tests are semi-indepedent.
- better error reporting (show console.log, XHR requests, partial DOM, screenshot) on error
- cleanup helper methods
2018-07-06 10:40:42 +00:00
- add more css id's/classes to riot web to make css selectors in test less brittle.
2018-07-05 10:56:19 +00:00
- avoid delay when waiting for location.hash to change
- more tests!
2018-07-09 10:41:24 +00:00
- setup installing & running riot and synapse as part of the tests.
- Run 2 synapse instances to test federation use cases.
- start synapse with clean config/database on every test run
2018-07-05 10:56:19 +00:00
- look into CI(Travis) integration
2018-07-20 17:00:38 +00:00
## It's broken! How do I see what's happening in the browser?
Look for this line:
```
puppeteer.launch();
```
Now change it to:
```
puppeteer.launch({headless: false});
```
2018-07-05 10:56:19 +00:00
## How to run
### Setup
2018-07-20 17:08:23 +00:00
- install synapse with `sh synapse/install.sh`, this fetches the master branch at the moment. If anything fails here, please refer to the synapse README to see if you're missing one of the prerequisites.
2018-07-20 17:00:38 +00:00
- install riot with `sh riot/install.sh`, this fetches the master branch at the moment.
2018-07-09 16:21:43 +00:00
- install dependencies with `npm install` (will download copy of chrome)
2018-07-05 10:56:19 +00:00
- have riot-web running on `localhost:8080`
- have a local synapse running at `localhost:8008`
### Run tests
2018-07-20 17:00:38 +00:00
Run tests with `sh run.sh`.
You should see the terminal split with on top the server output (both riot static server, and synapse), and on the bottom the tests running.