Test popup remapping and keep headless input tests isolated
This commit is contained in:
1 parent
d62fae9e88
commit
0d618964a7
2 files changed
+20
No files matched your search
@@ -154,6 +154,24 @@ private slots:
|
||||
QCOMPARE(activated.size(), 1);
|
||||
}
|
||||
|
||||
void remappingKeepsControlsUsable() {
|
||||
MessageNotification notification;
|
||||
QSignalSpy activated(¬ification, &MessageNotification::activated);
|
||||
notification.showMessage("42", "Alice", "First channel", {});
|
||||
notification.showMessage("dm:7", "Bob", "Second channel", {});
|
||||
QVERIFY(notification.isVisible());
|
||||
auto* closeButton = notification.findChild<QPushButton*>("notificationCloseButton");
|
||||
QVERIFY(closeButton);
|
||||
QTest::mouseClick(closeButton, Qt::LeftButton);
|
||||
QVERIFY(!notification.isVisible());
|
||||
notification.showMessage("43", "Charlie", "Third channel", {});
|
||||
QVERIFY(notification.isVisible());
|
||||
QTest::mouseClick(¬ification, Qt::LeftButton, Qt::NoModifier, QPoint(30, notification.height() - 15));
|
||||
QVERIFY(!notification.isVisible());
|
||||
QCOMPARE(activated.size(), 1);
|
||||
QCOMPARE(activated[0][0].toString(), QString("43"));
|
||||
}
|
||||
|
||||
#ifdef UTUN_TEST_ACTIVITY_DBUS
|
||||
void gnomeIdleAndStaleReplies() {
|
||||
// Разные соединения исключают прямой вызов внутри Qt, чтобы задержка действительно прошла через D-Bus.
|
||||
|
||||
Reference in new issue
Block a user