From f3fe6cbfe4597828e7ab32d0fe9e571a78b3efeb Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Wed, 3 Apr 2019 15:44:08 +0200
Subject: [PATCH] Make tst_dialogs less flaky

Wait to finish javascript execution before opening
next dialog.

Task-number: QTBUG-72113
Change-Id: I383e3fc3c405a94ddcbd74fe1cc7ab0d81c4e315
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
 tests/auto/quick/dialogs/tst_dialogs.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/auto/quick/dialogs/tst_dialogs.cpp b/tests/auto/quick/dialogs/tst_dialogs.cpp
index ecc2764fd..d4846a9d0 100644
--- a/tests/auto/quick/dialogs/tst_dialogs.cpp
+++ b/tests/auto/quick/dialogs/tst_dialogs.cpp
@@ -218,6 +218,7 @@ void tst_Dialogs::javaScriptDialogRequested()
     QCOMPARE(dialog->type(), type);
     QCOMPARE(dialog->message(), message);
     QCOMPARE(dialog->defaultText(), defaultText);
+    QTRY_VERIFY(m_listner->ready()); // make sure javascript executes no longer
 }
 
 #include "tst_dialogs.moc"
-- 
GitLab