Commit 245eb822 authored by Xaver Hugl's avatar Xaver Hugl Committed by Vlad Zahorodnii
Browse files

autotests/xdgshellwindow: remove timeout for outputEnteredSpy

The timeout makes the test fail wrongly sometimes and isn't needed. Instead
assume the window always gets placed on the first output
parent ba079997
Pipeline #225713 passed with stage
in 14 minutes and 14 seconds
......@@ -303,20 +303,16 @@ void TestXdgShellWindow::testWindowOutputs()
QSignalSpy outputLeftSpy(surface.get(), &KWayland::Client::Surface::outputLeft);
auto window = Test::renderAndWaitForShown(surface.get(), size, Qt::blue);
// move to be in the first screen
window->moveResize(QRect(QPoint(100, 100), size));
// we don't don't know where the compositor first placed this window,
// this might fire, it might not
// assumption: window is initially placed on first screen
QCOMPARE(outputEnteredSpy.count(), 1);
QCOMPARE(surface->outputs().count(), 1);
QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(0, 0));
// move to overlapping both first and second screen
window->moveResize(QRect(QPoint(1250, 100), size));
QCOMPARE(outputEnteredSpy.count(), 1);
QCOMPARE(outputEnteredSpy.count(), 2);
QCOMPARE(outputLeftSpy.count(), 0);
QCOMPARE(surface->outputs().count(), 2);
QVERIFY(surface->outputs()[0] != surface->outputs()[1]);
......@@ -324,7 +320,7 @@ void TestXdgShellWindow::testWindowOutputs()
// move entirely into second screen
window->moveResize(QRect(QPoint(1400, 100), size));
QCOMPARE(outputEnteredSpy.count(), 1);
QCOMPARE(outputEnteredSpy.count(), 2);
QCOMPARE(outputLeftSpy.count(), 1);
QCOMPARE(surface->outputs().count(), 1);
QCOMPARE(surface->outputs().first()->globalPosition(), QPoint(1280, 0));
Supports Markdown
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