From 653a577abb404dfcb660d318c50b731901993546 Mon Sep 17 00:00:00 2001 From: Dinesh Date: Sun, 30 Aug 2020 07:48:11 +0000 Subject: [PATCH] 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. --- frontend_tests/puppeteer_lib/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend_tests/puppeteer_lib/common.js b/frontend_tests/puppeteer_lib/common.js index f9fff240a7..7ed2f5c351 100644 --- a/frontend_tests/puppeteer_lib/common.js +++ b/frontend_tests/puppeteer_lib/common.js @@ -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