[evolution/wip/mcrha/webkit-jsc-api] test-html-editor-units: Change replace-related tests to be able to run in the background



commit d11664c8d6440644b6fbf8f854d693f5e2383968
Author: Milan Crha <mcrha redhat com>
Date:   Thu Apr 16 14:24:15 2020 +0200

    test-html-editor-units: Change replace-related tests to be able to run in the background

 src/e-util/test-html-editor-units-bugs.c | 11 +++--------
 src/e-util/test-html-editor-units.c      | 22 ++++++----------------
 2 files changed, 9 insertions(+), 24 deletions(-)
---
diff --git a/src/e-util/test-html-editor-units-bugs.c b/src/e-util/test-html-editor-units-bugs.c
index acb312fae1..7bebfb9276 100644
--- a/src/e-util/test-html-editor-units-bugs.c
+++ b/src/e-util/test-html-editor-units-bugs.c
@@ -1527,12 +1527,6 @@ test_issue_103 (TestFixture *fixture)
 static void
 test_issue_104 (TestFixture *fixture)
 {
-       if (test_utils_get_background ()) {
-               printf ("Cannot run in background mode, re-run without it ");
-               g_test_skip ("Cannot run in background mode, re-run without it");
-               return;
-       }
-
        if (!test_utils_run_simple_test (fixture,
                "mode:plain\n"
                "type:text to replace\n"
@@ -1540,8 +1534,9 @@ test_issue_104 (TestFixture *fixture)
                "seq:h\n"
                "action:show-replace\n"
                "type:e\t\n"
-               "type:\t\t\t\t\t\t\t\n" /* Jump to 'Replace All' */
-               "seq:n\n" /* Press it */
+               "seq:A\n" /* Press 'Alt+A' to press 'Replace All' button */
+               "type:a\n"
+               "seq:a\n"
                "seq:^\n" /* Close the dialog */
                "undo:undo\n"
                "undo:test:1\n"
diff --git a/src/e-util/test-html-editor-units.c b/src/e-util/test-html-editor-units.c
index add1f00d83..04bc9977b5 100644
--- a/src/e-util/test-html-editor-units.c
+++ b/src/e-util/test-html-editor-units.c
@@ -5929,12 +5929,6 @@ test_delete_quoted_selection (TestFixture *fixture)
 static void
 test_replace_dialog (TestFixture *fixture)
 {
-       if (test_utils_get_background ()) {
-               printf ("Cannot run in background mode, re-run without it ");
-               g_test_skip ("Cannot run in background mode, re-run without it");
-               return;
-       }
-
        if (!test_utils_run_simple_test (fixture,
                "mode:plain\n"
                "type:text to replace\n"
@@ -5942,8 +5936,9 @@ test_replace_dialog (TestFixture *fixture)
                "seq:h\n"
                "action:show-replace\n"
                "type:to\t2\n"
-               "type:\t\t\t\t\t\t\n" /* Jump to 'Replace' */
-               "seq:n\n" /* Press it */
+               "seq:A\n" /* Press 'Alt+R' to press 'Replace' button */
+               "type:r\n"
+               "seq:a\n"
                "seq:^\n" /* Close the dialog */
                "undo:undo\n"
                "undo:test:1\n"
@@ -5956,12 +5951,6 @@ test_replace_dialog (TestFixture *fixture)
 static void
 test_replace_dialog_all (TestFixture *fixture)
 {
-       if (test_utils_get_background ()) {
-               printf ("Cannot run in background mode, re-run without it ");
-               g_test_skip ("Cannot run in background mode, re-run without it");
-               return;
-       }
-
        if (!test_utils_run_simple_test (fixture,
                "mode:plain\n"
                "type:text to replace\n"
@@ -5969,8 +5958,9 @@ test_replace_dialog_all (TestFixture *fixture)
                "seq:h\n"
                "action:show-replace\n"
                "type:e\t3\n"
-               "type:\t\t\t\t\t\t\t\n" /* Jump to 'Replace All' */
-               "seq:n\n" /* Press it */
+               "seq:A\n" /* Press 'Alt+A' to press 'Replace All' button */
+               "type:a\n"
+               "seq:a\n"
                "seq:^\n" /* Close the dialog */
                "undo:undo\n"
                "undo:test:1\n"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]