aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/drawer/tst_drawer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/drawer/tst_drawer.cpp')
-rw-r--r--tests/auto/drawer/tst_drawer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/drawer/tst_drawer.cpp b/tests/auto/drawer/tst_drawer.cpp
index 19a66326..383dedff 100644
--- a/tests/auto/drawer/tst_drawer.cpp
+++ b/tests/auto/drawer/tst_drawer.cpp
@@ -402,6 +402,9 @@ void tst_Drawer::header()
QVERIFY(drawer);
QQuickItem *popupItem = drawer->popupItem();
+ QQuickButton *button = window->property("button").value<QQuickButton*>();
+ QVERIFY(button);
+
drawer->open();
QVERIFY(drawer->isVisible());
@@ -413,6 +416,12 @@ void tst_Drawer::header()
QCOMPARE(drawer->parentItem(), content);
QCOMPARE(drawer->height(), content->height());
QCOMPARE(popupItem->height(), content->height());
+
+ // must be possible to interact with the header when the drawer is below the header
+ QSignalSpy clickSpy(button, SIGNAL(clicked()));
+ QVERIFY(clickSpy.isValid());
+ QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier, QPoint(button->x() + button->width() / 2, button->y() + button->height() / 2));
+ QCOMPARE(clickSpy.count(), 1);
}
void tst_Drawer::hover_data()