Commit e6109ab9 authored by Sebastian Kügler's avatar Sebastian Kügler

kwaylandconfig: autotest scale changed signal arrival

parent 057cefb9
......@@ -214,8 +214,10 @@ void TestKWaylandConfig::testScaleChange()
KScreen::ConfigMonitor *monitor = KScreen::ConfigMonitor::instance();
monitor->addConfig(config);
QSignalSpy configSpy(monitor, &KScreen::ConfigMonitor::configurationChanged);
QSignalSpy configSpy2(monitor, &KScreen::ConfigMonitor::configurationChanged);
auto output2 = config2->outputs()[2]; // is this id stable enough?
QSignalSpy outputSpy(output2.data(), &KScreen::Output::scaleChanged);
QCOMPARE(output2->scale(), 1.0);
auto output = config->outputs()[2]; // is this id stable enough?
......@@ -230,6 +232,8 @@ void TestKWaylandConfig::testScaleChange()
QCOMPARE(serverSpy.count(), 1);
QCOMPARE(configSpy.count(), 1);
QCOMPARE(outputSpy.count(), 1);
QCOMPARE(configSpy2.count(), 1);
QCOMPARE(output2->scale(), 2.0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment