From b2a0db11c81a47c45d2617b64fef650a830b53f7 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 28 Feb 2011 10:12:47 +1000 Subject: Fix test instability. Allow the asynchronous view changes to complete before testing section positions. Change-Id: I09c7592205b6e3c55807ec1c5aa4b09f9cd8b92c --- .../auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index e8b6028..cceeb63 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -1106,6 +1106,8 @@ void tst_QDeclarativeListView::sectionsDelegate() model.modifyItem(11, "Two", "aaa"); QTest::qWait(100); canvas->rootObject()->setProperty("sectionProperty", "name"); + // ensure view has settled. + QTRY_COMPARE(findItems(contentItem, "sect_Four").count(), 1); for (int i = 0; i < 4; ++i) { QDeclarativeItem *item = findItem(contentItem, "sect_" + model.name(i*3)); -- cgit v0.12