Tests: stabilize tst_embeddedMainWindow

Going 50px into the window was too short and didn't reach the embedded
window to show the indicators.

Also, it's the inner indicator we want, the other isn't visible as the
window is single frame
This commit is contained in:
Sergio Martins
2020-05-25 20:11:01 +01:00
parent d2ca14bf99
commit 944138273f
2 changed files with 3 additions and 2 deletions

View File

@@ -2772,7 +2772,8 @@ void TestDocks::tst_embeddedMainWindow()
dock1->setFloating(true);
auto dropArea = window->mainWindow->dropArea();
auto fw = dock1->floatingWindow();
dragFloatingWindowTo(fw, dropArea, DropIndicatorOverlayInterface::DropLocation_OutterLeft);
dragFloatingWindowTo(fw, dropArea, DropIndicatorOverlayInterface::DropLocation_Left);
auto layout = dropArea->multiSplitterLayout();
QVERIFY(Testing::waitForDeleted(fw));

View File

@@ -287,7 +287,7 @@ void KDDockWidgets::Tests::dragFloatingWindowTo(FloatingWindow *fw, DropArea *ta
auto draggable = draggableFor(fw);
// First we drag over it, so the drop indicators appear:
drag(draggable, draggable->mapToGlobal(QPoint(10, 10)), target->window()->mapToGlobal(QPoint(50, 50)), ButtonAction_Press);
drag(draggable, draggable->mapToGlobal(QPoint(10, 10)), target->window()->mapToGlobal(target->window()->rect().center()), ButtonAction_Press);
// Now we drag over the drop indicator and only then release mouse:
DropIndicatorOverlayInterface *dropIndicatorOverlay = target->dropIndicatorOverlay();