From d7f8a024f2eb8ba63d5b7cc5a770b70f55fcc721 Mon Sep 17 00:00:00 2001 From: Lukas Holecek <hluk@email.cz> Date: Mon, 14 Dec 2020 17:52:55 +0100 Subject: [PATCH] Tests: Fix waiting on configuration saved --- src/tests/tests.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index f81157eff..6ec02a371 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -85,6 +85,7 @@ const auto tabDialogLineEditId = "focus:lineEditTabName"; const auto commandDialogId = "focus:CommandDialog"; const auto commandDialogSaveButtonId = "focus::QPushButton in :QMessageBox"; const auto commandDialogListId = "focus:listWidgetItems"; +const auto configurationDialogId = "focus:ConfigurationManager"; const auto shortcutButtonId = "focus::QToolButton in CommandDialog"; const auto shortcutDialogId = "focus::QLineEdit in ShortcutDialog"; const auto actionDialogId = "focus:ActionDialog"; @@ -2767,13 +2768,13 @@ void Tests::openAndSavePreferences() RUN("config" << "check_clipboard" << "false", "false\n"); // Open preferences dialog. - RUN("keys" << "Ctrl+P", ""); + RUN("keys" << "Ctrl+P" << configurationDialogId, ""); // Focus and set wrap text option. // This behavior could differ on some systems and in other languages. - RUN("keys" << "ALT+1", ""); - RUN("keys" << "ENTER", ""); - RUN("config" << "check_clipboard", "true\n"); + RUN("keys" << configurationDialogId << "ALT+1", ""); + RUN("keys" << configurationDialogId << "ENTER" << clipboardBrowserId, ""); + WAIT_ON_OUTPUT("config" << "check_clipboard", "true\n"); } void Tests::pasteFromMainWindow() -- GitLab