increase timeouts so the tests dont timeout on build server

This commit is contained in:
Bruno Windels 2018-08-23 00:27:30 +02:00
parent 1e0baa823d
commit fd67ace078
8 changed files with 16 additions and 16 deletions

View file

@ -67,12 +67,12 @@ async function createE2ERoomAndTalk(alice, bob) {
const bobDevice = await getE2EDeviceFromSettings(bob);
// wait some time for the encryption warning dialog
// to appear after closing the settings
await bob.delay(500);
await bob.delay(1000);
await acceptDialog(bob, "encryption");
const aliceDevice = await getE2EDeviceFromSettings(alice);
// wait some time for the encryption warning dialog
// to appear after closing the settings
await alice.delay(500);
await alice.delay(1000);
await acceptDialog(alice, "encryption");
await verifyDeviceForUser(bob, "alice", aliceDevice);
await verifyDeviceForUser(alice, "bob", bobDevice);

View file

@ -148,7 +148,7 @@ module.exports = class RiotSession {
return this.page.$(selector);
}
waitAndQuery(selector, timeout = 500) {
waitAndQuery(selector, timeout = 5000) {
return this.page.waitForSelector(selector, {visible: true, timeout});
}
@ -156,12 +156,12 @@ module.exports = class RiotSession {
return this.page.$$(selector);
}
async waitAndQueryAll(selector, timeout = 500) {
async waitAndQueryAll(selector, timeout = 5000) {
await this.waitAndQuery(selector, timeout);
return await this.queryAll(selector);
}
waitForNewPage(timeout = 500) {
waitForNewPage(timeout = 5000) {
return new Promise((resolve, reject) => {
const timeoutHandle = setTimeout(() => {
this.browser.removeEventListener('targetcreated', callback);

View file

@ -23,5 +23,5 @@ module.exports = async function acceptTerms(session) {
const termsPage = await termsPagePromise;
const acceptButton = await termsPage.$('input[type=submit]');
await acceptButton.click();
await session.delay(500); //TODO yuck, timers
}
await session.delay(1000); //TODO yuck, timers
}

View file

@ -18,7 +18,7 @@ const assert = require('assert');
module.exports = async function invite(session, userId) {
session.log.step(`invites "${userId}" to room`);
await session.delay(200);
await session.delay(1000);
const inviteButton = await session.waitAndQuery(".mx_RightPanel_invite");
await inviteButton.click();
const inviteTextArea = await session.waitAndQuery(".mx_ChatInviteDialog textarea");
@ -27,4 +27,4 @@ module.exports = async function invite(session, userId) {
const confirmButton = await session.query(".mx_Dialog_primary");
await confirmButton.click();
session.log.done();
}
}

View file

@ -33,7 +33,7 @@ module.exports = async function receiveMessage(session, message) {
}
});
// wait a bit for the incoming event to be rendered
await session.delay(500);
await session.delay(1000);
let lastTile = await session.query(".mx_EventTile_last");
const senderElement = await lastTile.$(".mx_SenderProfile_name");
const bodyElement = await lastTile.$(".mx_EventTile_body");

View file

@ -33,7 +33,7 @@ module.exports = async function changeRoomSettings(session, settings) {
session.log.startGroup(`changes the room settings`);
/// XXX delay is needed here, possible because the header is being rerendered
/// click doesn't do anything otherwise
await session.delay(500);
await session.delay(1000);
const settingsButton = await session.query(".mx_RoomHeader .mx_AccessibleButton[title=Settings]");
await settingsButton.click();
const checks = await session.waitAndQueryAll(".mx_RoomSettings_settings input[type=checkbox]");
@ -63,7 +63,7 @@ module.exports = async function changeRoomSettings(session, settings) {
const inviteOnly = radios[0];
const publicNoGuests = radios[1];
const publicWithGuests = radios[2];
if (settings.visibility === "invite_only") {
await inviteOnly.click();
} else if (settings.visibility === "public_no_guests") {
@ -80,4 +80,4 @@ module.exports = async function changeRoomSettings(session, settings) {
await saveButton.click();
session.log.endGroup();
}
}

View file

@ -25,7 +25,7 @@ module.exports = async function acceptServerNoticesInviteAndConsent(session) {
const termsPage = await termsPagePromise;
const acceptButton = await termsPage.$('input[type=submit]');
await acceptButton.click();
await session.delay(500); //TODO yuck, timers
await session.delay(1000); //TODO yuck, timers
await termsPage.close();
session.log.done();
}
}

View file

@ -44,7 +44,7 @@ module.exports = async function signup(session, username, password, homeserver)
//wait over a second because Registration/ServerConfig have a 1000ms
//delay to internally set the homeserver url
//see Registration::render and ServerConfig::props::delayTimeMs
await session.delay(1200);
await session.delay(1500);
/// focus on the button to make sure error validation
/// has happened before checking the form is good to go
const registerButton = await session.query('.mx_Login_submit');