mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
fix writing in composer
This commit is contained in:
parent
fe6a273ba9
commit
5598214cd2
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,9 @@ module.exports = async function sendMessage(session, message) {
|
|||
// 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');
|
||||
// sometimes the focus that type() does internally doesn't seem to work
|
||||
// and calling click before seems to fix it 🤷
|
||||
await composer.click();
|
||||
await composer.type(message);
|
||||
const text = await session.innerText(composer);
|
||||
assert.equal(text.trim(), message.trim());
|
||||
|
|
Loading…
Reference in a new issue