Commit 78d00f6d authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[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.
parent 1b1831a5
......@@ -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()
......
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