From f49c8bc66bf0d7f0b6b130b472a82ecccc0804c5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 5 Jul 2023 12:19:41 -0700 Subject: [PATCH] gnome-text-editor: only handle spellcheck language if needed The Flatpak build doesn't have the spellcheck issue at the moment, and it may be fixed soon in the RPM build. Trying to 'fix' the issue on the flatpak build actually makes the test fail. So, let's only do the fix if we actually have a misspelled word. Signed-off-by: Adam Williamson --- ...=> gte_line_word_spellcheck-20230630.json} | 4 ++-- ... => gte_line_word_spellcheck-20230630.png} | Bin .../gnome-text-editor/aaa_setup.pm | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 10 deletions(-) rename needles/gnome/apps/gnome-text-editor/{gte_line_word-20230630.json => gte_line_word_spellcheck-20230630.json} (77%) rename needles/gnome/apps/gnome-text-editor/{gte_line_word-20230630.png => gte_line_word_spellcheck-20230630.png} (100%) diff --git a/needles/gnome/apps/gnome-text-editor/gte_line_word-20230630.json b/needles/gnome/apps/gnome-text-editor/gte_line_word_spellcheck-20230630.json similarity index 77% rename from needles/gnome/apps/gnome-text-editor/gte_line_word-20230630.json rename to needles/gnome/apps/gnome-text-editor/gte_line_word_spellcheck-20230630.json index 604a27d2..994a0fa8 100644 --- a/needles/gnome/apps/gnome-text-editor/gte_line_word-20230630.json +++ b/needles/gnome/apps/gnome-text-editor/gte_line_word_spellcheck-20230630.json @@ -10,6 +10,6 @@ ], "properties": [], "tags": [ - "gte_line_word" + "gte_line_word_spellcheck" ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/gnome-text-editor/gte_line_word-20230630.png b/needles/gnome/apps/gnome-text-editor/gte_line_word_spellcheck-20230630.png similarity index 100% rename from needles/gnome/apps/gnome-text-editor/gte_line_word-20230630.png rename to needles/gnome/apps/gnome-text-editor/gte_line_word_spellcheck-20230630.png diff --git a/tests/applications/gnome-text-editor/aaa_setup.pm b/tests/applications/gnome-text-editor/aaa_setup.pm index 34fe7fed..f9c8c17e 100644 --- a/tests/applications/gnome-text-editor/aaa_setup.pm +++ b/tests/applications/gnome-text-editor/aaa_setup.pm @@ -45,14 +45,16 @@ sub run { # Check that the document has been opened assert_screen("gte_text_file_opened"); - # Set the document language to English in order - # to have the spelling control correct. - assert_and_click("gte_line_word", button => "right"); - # the context menu can change while it's loading, so we need to be careful - assert_screen("gte_context_languages"); - wait_still_screen 3; - assert_and_click("gte_context_languages"); - assert_and_click("gte_context_language_english"); + # Set the document language to English if we're seeing spelling + # errors + if (check_screen("gte_line_word_spellcheck", 5)) { + click_lastmatch(button => "right"); + # the context menu can change while it's loading, so we need to be careful + assert_screen("gte_context_languages"); + wait_still_screen 3; + assert_and_click("gte_context_languages"); + assert_and_click("gte_context_language_english"); + } } sub test_flags {