Wait for modal focus restoration in file shortcut test

This commit is contained in:
evgeny committed 2026-10-10 00:44:42 +02:00
1 parent 93a6277ca4
commit eb9d379efc
1 file changed
+2
@@ -121,10 +121,12 @@ private slots:
auto previous = captured.message.request_id;
answerDialog(QMessageBox::No); QTest::keyClick(tree, Qt::Key_Delete);
QCOMPARE(captured.message.request_id, previous);
QTRY_VERIFY(browser.isActiveWindow()); QTRY_VERIFY(tree->hasFocus());
answerDialog(QMessageBox::Yes); QTest::keyClick(tree, Qt::Key_Delete);
QCOMPARE(captured.message.command, uint8_t(MF_REMOVE_PATH)); QCOMPARE(captured.message.owner, 22ULL);
QCOMPARE(QString::fromUtf8(captured.message.path), QString("documents/nested/remote.txt"));
QCOMPARE(QByteArray((const char*)captured.message.version, 16), QByteArray(16, '\7'));
QTRY_VERIFY(browser.isActiveWindow());
location->setFocus(); location->setText("abc"); location->setCursorPosition(1);
previous = captured.message.request_id;
QTest::keyClick(location, Qt::Key_Delete); QCOMPARE(location->text(), QString("ac"));