puppeteer: Wait till visible: true in check_messages_sent.

The next adds a few tests which heavily rely on
check_messages_sent. There were some weird errors,
this fixed those. I think the errors were due to
us navigating multiple times and this function
not waiting for the messages to become visible.
This commit is contained in:
Dinesh
2020-08-30 07:48:11 +00:00
committed by Tim Abbott
parent 28d65b391c
commit 653a577abb

View File

@@ -390,7 +390,7 @@ class CommonUtils {
// The method will only check that all the messages in the
// messages array passed exist in the order they are passed.
async check_messages_sent(page, table, messages) {
await page.waitForSelector("#" + table);
await page.waitForSelector("#" + table, {visible: true});
const rendered_messages = await this.get_rendered_messages(page, table);
// We only check the last n messages because if we run