wait for the message to be sent

This commit is contained in:
Bruno Windels 2018-09-11 18:28:50 +02:00
parent 40577109c2
commit 4a4b1f65aa
6 changed files with 37 additions and 40 deletions

View file

@ -25,5 +25,7 @@ module.exports = async function sendMessage(session, message) {
const text = await session.innerText(composer);
assert.equal(text.trim(), message.trim());
await composer.press("Enter");
// wait for the message to appear sent
await session.waitAndQuery(".mx_EventTile_last:not(.mx_EventTile_sending)");
session.log.done();
}
}