1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

working consent test by accepting server notices invite and clicking on link, also create room

This commit is contained in:
Bruno Windels
2018-07-20 18:51:25 +02:00
parent bc1da0565e
commit a74a753a05
6 changed files with 132 additions and 16 deletions

View File

@ -20,13 +20,16 @@ const assert = require('assert');
const signup = require('./tests/signup');
const join = require('./tests/join');
const createRoom = require('./tests/create-room');
const acceptServerNoticesInviteAndConsent = require('./tests/server-notices-consent');
const homeserver = 'http://localhost:8008';
global.riotserver = 'http://localhost:8080';
global.homeserver = 'http://localhost:8008';
global.browser = null;
async function runTests() {
global.browser = await puppeteer.launch();
global.browser = await puppeteer.launch({headless: false});
const page = await helpers.newPage();
const username = 'bruno-' + helpers.randomInt(10000);
@ -35,9 +38,14 @@ async function runTests() {
await signup(page, username, password, homeserver);
process.stdout.write('done\n');
const noticesName = "Server Notices";
process.stdout.write(`* accepting "${noticesName}" and accepting terms & conditions ...`);
await acceptServerNoticesInviteAndConsent(page, noticesName);
process.stdout.write('done\n');
const room = 'test';
process.stdout.write(`* joining room ${room} ... `);
await join(page, room, true);
process.stdout.write(`* creating room ${room} ... `);
await createRoom(page, room);
process.stdout.write('done\n');
await browser.close();