[evolution] Change /link and /h-rule tests to not fail when run in background



commit 6f8c5e92c0ec16384bba17b1be1e49bb536af247
Author: Milan Crha <mcrha redhat com>
Date:   Wed Aug 24 16:15:26 2016 +0200

    Change /link and /h-rule tests to not fail when run in background

 e-util/test-html-editor-units-utils.c |    4 ++++
 e-util/test-html-editor-units.c       |   11 +++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/e-util/test-html-editor-units-utils.c b/e-util/test-html-editor-units-utils.c
index 8319941..8e6044e 100644
--- a/e-util/test-html-editor-units-utils.c
+++ b/e-util/test-html-editor-units-utils.c
@@ -721,6 +721,9 @@ test_utils_process_sequence (TestFixture *fixture,
                case 'i': /* Insert key press + release */
                        keyval = GDK_KEY_Insert;
                        break;
+               case '^': /* Escape key press + release */
+                       keyval = GDK_KEY_Escape;
+                       break;
                default:
                        success = FALSE;
                        g_warning ("%s: Unknown sequence command '%c' in sequence '%s'", G_STRFUNC, *seq, 
sequence);
@@ -838,6 +841,7 @@ test_utils_pick_undo_content (const GSList *undo_stack,
              / "t" ; Tab key press + release
              / "n" ; Return key press + release
              / "i" ; Insert key press + release
+            / "^" ; Escape key press + release
 
    typecmd   = "type:" text ; the 'text' can contain escaped letters with a backslash, like "\\n" transforms 
into "\n"
 
diff --git a/e-util/test-html-editor-units.c b/e-util/test-html-editor-units.c
index a76be3c..cedf5a5 100644
--- a/e-util/test-html-editor-units.c
+++ b/e-util/test-html-editor-units.c
@@ -854,7 +854,9 @@ test_link_insert_typed_change_description (TestFixture *fixture)
                "type:www.gnome.org \n"
                "seq:ll\n"
                "action:insert-link\n"
-               "seq:tt\n" /* Jump to the description */
+               "seq:A\n" /* Alt+D to jump to the Description */
+               "type:D\n"
+               "seq:a\n"
                "type:GNOME\n"
                "seq:n\n",
                HTML_PREFIX "<p><a href=\"http://www.gnome.org\";>GNOME</a> </p>" HTML_SUFFIX,
@@ -870,8 +872,9 @@ test_link_insert_dialog_remove_link (TestFixture *fixture)
                "type:www.gnome.org \n"
                "seq:ll\n"
                "action:insert-link\n"
-               "seq:tttt\n" /* Jump to 'Remove Link' */
-               "seq:n\n", /* Press the button */
+               "seq:A\n" /* Alt+R to press the 'Remove Link' */
+               "type:R\n"
+               "seq:a\n",
                HTML_PREFIX "<p>www.gnome.org </p>" HTML_SUFFIX,
                "www.gnome.org "))
                g_test_fail ();
@@ -909,7 +912,7 @@ test_h_rule_insert (TestFixture *fixture)
                "mode:html\n"
                "type:text\n"
                "action:insert-rule\n"
-               "seq:tttttn\n", /* Move to the Close button and press it */
+               "seq:^\n",  /* Escape key press to close the dialog */
                HTML_PREFIX "<p>text</p><hr align=\"left\" size=\"2\" noshade=\"\">" HTML_SUFFIX,
                "text"))
                g_test_fail ();


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