No description
Find a file
Bruno Windels 370741fc43
Merge pull request #48 from matrix-org/bwindels/stylepreviewbar
adjust selectors for join and accept button in room preview bar
2019-04-18 11:36:16 +00:00
riot c/p error 2019-04-05 16:26:05 +02:00
src adjust selectors for join and accept button in room preview bar 2019-04-17 11:44:32 +02:00
synapse avoid ipv6, see if that makes buildkite happy 2019-04-09 14:59:06 +02:00
.editorconfig bring indentation in line with other front-end projects 2018-08-14 12:53:16 +02:00
.gitignore keep complexhttpserver installation within riot folder and gitignore leftovers 2019-04-03 16:20:26 +02:00
install.sh use yarn 2019-04-03 16:19:56 +02:00
package.json use yarn and update dependencies, commit lock file 2019-03-29 11:55:33 +01:00
README.md update readme 2019-04-16 15:39:33 +02:00
run.sh Some changes to make the testing script run on mac, too, + a multithreaded server for riot 2018-09-25 18:45:08 +01:00
start.js add flag to throttle cpu to get failures because of slow ci locally 2019-04-16 14:59:35 +02:00
TODO.md Update TODO.md 2019-04-16 15:03:12 +00:00
yarn.lock use yarn and update dependencies, commit lock file 2019-03-29 11:55:33 +01: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.

Setup

Run ./install.sh. This will:

  • install synapse, 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.
  • install riot, this fetches the master branch at the moment.
  • install dependencies (will download copy of chrome)

Running the tests

Run tests with ./run.sh.

Debug tests locally.

./run.sh will run the tests against the riot copy present in riot/riot-web served by a static python http server. You can symlink your riot-web develop copy here but that doesn't work well with webpack recompiling. You can run the test runner directly and specify parameters to get more insight into a failure or run the tests against your local webpack server.

./synapse/stop.sh && \
./synapse/start.sh && \
node start.js <parameters>

It's important to always stop and start synapse before each run of the tests to clear the in-memory sqlite database it uses, as the tests assume a blank slate.

start.js accepts these parameters (and more, see node start.js --help) that can help running the tests locally:

  • --riot-url <url> don't use the riot copy and static server provided by the tests, but use a running server like the webpack watch server to run the tests against. Make sure to have the following local config:
    • welcomeUserId disabled as the tests assume there is no riot-bot currently.
  • --slow-mo type at a human speed, useful with --windowed.
  • --throttle-cpu <factor> throttle cpu in the browser by the given factor. Useful to reproduce failures because of insufficient timeouts happening on the slower CI server.
  • --windowed run the tests in an actual browser window Try to limit interacting with the windows while the tests are running. Hovering over the window tends to fail the tests, dragging the title bar should be fine though.
  • --dev-tools open the devtools in the browser window, only applies if --windowed is set as well.

Developer Guide

Please follow the standard Matrix contributor's guide: https://github.com/matrix-org/synapse/tree/master/CONTRIBUTING.rst

Please follow the Matrix JS/React code style as per: https://github.com/matrix-org/matrix-react-sdk/blob/master/code_style.md