diff --git a/lib/utils.pm b/lib/utils.pm index db98ad00..d354606e 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -7,7 +7,7 @@ use Exporter; use lockapi; use testapi; -our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper/; +our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper check_and_install_git download_testdata/; # We introduce this global variable to hold the list of applications that have # registered during the apps_startstop_test when they have sucessfully run. @@ -1409,4 +1409,28 @@ sub solidify_wallpaper { } } +# This routine is used in Desktop test suites, such as Evince or Gedit. +# It checks if git is installed and installs it, if necessary. +sub check_and_install_git { + unless (get_var("CANNED")) { + if (script_run("rpm -q git")) { + assert_script_run("dnf install -y git"); + } + } +} + +# This routine is used in Desktop test suites. It downloads the test data from +# the repository and puts the file into correct locations. +sub download_testdata { + my ($repodir, $location) = @_; + # Navigate to the test's home directory + assert_script_run("cd /home/test/"); + # Clone the test repository; + assert_script_run("git clone https://pagure.io/fedora-qa/openqa_testdata.git"); + # Copy the test data into $repodir to $location. + assert_script_run("cp openqa_testdata/$repodir/* $location"); + # Change ownership + assert_script_run("chown -R test:test $location"); +} + 1; diff --git a/needles/gnome/apps/gedit/gedit_about.json b/needles/gnome/apps/gedit/gedit_about.json new file mode 100644 index 00000000..b4de6b95 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_about.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "width": 119, + "xpos": 782, + "height": 18, + "type": "match", + "ypos": 499 + } + ], + "properties": [], + "tags": [ + "gedit_about" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_about.png b/needles/gnome/apps/gedit/gedit_about.png new file mode 100644 index 00000000..41677b80 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_about.png differ diff --git a/needles/gnome/apps/gedit/gedit_about_credits.json b/needles/gnome/apps/gedit/gedit_about_credits.json new file mode 100644 index 00000000..4bdd6737 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_about_credits.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 547, + "ypos": 225, + "width": 52, + "height": 17, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_about_credits" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_about_credits.png b/needles/gnome/apps/gedit/gedit_about_credits.png new file mode 100644 index 00000000..860dc8a9 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_about_credits.png differ diff --git a/needles/gnome/apps/gedit/gedit_about_shown.json b/needles/gnome/apps/gedit/gedit_about_shown.json new file mode 100644 index 00000000..3ac77f09 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_about_shown.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "width": 126, + "xpos": 449, + "height": 89, + "type": "match", + "ypos": 344 + } + ], + "properties": [], + "tags": [ + "gedit_about_shown" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_about_shown.png b/needles/gnome/apps/gedit/gedit_about_shown.png new file mode 100644 index 00000000..84e34a8b Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_about_shown.png differ diff --git a/needles/gnome/apps/gedit/gedit_bottompanel_on.json b/needles/gnome/apps/gedit/gedit_bottompanel_on.json new file mode 100644 index 00000000..059f5db7 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_bottompanel_on.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 461, + "ypos": 604, + "width": 84, + "height": 146, + "type": "match", + "match": 99 + } + ], + "properties": [], + "tags": [ + "gedit_bottompanel_on" + ] +} diff --git a/needles/gnome/apps/gedit/gedit_bottompanel_on.png b/needles/gnome/apps/gedit/gedit_bottompanel_on.png new file mode 100644 index 00000000..85c479c1 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_bottompanel_on.png differ diff --git a/needles/gnome/apps/gedit/gedit_code_highlighted.json b/needles/gnome/apps/gedit/gedit_code_highlighted.json new file mode 100644 index 00000000..ff79f53c --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_code_highlighted.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 22, + "ypos": 118, + "width": 112, + "height": 50, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_code_highlighted" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_code_highlighted.png b/needles/gnome/apps/gedit/gedit_code_highlighted.png new file mode 100644 index 00000000..d8a46ff5 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_code_highlighted.png differ diff --git a/needles/gnome/apps/gedit/gedit_credits_shown.json b/needles/gnome/apps/gedit/gedit_credits_shown.json new file mode 100644 index 00000000..872b145d --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_credits_shown.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 490, + "ypos": 409, + "width": 49, + "height": 55, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_credits_shown" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_credits_shown.png b/needles/gnome/apps/gedit/gedit_credits_shown.png new file mode 100644 index 00000000..3adca21a Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_credits_shown.png differ diff --git a/needles/gnome/apps/gedit/gedit_display_linenumbers.json b/needles/gnome/apps/gedit/gedit_display_linenumbers.json new file mode 100644 index 00000000..4098e341 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_display_linenumbers.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 20, + "ypos": 617, + "type": "match", + "width": 141, + "xpos": 777 + } + ], + "properties": [], + "tags": [ + "gedit_display_linenumbers" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_display_linenumbers.png b/needles/gnome/apps/gedit/gedit_display_linenumbers.png new file mode 100644 index 00000000..f842a4cb Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_display_linenumbers.png differ diff --git a/needles/gnome/apps/gedit/gedit_display_margin.json b/needles/gnome/apps/gedit/gedit_display_margin.json new file mode 100644 index 00000000..e835b750 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_display_margin.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "type": "match", + "ypos": 643, + "height": 18, + "width": 89, + "xpos": 777 + } + ], + "properties": [], + "tags": [ + "gedit_display_margin" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_display_margin.png b/needles/gnome/apps/gedit/gedit_display_margin.png new file mode 100644 index 00000000..ba5b7860 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_display_margin.png differ diff --git a/needles/gnome/apps/gedit/gedit_find.json b/needles/gnome/apps/gedit/gedit_find.json new file mode 100644 index 00000000..d94f65b8 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_find.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 426, + "width": 36, + "type": "match", + "ypos": 325, + "height": 19 + } + ], + "properties": [], + "tags": [ + "gedit_find" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_find.png b/needles/gnome/apps/gedit/gedit_find.png new file mode 100644 index 00000000..87f7e1dd Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_find.png differ diff --git a/needles/gnome/apps/gedit/gedit_found_text.json b/needles/gnome/apps/gedit/gedit_found_text.json new file mode 100644 index 00000000..3e080906 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_found_text.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 14, + "type": "match", + "ypos": 170, + "width": 61, + "xpos": 59 + } + ], + "properties": [], + "tags": [ + "gedit_found_text" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_found_text.png b/needles/gnome/apps/gedit/gedit_found_text.png new file mode 100644 index 00000000..a75022e7 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_found_text.png differ diff --git a/needles/gnome/apps/gedit/gedit_help_bread_main.json b/needles/gnome/apps/gedit/gedit_help_bread_main.json new file mode 100644 index 00000000..3dd36f9f --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_help_bread_main.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 9, + "ypos": 85, + "width": 112, + "height": 20, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_help_bread_main" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_help_bread_main.png b/needles/gnome/apps/gedit/gedit_help_bread_main.png new file mode 100644 index 00000000..dadc97b4 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_help_bread_main.png differ diff --git a/needles/gnome/apps/gedit/gedit_help_color_schemes.json b/needles/gnome/apps/gedit/gedit_help_color_schemes.json new file mode 100644 index 00000000..df208e25 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_help_color_schemes.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 107, + "ypos": 270, + "width": 106, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_help_color_schemes" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_help_color_schemes.png b/needles/gnome/apps/gedit/gedit_help_color_schemes.png new file mode 100644 index 00000000..304487dc Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_help_color_schemes.png differ diff --git a/needles/gnome/apps/gedit/gedit_help_color_shown.json b/needles/gnome/apps/gedit/gedit_help_color_shown.json new file mode 100644 index 00000000..fb24dba5 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_help_color_shown.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 198, + "ypos": 124, + "width": 217, + "height": 36, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_help_color_shown" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_help_color_shown.png b/needles/gnome/apps/gedit/gedit_help_color_shown.png new file mode 100644 index 00000000..1a20dd9b Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_help_color_shown.png differ diff --git a/needles/gnome/apps/gedit/gedit_help_files.json b/needles/gnome/apps/gedit/gedit_help_files.json new file mode 100644 index 00000000..f186dda6 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_help_files.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 11, + "ypos": 379, + "width": 81, + "height": 22, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_help_files" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_help_files.png b/needles/gnome/apps/gedit/gedit_help_files.png new file mode 100644 index 00000000..be3ee02d Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_help_files.png differ diff --git a/needles/gnome/apps/gedit/gedit_help_search.json b/needles/gnome/apps/gedit/gedit_help_search.json new file mode 100644 index 00000000..976d91f1 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_help_search.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 520, + "ypos": 508, + "width": 121, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_help_search" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_help_search.png b/needles/gnome/apps/gedit/gedit_help_search.png new file mode 100644 index 00000000..3105284c Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_help_search.png differ diff --git a/needles/gnome/apps/gedit/gedit_help_shown.json b/needles/gnome/apps/gedit/gedit_help_shown.json new file mode 100644 index 00000000..c5f4f3d6 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_help_shown.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 116, + "ypos": 154, + "width": 111, + "height": 24, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_help_shown" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_help_shown.png b/needles/gnome/apps/gedit/gedit_help_shown.png new file mode 100644 index 00000000..a3e47901 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_help_shown.png differ diff --git a/needles/gnome/apps/gedit/gedit_highlight_current.json b/needles/gnome/apps/gedit/gedit_highlight_current.json new file mode 100644 index 00000000..68a45508 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_highlight_current.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "gedit_highlight_current" + ], + "area": [ + { + "xpos": 778, + "ypos": 668, + "width": 64, + "height": 21, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_highlight_current.png b/needles/gnome/apps/gedit/gedit_highlight_current.png new file mode 100644 index 00000000..686fce48 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_highlight_current.png differ diff --git a/needles/gnome/apps/gedit/gedit_highlight_misspelt.json b/needles/gnome/apps/gedit/gedit_highlight_misspelt.json new file mode 100644 index 00000000..c95e77ff --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_highlight_misspelt.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "gedit_highlight_misspelt" + ], + "area": [ + { + "xpos": 786, + "ypos": 187, + "width": 135, + "height": 16, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_highlight_misspelt.png b/needles/gnome/apps/gedit/gedit_highlight_misspelt.png new file mode 100644 index 00000000..1ae6623d Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_highlight_misspelt.png differ diff --git a/needles/gnome/apps/gedit/gedit_line_deleted.json b/needles/gnome/apps/gedit/gedit_line_deleted.json new file mode 100644 index 00000000..21dcb775 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_line_deleted.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 22, + "height": 245, + "ypos": 65, + "type": "match", + "width": 311 + } + ], + "properties": [], + "tags": [ + "gedit_line_deleted" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_line_deleted.png b/needles/gnome/apps/gedit/gedit_line_deleted.png new file mode 100644 index 00000000..04825bf3 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_line_deleted.png differ diff --git a/needles/gnome/apps/gedit/gedit_line_not_highlighted.json b/needles/gnome/apps/gedit/gedit_line_not_highlighted.json new file mode 100644 index 00000000..9eec6d53 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_line_not_highlighted.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 2, + "ypos": 205, + "width": 260, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_line_not_highlighted" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_line_not_highlighted.png b/needles/gnome/apps/gedit/gedit_line_not_highlighted.png new file mode 100644 index 00000000..d7611189 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_line_not_highlighted.png differ diff --git a/needles/gnome/apps/gedit/gedit_line_options.json b/needles/gnome/apps/gedit/gedit_line_options.json new file mode 100644 index 00000000..e88847b9 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_line_options.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 19, + "ypos": 745, + "type": "match", + "xpos": 821, + "width": 20 + } + ], + "properties": [], + "tags": [ + "gedit_line_options" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_line_options.png b/needles/gnome/apps/gedit/gedit_line_options.png new file mode 100644 index 00000000..1e58f343 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_line_options.png differ diff --git a/needles/gnome/apps/gedit/gedit_line_reached.json b/needles/gnome/apps/gedit/gedit_line_reached.json new file mode 100644 index 00000000..75cf3ebb --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_line_reached.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "type": "match", + "ypos": 745, + "height": 18, + "width": 32, + "xpos": 819 + } + ], + "properties": [], + "tags": [ + "gedit_line_reached" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_line_reached.png b/needles/gnome/apps/gedit/gedit_line_reached.png new file mode 100644 index 00000000..c58da4f9 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_line_reached.png differ diff --git a/needles/gnome/apps/gedit/gedit_line_word.json b/needles/gnome/apps/gedit/gedit_line_word.json new file mode 100644 index 00000000..97f926c8 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_line_word.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "gedit_line_word" + ], + "area": [ + { + "xpos": 35, + "ypos": 167, + "width": 66, + "height": 14, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_line_word.png b/needles/gnome/apps/gedit/gedit_line_word.png new file mode 100644 index 00000000..8b4493a7 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_line_word.png differ diff --git a/needles/gnome/apps/gedit/gedit_lines_not_numbered.json b/needles/gnome/apps/gedit/gedit_lines_not_numbered.json new file mode 100644 index 00000000..ef4cebbc --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_lines_not_numbered.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 1, + "ypos": 4, + "width": 28, + "height": 327, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_lines_not_numbered" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_lines_not_numbered.png b/needles/gnome/apps/gedit/gedit_lines_not_numbered.png new file mode 100644 index 00000000..86b085fd Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_lines_not_numbered.png differ diff --git a/needles/gnome/apps/gedit/gedit_margin_displayed.json b/needles/gnome/apps/gedit/gedit_margin_displayed.json new file mode 100644 index 00000000..9d52239b --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_margin_displayed.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "gedit_margin_displayed" + ], + "area": [ + { + "xpos": 658, + "ypos": 240, + "width": 16, + "height": 81, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_margin_displayed.png b/needles/gnome/apps/gedit/gedit_margin_displayed.png new file mode 100644 index 00000000..641ab67d Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_margin_displayed.png differ diff --git a/needles/gnome/apps/gedit/gedit_new_document_opened.json b/needles/gnome/apps/gedit/gedit_new_document_opened.json new file mode 100644 index 00000000..7d972cfa --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_new_document_opened.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 678, + "ypos": 86, + "width": 58, + "height": 30, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_new_document_opened" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_new_document_opened.png b/needles/gnome/apps/gedit/gedit_new_document_opened.png new file mode 100644 index 00000000..62182e87 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_new_document_opened.png differ diff --git a/needles/gnome/apps/gedit/gedit_replace.json b/needles/gnome/apps/gedit/gedit_replace.json new file mode 100644 index 00000000..8ca2397f --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_replace.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 20, + "type": "match", + "ypos": 325, + "xpos": 170, + "width": 77 + } + ], + "properties": [], + "tags": [ + "gedit_replace" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_replace.png b/needles/gnome/apps/gedit/gedit_replace.png new file mode 100644 index 00000000..3c458a9c Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_replace.png differ diff --git a/needles/gnome/apps/gedit/gedit_replace_nothing.json b/needles/gnome/apps/gedit/gedit_replace_nothing.json new file mode 100644 index 00000000..7c1e4ab3 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_replace_nothing.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 168, + "ypos": 190, + "width": 58, + "height": 21, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_replace_nothing" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_replace_nothing.png b/needles/gnome/apps/gedit/gedit_replace_nothing.png new file mode 100644 index 00000000..e7ea13ad Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_replace_nothing.png differ diff --git a/needles/gnome/apps/gedit/gedit_select_highlighting.json b/needles/gnome/apps/gedit/gedit_select_highlighting.json new file mode 100644 index 00000000..8e89bee0 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_select_highlighting.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 559, + "ypos": 747, + "width": 84, + "height": 14, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_select_highlighting" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_select_highlighting.png b/needles/gnome/apps/gedit/gedit_select_highlighting.png new file mode 100644 index 00000000..5995cd47 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_select_highlighting.png differ diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_four.json b/needles/gnome/apps/gedit/gedit_shortcuts_four.json new file mode 100644 index 00000000..b5acc99a --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_shortcuts_four.json @@ -0,0 +1,22 @@ +{ + "area": [ + { + "xpos": 27, + "ypos": 135, + "width": 49, + "height": 18, + "type": "match" + }, + { + "xpos": 538, + "ypos": 135, + "width": 63, + "height": 17, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_shortcuts_four" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_four.png b/needles/gnome/apps/gedit/gedit_shortcuts_four.png new file mode 100644 index 00000000..7585f7f3 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_shortcuts_four.png differ diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_go_four.json b/needles/gnome/apps/gedit/gedit_shortcuts_go_four.json new file mode 100644 index 00000000..fdffa257 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_shortcuts_go_four.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 571, + "ypos": 684, + "width": 21, + "height": 25, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_shortcuts_go_four" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_go_four.png b/needles/gnome/apps/gedit/gedit_shortcuts_go_four.png new file mode 100644 index 00000000..4948e9ff Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_shortcuts_go_four.png differ diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_go_three.json b/needles/gnome/apps/gedit/gedit_shortcuts_go_three.json new file mode 100644 index 00000000..eca99e52 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_shortcuts_go_three.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 525, + "ypos": 687, + "width": 21, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_shortcuts_go_three" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_go_three.png b/needles/gnome/apps/gedit/gedit_shortcuts_go_three.png new file mode 100644 index 00000000..bacf6150 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_shortcuts_go_three.png differ diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_go_two.json b/needles/gnome/apps/gedit/gedit_shortcuts_go_two.json new file mode 100644 index 00000000..906a0833 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_shortcuts_go_two.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 479, + "ypos": 687, + "width": 17, + "height": 20, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_shortcuts_go_two" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_go_two.png b/needles/gnome/apps/gedit/gedit_shortcuts_go_two.png new file mode 100644 index 00000000..e5ff1996 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_shortcuts_go_two.png differ diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_one.json b/needles/gnome/apps/gedit/gedit_shortcuts_one.json new file mode 100644 index 00000000..a6ef48eb --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_shortcuts_one.json @@ -0,0 +1,22 @@ +{ + "area": [ + { + "xpos": 31, + "ypos": 136, + "width": 80, + "height": 20, + "type": "match" + }, + { + "xpos": 563, + "ypos": 136, + "width": 149, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_shortcuts_one" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_one.png b/needles/gnome/apps/gedit/gedit_shortcuts_one.png new file mode 100644 index 00000000..2c32f582 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_shortcuts_one.png differ diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_three.json b/needles/gnome/apps/gedit/gedit_shortcuts_three.json new file mode 100644 index 00000000..d829e136 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_shortcuts_three.json @@ -0,0 +1,22 @@ +{ + "area": [ + { + "xpos": 28, + "ypos": 132, + "width": 82, + "height": 23, + "type": "match" + }, + { + "xpos": 614, + "ypos": 133, + "width": 55, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_shortcuts_three" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_three.png b/needles/gnome/apps/gedit/gedit_shortcuts_three.png new file mode 100644 index 00000000..be937f6f Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_shortcuts_three.png differ diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_two.json b/needles/gnome/apps/gedit/gedit_shortcuts_two.json new file mode 100644 index 00000000..e6cbdbc8 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_shortcuts_two.json @@ -0,0 +1,22 @@ +{ + "area": [ + { + "xpos": 32, + "ypos": 137, + "width": 119, + "height": 16, + "type": "match" + }, + { + "xpos": 541, + "ypos": 135, + "width": 105, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_shortcuts_two" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_shortcuts_two.png b/needles/gnome/apps/gedit/gedit_shortcuts_two.png new file mode 100644 index 00000000..26a28221 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_shortcuts_two.png differ diff --git a/needles/gnome/apps/gedit/gedit_side_on.json b/needles/gnome/apps/gedit/gedit_side_on.json new file mode 100644 index 00000000..7e42743e --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_side_on.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 178, + "ypos": 602, + "width": 61, + "height": 20, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_side_on" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_side_on.png b/needles/gnome/apps/gedit/gedit_side_on.png new file mode 100644 index 00000000..ef91ee50 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_side_on.png differ diff --git a/needles/gnome/apps/gedit/gedit_spelling_change.json b/needles/gnome/apps/gedit/gedit_spelling_change.json new file mode 100644 index 00000000..f12f85eb --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_spelling_change.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 537, + "width": 54, + "height": 19, + "ypos": 445, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_spelling_change" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_spelling_change.png b/needles/gnome/apps/gedit/gedit_spelling_change.png new file mode 100644 index 00000000..a3085ecf Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_spelling_change.png differ diff --git a/needles/gnome/apps/gedit/gedit_spelling_changed.json b/needles/gnome/apps/gedit/gedit_spelling_changed.json new file mode 100644 index 00000000..46868b2e --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_spelling_changed.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "type": "match", + "ypos": 169, + "height": 17, + "xpos": 25, + "width": 298 + } + ], + "properties": [], + "tags": [ + "gedit_spelling_changed" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_spelling_changed.png b/needles/gnome/apps/gedit/gedit_spelling_changed.png new file mode 100644 index 00000000..dadf2952 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_spelling_changed.png differ diff --git a/needles/gnome/apps/gedit/gedit_spelling_highlighted.json b/needles/gnome/apps/gedit/gedit_spelling_highlighted.json new file mode 100644 index 00000000..461d2afa --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_spelling_highlighted.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 198, + "ypos": 169, + "width": 42, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_spelling_highlighted" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_spelling_highlighted.png b/needles/gnome/apps/gedit/gedit_spelling_highlighted.png new file mode 100644 index 00000000..a8e4d678 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_spelling_highlighted.png differ diff --git a/needles/gnome/apps/gedit/gedit_spelling_suggestion.json b/needles/gnome/apps/gedit/gedit_spelling_suggestion.json new file mode 100644 index 00000000..25b2ff97 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_spelling_suggestion.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "width": 42, + "xpos": 313, + "height": 22, + "type": "match", + "ypos": 475 + } + ], + "properties": [], + "tags": [ + "gedit_spelling_suggestion" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_spelling_suggestion.png b/needles/gnome/apps/gedit/gedit_spelling_suggestion.png new file mode 100644 index 00000000..37d70291 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_spelling_suggestion.png differ diff --git a/needles/gnome/apps/gedit/gedit_stats_shown.json b/needles/gnome/apps/gedit/gedit_stats_shown.json new file mode 100644 index 00000000..2631e73d --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_stats_shown.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "width": 77, + "xpos": 236, + "height": 71, + "ypos": 141, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_stats_shown" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_stats_shown.png b/needles/gnome/apps/gedit/gedit_stats_shown.png new file mode 100644 index 00000000..54391f4d Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_stats_shown.png differ diff --git a/needles/gnome/apps/gedit/gedit_submenu_tools.json b/needles/gnome/apps/gedit/gedit_submenu_tools.json new file mode 100644 index 00000000..77bb7c75 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_submenu_tools.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 784, + "ypos": 381, + "width": 45, + "height": 17, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_submenu_tools" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_submenu_tools.png b/needles/gnome/apps/gedit/gedit_submenu_tools.png new file mode 100644 index 00000000..f9a91c50 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_submenu_tools.png differ diff --git a/needles/gnome/apps/gedit/gedit_text_added.json b/needles/gnome/apps/gedit/gedit_text_added.json new file mode 100644 index 00000000..97f32c40 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_text_added.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "gedit_text_added" + ], + "area": [ + { + "xpos": 0, + "ypos": 76, + "width": 322, + "height": 251, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_text_added.png b/needles/gnome/apps/gedit/gedit_text_added.png new file mode 100644 index 00000000..42dfc6be Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_text_added.png differ diff --git a/needles/gnome/apps/gedit/gedit_text_file_opened.json b/needles/gnome/apps/gedit/gedit_text_file_opened.json new file mode 100644 index 00000000..ec117724 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_text_file_opened.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 475, + "ypos": 40, + "width": 76, + "height": 32, + "type": "match" + } + ], + "properties": [], + "tags": [ + "gedit_text_file_opened" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_text_file_opened.png b/needles/gnome/apps/gedit/gedit_text_file_opened.png new file mode 100644 index 00000000..10cd7c33 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_text_file_opened.png differ diff --git a/needles/gnome/apps/gedit/gedit_text_replaced.json b/needles/gnome/apps/gedit/gedit_text_replaced.json new file mode 100644 index 00000000..f4503f2a --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_text_replaced.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 24, + "width": 315, + "type": "match", + "ypos": 171, + "height": 15 + } + ], + "properties": [], + "tags": [ + "gedit_text_replaced" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_text_replaced.png b/needles/gnome/apps/gedit/gedit_text_replaced.png new file mode 100644 index 00000000..d64ecf2f Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_text_replaced.png differ diff --git a/needles/gnome/apps/gedit/gedit_tools_stats.json b/needles/gnome/apps/gedit/gedit_tools_stats.json new file mode 100644 index 00000000..54057fd0 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_tools_stats.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 20, + "ypos": 250, + "type": "match", + "width": 64, + "xpos": 855 + } + ], + "properties": [], + "tags": [ + "gedit_tools_stats" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_tools_stats.png b/needles/gnome/apps/gedit/gedit_tools_stats.png new file mode 100644 index 00000000..c5392155 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_tools_stats.png differ diff --git a/needles/gnome/apps/gedit/gedit_txt_file.json b/needles/gnome/apps/gedit/gedit_txt_file.json new file mode 100644 index 00000000..046537c9 --- /dev/null +++ b/needles/gnome/apps/gedit/gedit_txt_file.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "width": 68, + "xpos": 185, + "ypos": 155, + "type": "match", + "height": 19 + } + ], + "properties": [], + "tags": [ + "gedit_txt_file" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gedit/gedit_txt_file.png b/needles/gnome/apps/gedit/gedit_txt_file.png new file mode 100644 index 00000000..05c9b704 Binary files /dev/null and b/needles/gnome/apps/gedit/gedit_txt_file.png differ diff --git a/needles/gnome/gnome_burger_menu.json b/needles/gnome/gnome_burger_menu.json index b7a920e7..bbdbe6c0 100644 --- a/needles/gnome/gnome_burger_menu.json +++ b/needles/gnome/gnome_burger_menu.json @@ -12,4 +12,4 @@ "tags": [ "gnome_burger_menu" ] -} \ No newline at end of file +} diff --git a/needles/gnome/gnome_open_location_documents.json b/needles/gnome/gnome_open_location_documents.json new file mode 100644 index 00000000..40bd508e --- /dev/null +++ b/needles/gnome/gnome_open_location_documents.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "gnome_open_location_documents" + ], + "area": [ + { + "xpos": 15, + "ypos": 168, + "width": 101, + "height": 20, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/gnome/gnome_open_location_documents.png b/needles/gnome/gnome_open_location_documents.png new file mode 100644 index 00000000..0b9e6aea Binary files /dev/null and b/needles/gnome/gnome_open_location_documents.png differ diff --git a/templates.fif.json b/templates.fif.json index 6a7fe65d..a6053629 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -978,6 +978,21 @@ "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%" } }, + "gedit": { + "profiles": { + "fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50, + "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50, + "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20, + "fedora-Workstation-live-iso-x86_64-*-64bit": 20, + "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22 + }, + "settings": { + "BOOTFROM": "c", + "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", + "POSTINSTALL_PATH": "tests/applications/gedit", + "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%" + } + }, "desktop_update_graphical": { "profiles": { "fedora-KDE-live-iso-x86_64-*-64bit": 32, diff --git a/tests/applications/evince/aaa_setup.pm b/tests/applications/evince/aaa_setup.pm index 184b0493..da65a8cb 100644 --- a/tests/applications/evince/aaa_setup.pm +++ b/tests/applications/evince/aaa_setup.pm @@ -7,27 +7,6 @@ use utils; # and set a milestone as a starting point for the other Evince tests. # -sub check_and_install_git { - # Let's see if Git is installed and install it, if it isn't. - unless (get_var("CANNED")) { - if (script_run("rpm -q git")) { - assert_script_run("dnf -y install git", 180); - } - } -} - - -sub download_testdata { - # Navigate to the test's home directory - assert_script_run("cd /home/test/"); - # Clone the test repository - assert_script_run("git clone https://pagure.io/fedora-qa/openqa_testdata.git"); - # Change ownership and attributes - assert_script_run("chown -R test:test openqa_testdata"); - # Move the test file into a correct location. - assert_script_run("cp openqa_testdata/evince/evince.pdf Documents") -} - sub run { my $self = shift; # Switch to console @@ -35,7 +14,7 @@ sub run { # Perform git test check_and_install_git(); # Download the test data - download_testdata(); + download_testdata("evince", "Documents"); # Exit the terminal desktop_vt; diff --git a/tests/applications/gedit/aaa_setup.pm b/tests/applications/gedit/aaa_setup.pm new file mode 100644 index 00000000..2548dbc4 --- /dev/null +++ b/tests/applications/gedit/aaa_setup.pm @@ -0,0 +1,50 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This part of the suite prepares downloads the test data and sets up the environment. + +sub run { + my $self = shift; + + # Go to the root console to set up the test data and necessary stuff. + $self->root_console(tty=>3); + + # Get the test data from the test data repository. + check_and_install_git(); + download_testdata("gedit", "Documents"); + # Return to Desktop + desktop_vt(); + + # Start the application + menu_launch_type("gedit"); + # Check that it started + assert_screen("apps_run_texteditor"); + + # Open the test file + send_key("ctrl-o"); + + # Open the documents location + assert_and_click("gnome_open_location_documents"); + + # Choose the file + assert_and_click("gedit_txt_file"); + + # Open it + send_key("ret"); + + # Make the application fullscreen + send_key("super-up"); + + # Check that the document has been opened + assert_screen("gedit_text_file_opened"); +} + +sub test_flags { + return { fatal => 1, milestone => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/applications/gedit/about.pm b/tests/applications/gedit/about.pm new file mode 100644 index 00000000..226c0954 --- /dev/null +++ b/tests/applications/gedit/about.pm @@ -0,0 +1,32 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This part tests that About can be displayed. + +sub run { + my $self = shift; + # Open the menu. + send_key("f10"); + + # Choose the About item. + assert_and_click "gedit_about"; + + # Check that the About dialogue was opened. + assert_screen "gedit_about_shown"; + + # Click on Credits to move to another screen. + assert_and_click "gedit_about_credits"; + + # Check that Credits were shown. + assert_screen "gedit_credits_shown"; +} + +sub test_flags { + return { always_rollback => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/applications/gedit/delete_line.pm b/tests/applications/gedit/delete_line.pm new file mode 100644 index 00000000..bcd0d20d --- /dev/null +++ b/tests/applications/gedit/delete_line.pm @@ -0,0 +1,34 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This part tests that a line of text can be deleted +# and the deletion reverted. + +sub run { + my $self = shift; + # Click on a word on the line. + assert_and_click "gedit_line_word"; + # Delete the line + send_key("ctrl-d"); + # Move cursor out of the way. + send_key("ctrl-end"); + # Check that the line was deleted. + assert_screen "gedit_line_deleted"; + + # Use combo to revert the action. + send_key "ctrl-z"; + # Move cursor out of the way. + send_key "ctrl-end"; + # Check that the line was re-added. + assert_screen "gedit_text_added"; +} + +sub test_flags { + return { always_rollback => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/applications/gedit/find_text.pm b/tests/applications/gedit/find_text.pm new file mode 100644 index 00000000..9e9811b0 --- /dev/null +++ b/tests/applications/gedit/find_text.pm @@ -0,0 +1,85 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This part tests that a piece of test can be found, that highlighting can be removed again, +# that search and replace can be used, that misspelt words can be highlighted, and +# that spelling control can be used to find and replace spelling mistakes. + +sub run { + my $self = shift; + # Search the text for specific string. + # At first, Wait 1 second for the test to get ready, as the control character was not properly recognized + # when the test started immediately after the rollback. + sleep 1; + # Invoke the Find dialogue + send_key "ctrl-f"; + # Type string + type_safely "sweetest"; + # Confirm + send_key "ret"; + # The found item is blue at first and after any action it changes to yellow. Let's move the cursor to + # change it into yellow for better assertion. + send_key "left"; + # Check that correct word is highlighted. + assert_screen "gedit_found_text"; + + # This tests that a highlight can be removed from a search result. + # Use combo for removing the highlighting. + send_key("shift-ctrl-k"); + # Move cursor out of text. + send_key "ctrl-end"; + # Check that the highlighting was removed. + assert_screen "gedit_text_added"; + + # We will continue to search and replace a piece of text. + # Open Switch and replace + send_key "ctrl-h"; + # Type string. + type_safely "Gale"; + # And click to replace it. + assert_and_click "gedit_replace_nothing"; + # Type replacement string. We purposefully produce a typo. + type_safely "Wiend"; + # Click to find the string + assert_and_click "gedit_find"; + # and replace it. + assert_and_click "gedit_replace"; + # Get rid of the screen. + send_key("esc"); + # Check that the string was replaced. + assert_screen "gedit_text_replaced"; + + # Now, let us try highlighting the misspelt words. + # Go to Menu + send_key("f10"); + # Go to Tools submenu + assert_and_click "gedit_submenu_tools"; + # Click to make typos highlighted + assert_and_click "gedit_highlight_misspelt"; + # Use Esc to clear the dialogue + send_key "esc"; + # Check that the word has been highlighted. + assert_and_click "gedit_spelling_highlighted"; + + # Check spelling and use a suggestion to correct the text + # Go to Menu + send_key("shift-f7"); + # Choose a suitable suggestion + assert_and_click "gedit_spelling_suggestion"; + # Correct the text. + assert_and_click "gedit_spelling_change"; + # Clear the dialogue. + send_key "esc"; + # Check that the typo has been corrected. + assert_and_click "gedit_spelling_changed"; +} + +sub test_flags { + return { always_rollback => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/applications/gedit/line_numbering.pm b/tests/applications/gedit/line_numbering.pm new file mode 100644 index 00000000..4134e40b --- /dev/null +++ b/tests/applications/gedit/line_numbering.pm @@ -0,0 +1,61 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This part tests that we can do line numbering, +# line navigation, line highlighting and show side and bottom panels. + +sub run { + my $self = shift; + + # Switches on line numbering. + assert_and_click "gedit_line_options"; + assert_and_click "gedit_display_linenumbers"; + send_key "esc"; + # By default the lines are numbered, so we need to check + # that now they are not. + assert_screen "gedit_lines_not_numbered"; + + # Uses the menu to go to a specific line. + send_key("ctrl-i"); + type_safely "8\n"; + assert_screen "gedit_line_reached"; + + # Highlights the current line. + assert_and_click "gedit_line_options"; + assert_and_click "gedit_highlight_current"; + send_key "esc"; + # By default, the lines are highlighted so we check + # that they are not highlighted at the moment. + assert_screen "gedit_line_not_highlighted"; + + # Displays the right margin. + assert_and_click "gedit_line_options"; + assert_and_click "gedit_display_margin"; + send_key "esc"; + assert_screen "gedit_margin_displayed"; + + # Display the side panel. + send_key("f9"); + assert_screen "gedit_side_on"; + + # Display the bottom panel. + # Currently the bottom panel does not work + # when invoked with the key combination. + # Issuse reported as https://gitlab.gnome.org/GNOME/gedit/-/issues/456 + # So if this fails, we only softfail here. + send_key("ctrl-f9"); + unless (check_screen("gedit_bottompanel_on")) { + record_soft_failure("Issue 456: https://gitlab.gnome.org/GNOME/gedit/-/issues/456"); + } +} + + +sub test_flags { + return { always_rollback => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/applications/gedit/new_file.pm b/tests/applications/gedit/new_file.pm new file mode 100644 index 00000000..a7f13208 --- /dev/null +++ b/tests/applications/gedit/new_file.pm @@ -0,0 +1,54 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This part tests that we can create a new file that +# opens in a new panel, that we can add text, display +# text statistics and highlight code and save the file. + +sub run { + my $self = shift; + + # First we will use key combo to open the new document window. + sleep 2; + send_key("ctrl-t"); + assert_screen "gedit_new_document_opened"; + + # Now let us produce some text + type_safely "# My shopping list.\n\n"; + type_safely "* Milk\n* Apples\n* Bananas\n* Bread\n* Butter\n* Cheese\n\n"; + type_safely "Happy shopping."; + + # Display text stats + send_key("f10"); + assert_and_click "gedit_submenu_tools"; + assert_and_click "gedit_tools_stats"; + assert_screen "gedit_stats_shown"; + send_key "esc"; + # Floating windows do not return focus to the text field, tab does. + send_key "tab"; + + # Switch on Markdown Highlighting. + assert_and_click "gedit_select_highlighting"; + type_very_safely "markdown"; + send_key "ret"; + assert_screen "gedit_code_highlighted"; + + # Save the newly created file. + send_key("ctrl-s"); + type_very_safely "list.md"; + send_key("ret"); + # Check that the file has been created + $self->root_console(tty=>3); + assert_script_run "ls /home/test/Documents/list.md"; +} + + +sub test_flags { + return { always_rollback => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/applications/gedit/show_help.pm b/tests/applications/gedit/show_help.pm new file mode 100644 index 00000000..7a3b3a04 --- /dev/null +++ b/tests/applications/gedit/show_help.pm @@ -0,0 +1,35 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This part tests that Help can be shown. + +sub run { + my $self = shift; + + # Open Help. + send_key("f1"); + assert_screen "gedit_help_shown"; + + # Navigate through several screens + assert_and_click "gedit_help_files"; + assert_and_click "gedit_help_bread_main"; + # Another screen + assert_and_click "gedit_help_search"; + assert_and_click "gedit_help_bread_main"; + # Move in the text + send_key "pgdn"; + # Another screen + assert_and_click "gedit_help_color_schemes"; + assert_screen "gedit_help_color_shown"; +} + + +sub test_flags { + return { always_rollback => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/applications/gedit/show_shortcuts.pm b/tests/applications/gedit/show_shortcuts.pm new file mode 100644 index 00000000..5eacbf6d --- /dev/null +++ b/tests/applications/gedit/show_shortcuts.pm @@ -0,0 +1,37 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This part tests that Shortcuts can be shown. + +sub run { + my $self = shift; + + # Open Shortcuts. + send_key("ctrl-?"); + + # Assert the screen and move to next one + assert_screen "gedit_shortcuts_one"; + assert_and_click "gedit_shortcuts_go_two"; + + # Assert the screen and move to next one + assert_screen "gedit_shortcuts_two"; + assert_and_click "gedit_shortcuts_go_three"; + + # Assert the screen and move to next one + assert_screen "gedit_shortcuts_three"; + assert_and_click "gedit_shortcuts_go_four"; + + # Assert the screen and move to next one + assert_screen "gedit_shortcuts_four"; +} + + +sub test_flags { + return { always_rollback => 1 }; +} + +1; + +# vim: set sw=4 et: