No description
Find a file
2019-03-29 11:25:21 +01:00
riot current tests need riot develop to set a room alias without a domain name 2018-09-25 18:01:10 +01:00
src Click the 'Accept' button as part of the signup process 2018-11-15 20:23:15 -07:00
synapse adjust synapse install script for python3 and config file changes 2019-03-29 11:25:21 +01:00
.editorconfig bring indentation in line with other front-end projects 2018-08-14 12:53:16 +02:00
.gitignore add ignore file 2018-07-09 17:08:16 +02:00
install.sh exit on error 2018-07-31 10:35:21 +02:00
package.json add rest/non-browser session, which we can create a lot more off 2018-09-11 14:40:16 +02:00
README.md add config file instructions to run with --riot-url 2018-10-08 16:58:01 +02:00
run.sh pass parameters through instead of hardcoding --travis 2018-09-19 10:56:39 +02:00
start.js disable LL tests on travis CI 2018-09-18 16:50:33 +02:00
TODO.md list of tests we want to write 2018-09-27 18:09:27 +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 the following parameters that can help running the tests locally:

  • --no-logs dont show the excessive logging show by default (meant for CI), just where the test failed.
  • --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. Make sure to set the default homeserver to
    • "default_hs_url": "http://localhost:5005", to use the e2e tests synapse (the tests use the default HS to run against atm)
    • "feature_lazyloading": "labs", currently assumes lazy loading needs to be turned on in the settings, will change soon.
  • --slow-mo run the tests a bit slower, so it's easier to follow along with --windowed.
  • --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