1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Create unencrypted rooms by default in e2e-tests

Otherwise the lazy loading test will try to join the room after the encrypted messages have already been sent, making them invisible. 

See https://github.com/vector-im/riot-web/issues/13226#issuecomment-614928362
This commit is contained in:
Travis Ralston
2020-04-16 16:27:43 -06:00
parent 6d46ef548e
commit a5f5f759cb
3 changed files with 17 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ async function openRoomDirectory(session) {
await roomDirectoryButton.click();
}
async function createRoom(session, roomName) {
async function createRoom(session, roomName, encrypted=false) {
session.log.step(`creates room "${roomName}"`);
const roomListHeaders = await session.queryAll('.mx_RoomSubList_labelContainer');
@@ -33,10 +33,14 @@ async function createRoom(session, roomName) {
const addRoomButton = await roomsHeader.$(".mx_RoomSubList_addRoom");
await addRoomButton.click();
const roomNameInput = await session.query('.mx_CreateRoomDialog_name input');
await session.replaceInputText(roomNameInput, roomName);
if (!encrypted) {
const encryptionToggle = await session.query('.mx_CreateRoomDialog_e2eSwitch .mx_ToggleSwitch');
await encryptionToggle.click();
}
const createButton = await session.query('.mx_Dialog_primary');
await createButton.click();