on xenial help sign in
Make the test more stable

The test was unstable because scrolling vs creation time is not always stable so at some point we were scrolling "too fast" and when deciding if the new item is out of viewport or in sometimes it went the other way. Approved by: Michael Zanetti

commit5214e16387262e944992a6ec95ecad890ec67c45 authorAlbert Astals Cid <albert.astals@canonical.com> dateTue 5 May 2015, 14:47 (11 years ago) parent425e517d8148c1
1 file changed+8−2
tests/plugins/Dash/listviewwithpageheadertest.cpp+8−2
tests/plugins/Dash/listviewwithpageheadertest.cpp+8−2
@@ -973,9 +973,15 @@ private Q_SLOTS:
973973 QCOMPARE(lvwph->contentY(), 1258.);
974974 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
975975
976− changeContentY(-1700);
977−
976+ changeContentY(-800);
977+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 5);
978+ changeContentY(-400);
979+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 8);
980+ changeContentY(-200);
981+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 10);
982+ changeContentY(-300);
978983 QTRY_COMPARE(lvwph->m_visibleItems.count(), 12);
984+
979985 QCOMPARE(lvwph->m_firstVisibleIndex, 0);
980986 verifyItem(0, -308., 75., true);
981987 verifyItem(1, -233., 75., true);