Fix end to end tests for DM creation
This commit is contained in:
parent
c1c3ac20cd
commit
db646d5987
3 changed files with 81 additions and 72 deletions
|
@ -21,15 +21,7 @@ async function openRoomDirectory(session) {
|
|||
}
|
||||
|
||||
async function findSublist(session, name) {
|
||||
const sublists = await session.queryAll('.mx_RoomSublist');
|
||||
for (const sublist of sublists) {
|
||||
const header = await sublist.$('.mx_RoomSublist_headerText');
|
||||
const headerText = await session.innerText(header);
|
||||
if (headerText.toLowerCase().includes(name.toLowerCase())) {
|
||||
return sublist;
|
||||
}
|
||||
}
|
||||
throw new Error(`could not find room list section that contains '${name}' in header`);
|
||||
return await session.query(`.mx_RoomSublist[aria-label="${name}" i]`);
|
||||
}
|
||||
|
||||
async function createRoom(session, roomName, encrypted=false) {
|
||||
|
|
|
@ -32,6 +32,7 @@ module.exports = async function signup(session, username, password, homeserver)
|
|||
await nextButton.click();
|
||||
}
|
||||
//fill out form
|
||||
await session.delay(100);
|
||||
const usernameField = await session.query("#mx_RegistrationForm_username");
|
||||
const passwordField = await session.query("#mx_RegistrationForm_password");
|
||||
const passwordRepeatField = await session.query("#mx_RegistrationForm_passwordConfirm");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue