fix joining a room through the room directory
This commit is contained in:
parent
a27b92a49a
commit
fe6a273ba9
3 changed files with 13 additions and 9 deletions
|
@ -15,14 +15,12 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
const assert = require('assert');
|
||||
const {openRoomDirectory} = require('./create-room');
|
||||
|
||||
module.exports = async function join(session, roomName) {
|
||||
session.log.step(`joins room "${roomName}"`);
|
||||
//TODO: brittle selector
|
||||
const directoryButton = await session.waitAndQuery('.mx_RoleButton[aria-label="Room directory"]');
|
||||
await directoryButton.click();
|
||||
|
||||
const roomInput = await session.waitAndQuery('.mx_DirectorySearchBox_input');
|
||||
await openRoomDirectory(session);
|
||||
const roomInput = await session.waitAndQuery('.mx_DirectorySearchBox input');
|
||||
await session.replaceInputText(roomInput, roomName);
|
||||
|
||||
const firstRoomLabel = await session.waitAndQuery('.mx_RoomDirectory_table .mx_RoomDirectory_name:first-child', 1000);
|
||||
|
@ -33,4 +31,4 @@ module.exports = async function join(session, roomName) {
|
|||
|
||||
await session.waitAndQuery('.mx_MessageComposer');
|
||||
session.log.done();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue