#364 Create a test suite for KWrite
Merged 2 months ago by adamwill. Opened 2 months ago by lruzicka.

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 253,

+       "ypos": 60,

+       "width": 110,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_about_shown"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 212,

+       "ypos": 393,

+       "width": 60,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_button_new_file"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 46,

+       "ypos": 107,

+       "width": 151,

+       "height": 85,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_code_highlighted"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 436,

+       "ypos": 115,

+       "width": 52,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_credits"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "ypos": 246,

+       "type": "match",

+       "width": 132,

+       "xpos": 243,

+       "height": 18

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_credits_shown"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 258,

+       "ypos": 185,

+       "width": 132,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_credits_shown"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 100,

+       "ypos": 251,

+       "width": 126,

+       "height": 15,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_display_line_numbers"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "type": "match",

+       "ypos": 4,

+       "height": 20,

+       "xpos": 459,

+       "width": 108

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_file_saved"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 459,

+       "ypos": 4,

+       "width": 108,

+       "height": 20,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_file_saved"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 80,

+       "ypos": 194,

+       "width": 64,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_found_text"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 383,

+       "ypos": 269,

+       "width": 270,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_help_cmdoptions"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 380,

+       "ypos": 268,

+       "width": 227,

+       "height": 25,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_help_credits"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 427,

+       "ypos": 158,

+       "width": 147,

+       "height": 27,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_help_introduction"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 425,

+       "ypos": 508,

+       "width": 103,

+       "height": 23,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_help_link_introduction"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 831,

+       "ypos": 495,

+       "width": 43,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_help_next"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 832,

+       "ypos": 212,

+       "width": 40,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_help_next"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 385,

+       "ypos": 170,

+       "width": 167,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_help_shown"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 428,

+       "ypos": 265,

+       "width": 207,

+       "height": 29,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_help_title"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 48,

+       "ypos": 196,

+       "width": 222,

+       "height": 31,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_line_deleted"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 47,

+       "ypos": 106,

+       "width": 150,

+       "height": 14,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_line_title"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 221,

+       "ypos": 197,

+       "width": 35,

+       "height": 14,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_line_word"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 3,

+       "ypos": 106,

+       "width": 78,

+       "height": 34,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_lines_numbered"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 2,

+       "ypos": 105,

+       "width": 54,

+       "height": 34,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_lines_numbered_off"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 938,

+       "ypos": 701,

+       "width": 82,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_markdown_selected"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 757,

+       "ypos": 693,

+       "width": 69,

+       "height": 16,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_markdown_selected"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 988,

+       "ypos": 39,

+       "width": 24,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_menu_settings"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 310,

+       "ypos": 36,

+       "width": 53,

+       "height": 16,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_menu_settings"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "ypos": 5,

+       "type": "match",

+       "width": 114,

+       "xpos": 454,

+       "height": 20

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_new_document_opened"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 454,

+       "ypos": 5,

+       "width": 114,

+       "height": 20,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_new_document_opened"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 286,

+       "ypos": 253,

+       "width": 188,

+       "height": 13,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_newwindow_shortcut_found"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 230,

+       "ypos": 152,

+       "width": 51,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_search_bar"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 262,

+       "ypos": 248,

+       "width": 75,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_select_documents"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 771,

+       "ypos": 256,

+       "width": 69,

+       "height": 16,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_settings_markdown"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 960,

+       "ypos": 702,

+       "width": 61,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_settings_normal"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 387,

+       "ypos": 112,

+       "width": 189,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_shortcuts_shown"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 403,

+       "ypos": 242,

+       "width": 86,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_submenu_about"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 844,

+       "ypos": 465,

+       "width": 55,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_submenu_settings"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 482,

+       "ypos": 644,

+       "width": 219,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_submenu_shortcuts"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 48,

+       "ypos": 193,

+       "width": 220,

+       "height": 36,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_text_added"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 453,

+       "ypos": 6,

+       "width": 120,

+       "height": 20,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_text_file_opened"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 49,

+       "ypos": 193,

+       "width": 301,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_text_replaced"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 262,

+       "ypos": 271,

+       "width": 59,

+       "height": 15,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kwrite_txt_file"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 378,

+       "ypos": 35,

+       "width": 34,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kde_mainmenu_help"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "xpos": 806,

+       "ypos": 94,

+       "width": 15,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kde_window_maximize"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
file modified
+11 -1
@@ -2404,7 +2404,17 @@ 

                  "WORKER_CLASS": "tap"

              }

          },

- 

+         "kwrite": {

+             "profiles": {

+                 "fedora-KDE-live-iso-x86_64-*-64bit": 42

+             },

+             "settings": {

+                 "BOOTFROM": "c",

+                 "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",

+                 "POSTINSTALL_PATH": "tests/applications/kwrite",

+                 "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"

+             }

+         },

          "mediakit_fileconflicts": {

              "profiles": {

                  "fedora-Server-dvd-iso-aarch64-*-aarch64": 10,

@@ -0,0 +1,57 @@ 

+ 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();

+     # Return to Desktop

+     desktop_vt();

+ 

+     # Workaround the KDE double char problem

+     kde_doublek_workaround();

+     # Start the application

+     menu_launch_type("kwrite");

+     # Check that it started

+     assert_screen("apps_run_kwrite");

+ 

+     # Hit key-combo to open the file

+     send_key("ctrl-o");

+     wait_still_screen(2);

+ 

+     # Select the Documents directory and press Enter.

+     assert_and_click("kwrite_select_documents");

+     wait_still_screen(1);

+     send_key("ret");

+ 

+     # Choose the file

+     assert_and_click("kwrite_txt_file");

+ 

+     # Open it

+     send_key("ret");

+     wait_still_screen(3);

+ 

+     # Make the application fullscreen

+     assert_and_click("kde_window_maximize");

+     wait_still_screen(3);

+ 

+     # Check that the document has been opened

+     assert_screen("kwrite_text_file_opened");

+ }

+ 

+ sub test_flags {

+     return {fatal => 1, milestone => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

@@ -0,0 +1,35 @@ 

+ 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.

+     assert_and_click("kde_mainmenu_help");

+     wait_still_screen(2);

+ 

+     # Choose the About item.

+     assert_and_click "kwrite_submenu_about";

+     wait_still_screen(2);

+ 

+     # Check that the About dialogue was opened.

+     assert_screen "kwrite_about_shown";

+ 

+     # Click on Credits to move to another screen.

+     assert_and_click "kwrite_credits";

+     wait_still_screen(2);

+ 

+     # Check that Credits were shown.

+     assert_screen "kwrite_credits_shown";

+ }

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

@@ -0,0 +1,41 @@ 

+ 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("kwrite_line_word", clicktime => 0.3);

+     wait_still_screen(2);

+     # Delete the line

+     send_key("home");

+     sleep 1;

+     send_key("shift-end");

+     sleep 1;

+     send_key("delete");

+     sleep 1;

+     # Move cursor out of the way.

+     send_key("ctrl-end");

+     # Check that the line was deleted.

+     assert_screen "kwrite_line_deleted";

+ 

+     # Use combo to revert the action.

+     send_key "ctrl-z";

+     sleep 1;

+     # Move cursor out of the way.

+     send_key "ctrl-end";

+     # Check that the line was re-added.

+     assert_screen "kwrite_text_added";

+ }

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

@@ -0,0 +1,65 @@ 

+ 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 5;

+     # Click into the application to get focus.

+     assert_and_click("kwrite_line_word");

+     # Invoke the Find dialogue

+     send_key "ctrl-f";

+     wait_still_screen(2);

+     # Type string

+     type_very_safely "sweetest";

+     # Confirm

+     send_key "ret";

+     sleep 2;

+     send_key "esc";

+     # Check that correct word is highlighted.

+     assert_screen "kwrite_found_text";

+ 

+     # This tests that a highlight can be removed from a search result.

+     # Use combo for removing the highlighting.

+     send_key "ctrl-end";

+     # Check that the highlighting was removed.

+     assert_screen "kwrite_text_added";

+ 

+     # We will continue to search and replace a piece of text.

+     # Open Switch and replace

+     send_key "ctrl-r";

+     sleep 1;

+     # Type string.

+     type_very_safely "Gale";

+     # Press enter to find that word.

+     send_key("ret");

+     sleep(1);

+     send_key("tab");

+     # Type replacement string. We purposefully produce a typo.

+     type_very_safely "Wiend";

+     # Press enter to replace the string.

+     send_key("ret");

+     # Get rid of the screen.

+     send_key("esc");

+     # Move the cursor away

+     send_key("ctrl-end");

+     sleep 1;

+     # Check that the string was replaced.

+     assert_screen "kwrite_text_replaced";

+ }

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

@@ -0,0 +1,27 @@ 

+ use base "installedtest";

+ use strict;

+ use testapi;

+ use utils;

+ 

+ # This part tests that we can do line numbering,

+ # otherwise the rest of the Gnome things are not

+ # supported. However, we may add more in the future.

+ 

+ sub run {

+     my $self = shift;

+ 

+     # Switches off line numbering (numbered by default).

+     assert_and_click("kwrite_lines_numbered", button => "right");

+     wait_still_screen(1);

+     assert_and_click "kwrite_display_line_numbers";

+     assert_screen "kwrite_lines_numbered_off";

+ }

+ 

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

@@ -0,0 +1,55 @@ 

+ 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 5;

+     # Click into the text to regain focus.

+     assert_and_click("kwrite_line_word");

+     send_key("ctrl-shift-n");

+     assert_and_click("kwrite_button_new_file");

+     assert_screen "kwrite_new_document_opened";

+ 

+     # Now let us produce some text

+     type_very_safely "# My shopping list.\n\n";

+     type_very_safely "* **Milk**\n* *Apples*\n* `Bananas`\n* Bread\n* Butter\n* Cheese\n\n";

+     type_very_safely "Happy shopping.";

+ 

+     # Switch on Markdown Highlighting.

+     assert_and_click("kwrite_settings_normal");

+     type_very_safely("markdown");

+     assert_and_click("kwrite_settings_markdown");

+     assert_screen("kwrite_markdown_selected", "down", 50);

+     assert_screen "kwrite_code_highlighted";

+ 

+     # Save the newly created file.

+     send_key("ctrl-s");

+     wait_still_screen(3);

+     # select the entire prefilled name (including extension) to overwrite it

+     send_key("ctrl-a");

+     wait_still_screen(3);

+     type_very_safely "list.md";

+     send_key("ret");

+     assert_screen("kwrite_file_saved");

+     # Check that the file has been created

+     $self->root_console(tty => 3);

+     assert_script_run("ls /home/test/Documents/list.md");

+     desktop_vt();

+ }

+ 

+ 

+ sub test_flags {

+     return {fatal => 1, milestone => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

@@ -0,0 +1,38 @@ 

+ use base "installedtest";

+ use strict;

+ use testapi;

+ use utils;

+ 

+ # This part tests that Help can be shown.

+ 

+ sub run {

+     my $self = shift;

+     sleep(5);

+     # Click into the window to get focus

+     assert_and_click("kwrite_line_title");

+     # Open Help.

+     send_key("f1");

+     assert_screen "kwrite_help_shown";

+ 

+     ## Navigate through several screens

+     assert_and_click("kwrite_help_title");

+     # Use down arrow to navigate through the screen

+     # to arrive at something clickable.

+     send_key_until_needlematch("kwrite_help_link_introduction", "down", 7);

+     click_lastmatch;

+     assert_screen "kwrite_help_introduction";

+     send_key_until_needlematch("kwrite_help_next", "down", 7);

+     click_lastmatch;

+     assert_screen("kwrite_help_cmdoptions");

+     assert_and_click("kwrite_help_next");

+     assert_screen("kwrite_help_credits");

+ }

+ 

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

@@ -0,0 +1,39 @@ 

+ use base "installedtest";

+ use strict;

+ use testapi;

+ use utils;

+ 

+ # This part tests that Shortcuts can be shown.

+ 

+ sub run {

+     my $self = shift;

+     # wait for snapshot restore to settle

+     sleep 5;

+     # Click into the text to get focus

+     if (check_screen("kwrite_menu_settings")) {

+         click_lastmatch;

+     }

+     else {

+         assert_and_click("kwrite_menu_settings");

+     }

+ 

+     # Open Shortcuts.

+     assert_and_click("kwrite_submenu_settings");

+     assert_and_click("kwrite_submenu_shortcuts");

+     # Assert the screen and move to next one

+     assert_screen "kwrite_shortcuts_shown";

+ 

+     # Find a new window shortcut

+     assert_and_click("kwrite_search_bar");

+     type_very_safely("new window");

+     assert_screen("kwrite_newwindow_shortcut_found");

+ }

+ 

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

This PR creates a basic test suite for KWrite, the KDE text editor.
Its steps follow the Gnome text editor test case to provide the same
level of checking.

Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/363

rebased onto 1e6da70

2 months ago

rebased onto 1e6da70

2 months ago

rebased onto 7e352e4

2 months ago

I'm pretty sure this shouldn't have a new language selection needle in it.

We don't need the gedit removal code in the KDE version.

rebased onto 7e352e4

2 months ago

rebased onto 6bc2a61

2 months ago

I fixed those issues, rebased it, and tested on stg and it passed, so let's go ahead. Thanks.

Pull-Request has been merged by adamwill

2 months ago
Metadata
Changes Summary 97
+15
file added
needles/kde/apps/kwrite/kwrite_about_shown.json
+0
file added
needles/kde/apps/kwrite/kwrite_about_shown.png
+15
file added
needles/kde/apps/kwrite/kwrite_button_new_file.json
+0
file added
needles/kde/apps/kwrite/kwrite_button_new_file.png
+15
file added
needles/kde/apps/kwrite/kwrite_code_highlighted.json
+0
file added
needles/kde/apps/kwrite/kwrite_code_highlighted.png
+15
file added
needles/kde/apps/kwrite/kwrite_credits.json
+0
file added
needles/kde/apps/kwrite/kwrite_credits.png
+15
file added
needles/kde/apps/kwrite/kwrite_credits_shown-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_credits_shown-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_credits_shown.json
+0
file added
needles/kde/apps/kwrite/kwrite_credits_shown.png
+15
file added
needles/kde/apps/kwrite/kwrite_display_line_numbers.json
+0
file added
needles/kde/apps/kwrite/kwrite_display_line_numbers.png
+15
file added
needles/kde/apps/kwrite/kwrite_file_saved-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_file_saved-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_file_saved.json
+0
file added
needles/kde/apps/kwrite/kwrite_file_saved.png
+15
file added
needles/kde/apps/kwrite/kwrite_found_text.json
+0
file added
needles/kde/apps/kwrite/kwrite_found_text.png
+15
file added
needles/kde/apps/kwrite/kwrite_help_cmdoptions-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_help_cmdoptions-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_help_credits-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_help_credits-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_help_introduction-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_help_introduction-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_help_link_introduction-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_help_link_introduction-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_help_next-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_help_next-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_help_next-bigger.json
+0
file added
needles/kde/apps/kwrite/kwrite_help_next-bigger.png
+15
file added
needles/kde/apps/kwrite/kwrite_help_shown.json
+0
file added
needles/kde/apps/kwrite/kwrite_help_shown.png
+15
file added
needles/kde/apps/kwrite/kwrite_help_title-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_help_title-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_line_deleted.json
+0
file added
needles/kde/apps/kwrite/kwrite_line_deleted.png
+15
file added
needles/kde/apps/kwrite/kwrite_line_title.json
+0
file added
needles/kde/apps/kwrite/kwrite_line_title.png
+15
file added
needles/kde/apps/kwrite/kwrite_line_word.json
+0
file added
needles/kde/apps/kwrite/kwrite_line_word.png
+15
file added
needles/kde/apps/kwrite/kwrite_lines_numbered.json
+0
file added
needles/kde/apps/kwrite/kwrite_lines_numbered.png
+15
file added
needles/kde/apps/kwrite/kwrite_lines_numbered_off.json
+0
file added
needles/kde/apps/kwrite/kwrite_lines_numbered_off.png
+15
file added
needles/kde/apps/kwrite/kwrite_markdown_selected-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_markdown_selected-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_markdown_selected.json
+0
file added
needles/kde/apps/kwrite/kwrite_markdown_selected.png
+15
file added
needles/kde/apps/kwrite/kwrite_menu_settings-burger.json
+0
file added
needles/kde/apps/kwrite/kwrite_menu_settings-burger.png
+15
file added
needles/kde/apps/kwrite/kwrite_menu_settings.json
+0
file added
needles/kde/apps/kwrite/kwrite_menu_settings.png
+15
file added
needles/kde/apps/kwrite/kwrite_new_document_opened-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_new_document_opened-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_new_document_opened.json
+0
file added
needles/kde/apps/kwrite/kwrite_new_document_opened.png
+15
file added
needles/kde/apps/kwrite/kwrite_newwindow_shortcut_found.json
+0
file added
needles/kde/apps/kwrite/kwrite_newwindow_shortcut_found.png
+15
file added
needles/kde/apps/kwrite/kwrite_search_bar.json
+0
file added
needles/kde/apps/kwrite/kwrite_search_bar.png
+15
file added
needles/kde/apps/kwrite/kwrite_select_documents.json
+0
file added
needles/kde/apps/kwrite/kwrite_select_documents.png
+15
file added
needles/kde/apps/kwrite/kwrite_settings_markdown-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_settings_markdown-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_settings_normal-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_settings_normal-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_shortcuts_shown.json
+0
file added
needles/kde/apps/kwrite/kwrite_shortcuts_shown.png
+15
file added
needles/kde/apps/kwrite/kwrite_submenu_about.json
+0
file added
needles/kde/apps/kwrite/kwrite_submenu_about.png
+15
file added
needles/kde/apps/kwrite/kwrite_submenu_settings-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_submenu_settings-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_submenu_shortcuts-20250304.json
+0
file added
needles/kde/apps/kwrite/kwrite_submenu_shortcuts-20250304.png
+15
file added
needles/kde/apps/kwrite/kwrite_text_added.json
+0
file added
needles/kde/apps/kwrite/kwrite_text_added.png
+15
file added
needles/kde/apps/kwrite/kwrite_text_file_opened.json
+0
file added
needles/kde/apps/kwrite/kwrite_text_file_opened.png
+15
file added
needles/kde/apps/kwrite/kwrite_text_replaced.json
+0
file added
needles/kde/apps/kwrite/kwrite_text_replaced.png
+15
file added
needles/kde/apps/kwrite/kwrite_txt_file.json
+0
file added
needles/kde/apps/kwrite/kwrite_txt_file.png
+15
file added
needles/kde/kde_mainmenu_help.json
+0
file added
needles/kde/kde_mainmenu_help.png
+15
file added
needles/kde/kde_window_maximize.json
+0
file added
needles/kde/kde_window_maximize.png
+11 -1
file changed
templates.fif.json
+57
file added
tests/applications/kwrite/aaa_setup.pm
+35
file added
tests/applications/kwrite/about.pm
+41
file added
tests/applications/kwrite/delete_line.pm
+65
file added
tests/applications/kwrite/find_text.pm
+27
file added
tests/applications/kwrite/line_numbering.pm
+55
file added
tests/applications/kwrite/new_file.pm
+38
file added
tests/applications/kwrite/show_help.pm
+39
file added
tests/applications/kwrite/show_shortcuts.pm