aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-08-09 16:20:22 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-08-09 16:20:22 +0200
commit36990a732eab2dc16bee89715662f6d3d8b3a0cd (patch)
treed835ba67426e12e51dc1028e8ebac9087a3d43b0 /tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
parentcb37a1d0c3fce7951f5d7f1fb4a04f90e038f01b (diff)
parentd1b72c98b4e617530bfb23c3a5b7ebc68c15c089 (diff)
Merge remote-tracking branch 'origin/dev' into wip/qt6
Diffstat (limited to 'tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp')
-rw-r--r--tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp b/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
index 0f4bb5cdcc..41850d0263 100644
--- a/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
+++ b/tests/auto/qml/qqmlpromise/tst_qqmlpromise.cpp
@@ -82,6 +82,7 @@ private slots:
void then_fulfilled_non_callable();
void then_reject_non_callable();
void then_resolve_multiple_then();
+ void promiseChain();
private:
void execute_test(QString testName);
@@ -270,6 +271,20 @@ void tst_qqmlpromise::execute_test(QString testName)
QTRY_COMPARE(object->property("wasTestSuccessful").toBool(), true);
}
+void tst_qqmlpromise::promiseChain()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFileUrl("promisechain.qml"));
+ QVERIFY(component.isReady());
+ QTest::ignoreMessage(QtDebugMsg, "1");
+ QTest::ignoreMessage(QtDebugMsg, "2");
+ QTest::ignoreMessage(QtDebugMsg, "3");
+ QScopedPointer<QObject> root(component.create());
+ QVERIFY(root);
+ QTRY_VERIFY(root->property("x") == 42);
+
+}
+
QTEST_MAIN(tst_qqmlpromise)