[autotests] Fix the plasma surface test

Currently the plasma surface test fails because the window placement
policy for OSDs had been changed and the test wasn't adjusted.
master
Vlad Zahorodnii 4 years ago
parent 1b1831a5ac
commit 78d00f6d69

@ -222,7 +222,7 @@ void PlasmaSurfaceTest::testOSDPlacement()
QVERIFY(c);
QCOMPARE(c->windowType(), NET::OnScreenDisplay);
QVERIFY(c->isOnScreenDisplay());
QCOMPARE(c->frameGeometry(), QRect(590, 649, 100, 50));
QCOMPARE(c->frameGeometry(), QRect(1280 / 2 - 100 / 2, 2 * 1024 / 3 - 50 / 2, 100, 50));
// change the screen size
QSignalSpy screensChangedSpy(screens(), &Screens::changed);
@ -238,14 +238,14 @@ void PlasmaSurfaceTest::testOSDPlacement()
QCOMPARE(screens()->geometry(0), geometries.at(0));
QCOMPARE(screens()->geometry(1), geometries.at(1));
QCOMPARE(c->frameGeometry(), QRect(590, 649, 100, 50));
QCOMPARE(c->frameGeometry(), QRect(1280 / 2 - 100 / 2, 2 * 1024 / 3 - 50 / 2, 100, 50));
// change size of window
QSignalSpy frameGeometryChangedSpy(c, &AbstractClient::frameGeometryChanged);
QVERIFY(frameGeometryChangedSpy.isValid());
Test::render(surface.data(), QSize(200, 100), Qt::red);
QVERIFY(frameGeometryChangedSpy.wait());
QCOMPARE(c->frameGeometry(), QRect(540, 616, 200, 100));
QCOMPARE(c->frameGeometry(), QRect(1280 / 2 - 200 / 2, 2 * 1024 / 3 - 100 / 2, 200, 100));
}
void PlasmaSurfaceTest::testOSDPlacementManualPosition_data()

Loading…
Cancel
Save