Merge pull request #16 from matrix-org/bwindels/lltests

Test timeline messages have correct display name with lazy loading
This commit is contained in:
Bruno Windels 2018-09-14 14:49:32 +02:00 committed by GitHub
commit 5e8a3db985
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 597 additions and 69 deletions

View file

@ -17,6 +17,7 @@ limitations under the License.
const assert = require('assert');
const RiotSession = require('./src/session');
const scenario = require('./src/scenario');
const RestSessionCreator = require('./src/rest/creator');
const program = require('commander');
program
@ -27,6 +28,8 @@ program
.option('--dev-tools', "open chrome devtools in browser window", false)
.parse(process.argv);
const hsUrl = 'http://localhost:5005';
async function runTests() {
let sessions = [];
console.log("running tests ...");
@ -41,15 +44,21 @@ async function runTests() {
options.executablePath = path;
}
const restCreator = new RestSessionCreator(
'synapse/installations/consent',
hsUrl,
__dirname
);
async function createSession(username) {
const session = await RiotSession.create(username, options, program.riotUrl);
const session = await RiotSession.create(username, options, program.riotUrl, hsUrl);
sessions.push(session);
return session;
}
let failure = false;
try {
await scenario(createSession);
await scenario(createSession, restCreator);
} catch(err) {
failure = true;
console.log('failure: ', err);