[evolution/wip/mcrha/webkit-jsc-api] test-html-editor-units: Skip replace-related tests in background mode
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/mcrha/webkit-jsc-api] test-html-editor-units: Skip replace-related tests in background mode
- Date: Wed, 8 Apr 2020 15:48:43 +0000 (UTC)
commit eed9bfa67b6f91fc5284b92b2e76c04eaa9e55f2
Author: Milan Crha <mcrha redhat com>
Date: Wed Apr 8 17:50:30 2020 +0200
test-html-editor-units: Skip replace-related tests in background mode
Tabbing through the dialogs when it is not focused causes trouble,
thus rather skip these tests when running in the background mode,
to not give false impression that the tests are broken.
src/e-util/test-html-editor-units-bugs.c | 6 ++++++
src/e-util/test-html-editor-units.c | 18 +++++++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/src/e-util/test-html-editor-units-bugs.c b/src/e-util/test-html-editor-units-bugs.c
index a4787743fc..f8f1c753f6 100644
--- a/src/e-util/test-html-editor-units-bugs.c
+++ b/src/e-util/test-html-editor-units-bugs.c
@@ -1572,6 +1572,12 @@ 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"
diff --git a/src/e-util/test-html-editor-units.c b/src/e-util/test-html-editor-units.c
index 7bbd0d373a..cdb5673e48 100644
--- a/src/e-util/test-html-editor-units.c
+++ b/src/e-util/test-html-editor-units.c
@@ -3620,7 +3620,7 @@ test_h_rule_insert (TestFixture *fixture)
"mode:html\n"
"type:text\n"
"action:insert-rule\n"
- "seq:^\n", /* Escape key press to close the dialog */
+ "seq:^\n", /* Escape key press to close the dialog */
HTML_PREFIX "<div>text</div><hr align=\"center\">" HTML_SUFFIX,
"text\n\n"))
g_test_fail ();
@@ -3633,7 +3633,7 @@ test_h_rule_insert_text_after (TestFixture *fixture)
"mode:html\n"
"type:above\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 */
"seq:drn\n" /* Press the right key instead of End key as the End key won't move caret after
the HR element */
"type:below\n",
HTML_PREFIX "<div>above</div><hr align=\"center\"><div>below</div>" HTML_SUFFIX,
@@ -5883,6 +5883,12 @@ 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"
@@ -5904,6 +5910,12 @@ 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"
@@ -6477,7 +6489,7 @@ main (gint argc,
test_utils_add_test ("/delete/after-quoted", test_delete_after_quoted);
test_utils_add_test ("/delete/quoted-selection", test_delete_quoted_selection);
test_utils_add_test ("/replace/dialog", test_replace_dialog);
- test_utils_add_test ("/replace-all/dialog", test_replace_dialog_all);
+ test_utils_add_test ("/replace/dialog-all", test_replace_dialog_all);
test_utils_add_test ("/wrap/basic", test_wrap_basic);
test_utils_add_test ("/wrap/nested", test_wrap_nested);
test_utils_add_test ("/pre-split/simple-html", test_pre_split_simple_html);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]