Revert ES6ification of end-to-end tests and add instructions for Windows

Because the tests are run directly by node, we have to use the CommonJS module syntax. We could run the thing through babel, but then we just have another babel.

Windows instructions are from experience and may not be optimized.
This commit is contained in:
Travis Ralston 2020-01-10 10:13:41 -07:00
parent 9f04f94c65
commit e66f2a6c3f
24 changed files with 103 additions and 52 deletions

View file

@ -29,7 +29,7 @@ async function openSettings(session, section) {
}
}
export async function enableLazyLoading(session) {
module.exports.enableLazyLoading = async function(session) {
session.log.step(`enables lazy loading of members in the lab settings`);
const settingsButton = await session.query('.mx_BottomLeftMenu_settings');
await settingsButton.click();
@ -39,9 +39,9 @@ export async function enableLazyLoading(session) {
const closeButton = await session.query(".mx_RoomHeader_cancelButton");
await closeButton.click();
session.log.done();
}
};
export async function getE2EDeviceFromSettings(session) {
module.exports.getE2EDeviceFromSettings = async function(session) {
session.log.step(`gets e2e device/key from settings`);
await openSettings(session, "security");
const deviceAndKey = await session.queryAll(".mx_SettingsTab_section .mx_SecurityUserSettingsTab_deviceInfo code");
@ -52,4 +52,4 @@ export async function getE2EDeviceFromSettings(session) {
await closeButton.click();
session.log.done();
return {id, key};
}
};