fix composer issue and more
This commit is contained in:
parent
af0c0c0afe
commit
2c983f8cee
7 changed files with 54 additions and 29 deletions
|
@ -18,8 +18,12 @@ const assert = require('assert');
|
|||
|
||||
module.exports = async function sendMessage(session, message) {
|
||||
session.log.step(`writes "${message}" in room`);
|
||||
const composer = await session.waitAndQuery('.mx_MessageComposer');
|
||||
// this selector needs to be the element that has contenteditable=true,
|
||||
// not any if its parents, otherwise it behaves flaky at best.
|
||||
const composer = await session.waitAndQuery('.mx_MessageComposer_editor');
|
||||
await composer.type(message);
|
||||
const text = await session.innerText(composer);
|
||||
assert.equal(text.trim(), message.trim());
|
||||
await composer.press("Enter");
|
||||
session.log.done();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue