##// END OF EJS Templates
autotests: try to fix bar hover failures in bamboo
Jani Honkonen -
r1466:730672220f94
parent child
Show More
@@ -23,6 +23,7
23 23 #include <qbarset.h>
24 24 #include <qchartview.h>
25 25 #include <qchart.h>
26 #include "tst_definitions.h"
26 27
27 28 QTCOMMERCIALCHART_USE_NAMESPACE
28 29
@@ -437,14 +438,13 void tst_QBarSeries::mousehovered()
437 438 //=======================================================================
438 439 // move mouse to left border
439 440 QTest::mouseMove(view.viewport(), QPoint(0, 142));
440
441 QVERIFY(seriesSpy.count() == 0);
441 QCoreApplication::processEvents(QEventLoop::AllEvents, 10000);
442 TRY_COMPARE(seriesSpy.count(), 0);
442 443
443 444 //=======================================================================
444 445 // move mouse on top of set1
445 446 QTest::mouseMove(view.viewport(), QPoint(102,142));
446
447 QVERIFY(seriesSpy.count() == 1);
447 TRY_COMPARE(seriesSpy.count(), 1);
448 448
449 449 QList<QVariant> seriesSpyArg = seriesSpy.takeFirst();
450 450 QCOMPARE(qvariant_cast<QBarSet*>(seriesSpyArg.at(0)), set1);
@@ -454,8 +454,7 void tst_QBarSeries::mousehovered()
454 454 //=======================================================================
455 455 // move mouse from top of set1 to top of set2
456 456 QTest::mouseMove(view.viewport(), QPoint(127,142));
457
458 QVERIFY(seriesSpy.count() == 2);
457 TRY_COMPARE(seriesSpy.count(), 2);
459 458
460 459 // should leave set1
461 460 seriesSpyArg = seriesSpy.takeFirst();
@@ -472,7 +471,7 void tst_QBarSeries::mousehovered()
472 471 //=======================================================================
473 472 // move mouse from top of set2 to background
474 473 QTest::mouseMove(view.viewport(), QPoint(127,0));
475 QVERIFY(seriesSpy.count() == 1);
474 TRY_COMPARE(seriesSpy.count(), 1);
476 475
477 476 // should leave set2
478 477 seriesSpyArg = seriesSpy.takeFirst();
@@ -25,6 +25,7
25 25 #include <qchart.h>
26 26 #include <QBarModelMapper>
27 27 #include <QStandardItemModel>
28 #include "tst_definitions.h"
28 29
29 30 QTCOMMERCIALCHART_USE_NAMESPACE
30 31
@@ -224,17 +225,14 void tst_QGroupedBarSeries::mousehovered()
224 225 // move mouse to left border
225 226 qDebug() << "move mouse to left border";
226 227 QTest::mouseMove(view.viewport(), QPoint(0, 143));
227 QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
228
229 QVERIFY(seriesSpy.count() == 0);
228 QCoreApplication::processEvents(QEventLoop::AllEvents, 10000);
229 TRY_COMPARE(seriesSpy.count(), 0);
230 230
231 231 //=======================================================================
232 232 // move mouse on top of set1
233 233 qDebug() << "move mouse on top of set1";
234 234 QTest::mouseMove(view.viewport(), QPoint(95,143));
235 QCoreApplication::processEvents(QEventLoop::AllEvents, 10000);
236
237 QVERIFY(seriesSpy.count() == 1);
235 TRY_COMPARE(seriesSpy.count(), 1);
238 236
239 237 QList<QVariant> seriesSpyArg = seriesSpy.takeFirst();
240 238 QCOMPARE(qvariant_cast<QBarSet*>(seriesSpyArg.at(0)), set1);
@@ -245,9 +243,7 void tst_QGroupedBarSeries::mousehovered()
245 243 // move mouse from top of set1 to top of set2
246 244 qDebug() << "move mouse from top of set1 to top of set2";
247 245 QTest::mouseMove(view.viewport(), QPoint(118,143));
248 QCoreApplication::processEvents(QEventLoop::AllEvents, 10000);
249
250 QVERIFY(seriesSpy.count() == 2);
246 TRY_COMPARE(seriesSpy.count(), 2);
251 247
252 248 // should leave set1
253 249 seriesSpyArg = seriesSpy.takeFirst();
@@ -266,9 +262,7 void tst_QGroupedBarSeries::mousehovered()
266 262 qDebug() << "move mouse from top of set2 to background";
267 263
268 264 QTest::mouseMove(view.viewport(), QPoint(118,0));
269 QCoreApplication::processEvents(QEventLoop::AllEvents, 10000);
270
271 QVERIFY(seriesSpy.count() == 1);
265 TRY_COMPARE(seriesSpy.count(), 1);
272 266
273 267 // should leave set2
274 268 seriesSpyArg = seriesSpy.takeFirst();
@@ -23,6 +23,7
23 23 #include <qbarset.h>
24 24 #include <qchartview.h>
25 25 #include <qchart.h>
26 #include "tst_definitions.h"
26 27
27 28 QTCOMMERCIALCHART_USE_NAMESPACE
28 29
@@ -221,14 +222,13 void tst_QPercentBarSeries::mousehovered()
221 222 //=======================================================================
222 223 // move mouse to left border
223 224 QTest::mouseMove(view.viewport(), QPoint(0, 190));
224
225 QVERIFY(seriesSpy.count() == 0);
225 QCoreApplication::processEvents(QEventLoop::AllEvents, 10000);
226 TRY_COMPARE(seriesSpy.count(), 0);
226 227
227 228 //=======================================================================
228 229 // move mouse on top of set1
229 230 QTest::mouseMove(view.viewport(), QPoint(106,190));
230
231 QVERIFY(seriesSpy.count() == 1);
231 TRY_COMPARE(seriesSpy.count(), 1);
232 232
233 233 QList<QVariant> seriesSpyArg = seriesSpy.takeFirst();
234 234 QCOMPARE(qvariant_cast<QBarSet*>(seriesSpyArg.at(0)), set1);
@@ -238,8 +238,7 void tst_QPercentBarSeries::mousehovered()
238 238 //=======================================================================
239 239 // move mouse from top of set1 to top of set2
240 240 QTest::mouseMove(view.viewport(), QPoint(106,95));
241
242 QVERIFY(seriesSpy.count() == 2);
241 TRY_COMPARE(seriesSpy.count(), 2);
243 242
244 243 // should leave set1
245 244 seriesSpyArg = seriesSpy.takeFirst();
@@ -256,8 +255,7 void tst_QPercentBarSeries::mousehovered()
256 255 //=======================================================================
257 256 // move mouse from top of set2 to background
258 257 QTest::mouseMove(view.viewport(), QPoint(106,0));
259
260 QVERIFY(seriesSpy.count() == 1);
258 TRY_COMPARE(seriesSpy.count(), 1);
261 259
262 260 // should leave set2
263 261 seriesSpyArg = seriesSpy.takeFirst();
@@ -23,6 +23,7
23 23 #include <qbarset.h>
24 24 #include <qchartview.h>
25 25 #include <qchart.h>
26 #include "tst_definitions.h"
26 27
27 28 QTCOMMERCIALCHART_USE_NAMESPACE
28 29
@@ -221,14 +222,13 void tst_QStackedBarSeries::mousehovered()
221 222 //=======================================================================
222 223 // move mouse to left border
223 224 QTest::mouseMove(view.viewport(), QPoint(0, 190));
224
225 QVERIFY(seriesSpy.count() == 0);
225 QCoreApplication::processEvents(QEventLoop::AllEvents, 10000);
226 TRY_COMPARE(seriesSpy.count(), 0);
226 227
227 228 //=======================================================================
228 229 // move mouse on top of set1
229 230 QTest::mouseMove(view.viewport(), QPoint(106,190));
230
231 QVERIFY(seriesSpy.count() == 1);
231 TRY_COMPARE(seriesSpy.count(), 1);
232 232
233 233 QList<QVariant> seriesSpyArg = seriesSpy.takeFirst();
234 234 QCOMPARE(qvariant_cast<QBarSet*>(seriesSpyArg.at(0)), set1);
@@ -238,8 +238,7 void tst_QStackedBarSeries::mousehovered()
238 238 //=======================================================================
239 239 // move mouse from top of set1 to top of set2
240 240 QTest::mouseMove(view.viewport(), QPoint(106,95));
241
242 QVERIFY(seriesSpy.count() == 2);
241 TRY_COMPARE(seriesSpy.count(), 2);
243 242
244 243 // should leave set1
245 244 seriesSpyArg = seriesSpy.takeFirst();
@@ -256,8 +255,7 void tst_QStackedBarSeries::mousehovered()
256 255 //=======================================================================
257 256 // move mouse from top of set2 to background
258 257 QTest::mouseMove(view.viewport(), QPoint(106,0));
259
260 QVERIFY(seriesSpy.count() == 1);
258 TRY_COMPARE(seriesSpy.count(), 1);
261 259
262 260 // should leave set2
263 261 seriesSpyArg = seriesSpy.takeFirst();
General Comments 0
You need to be logged in to leave comments. Login now