Create a test suite for KWrite
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 218,
|
||||
"ypos": 159,
|
||||
"width": 333,
|
||||
"height": 26,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"anaconda_select_install_lang_filtered"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 109 KiB |
15
needles/kde/apps/kwrite/kwrite_about_shown.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 253,
|
||||
"ypos": 60,
|
||||
"width": 110,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_about_shown"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_about_shown.png
Normal file
After Width: | Height: | Size: 322 KiB |
15
needles/kde/apps/kwrite/kwrite_button_new_file.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 212,
|
||||
"ypos": 393,
|
||||
"width": 60,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_button_new_file"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_button_new_file.png
Normal file
After Width: | Height: | Size: 77 KiB |
15
needles/kde/apps/kwrite/kwrite_code_highlighted.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 46,
|
||||
"ypos": 107,
|
||||
"width": 151,
|
||||
"height": 85,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_code_highlighted"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_code_highlighted.png
Normal file
After Width: | Height: | Size: 70 KiB |
15
needles/kde/apps/kwrite/kwrite_credits.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 436,
|
||||
"ypos": 115,
|
||||
"width": 52,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_credits"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_credits.png
Normal file
After Width: | Height: | Size: 158 KiB |
15
needles/kde/apps/kwrite/kwrite_credits_shown.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 258,
|
||||
"ypos": 185,
|
||||
"width": 132,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_credits_shown"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_credits_shown.png
Normal file
After Width: | Height: | Size: 242 KiB |
15
needles/kde/apps/kwrite/kwrite_display_line_numbers.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 100,
|
||||
"ypos": 251,
|
||||
"width": 126,
|
||||
"height": 15,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_display_line_numbers"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_display_line_numbers.png
Normal file
After Width: | Height: | Size: 55 KiB |
15
needles/kde/apps/kwrite/kwrite_file_saved.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 459,
|
||||
"ypos": 4,
|
||||
"width": 108,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_file_saved"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_file_saved.png
Normal file
After Width: | Height: | Size: 73 KiB |
15
needles/kde/apps/kwrite/kwrite_found_text.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 80,
|
||||
"ypos": 194,
|
||||
"width": 64,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_found_text"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_found_text.png
Normal file
After Width: | Height: | Size: 58 KiB |
15
needles/kde/apps/kwrite/kwrite_help_shown.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 385,
|
||||
"ypos": 170,
|
||||
"width": 167,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_help_shown"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_help_shown.png
Normal file
After Width: | Height: | Size: 130 KiB |
15
needles/kde/apps/kwrite/kwrite_line_deleted.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 48,
|
||||
"ypos": 196,
|
||||
"width": 222,
|
||||
"height": 31,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_line_deleted"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_line_deleted.png
Normal file
After Width: | Height: | Size: 56 KiB |
15
needles/kde/apps/kwrite/kwrite_line_title.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 47,
|
||||
"ypos": 106,
|
||||
"width": 150,
|
||||
"height": 14,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_line_title"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_line_title.png
Normal file
After Width: | Height: | Size: 40 KiB |
15
needles/kde/apps/kwrite/kwrite_line_word.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 221,
|
||||
"ypos": 197,
|
||||
"width": 35,
|
||||
"height": 14,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_line_word"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_line_word.png
Normal file
After Width: | Height: | Size: 58 KiB |
15
needles/kde/apps/kwrite/kwrite_lines_numbered.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 3,
|
||||
"ypos": 106,
|
||||
"width": 78,
|
||||
"height": 34,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_lines_numbered"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_lines_numbered.png
Normal file
After Width: | Height: | Size: 58 KiB |
15
needles/kde/apps/kwrite/kwrite_lines_numbered_off.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 2,
|
||||
"ypos": 105,
|
||||
"width": 54,
|
||||
"height": 34,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_lines_numbered_off"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_lines_numbered_off.png
Normal file
After Width: | Height: | Size: 55 KiB |
15
needles/kde/apps/kwrite/kwrite_markdown_selected.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 757,
|
||||
"ypos": 693,
|
||||
"width": 69,
|
||||
"height": 16,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_markdown_selected"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_markdown_selected.png
Normal file
After Width: | Height: | Size: 214 KiB |
15
needles/kde/apps/kwrite/kwrite_menu_settings.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 310,
|
||||
"ypos": 36,
|
||||
"width": 53,
|
||||
"height": 16,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_menu_settings"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_menu_settings.png
Normal file
After Width: | Height: | Size: 41 KiB |
15
needles/kde/apps/kwrite/kwrite_menu_tools.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 256,
|
||||
"ypos": 33,
|
||||
"width": 38,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_menu_tools"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_menu_tools.png
Normal file
After Width: | Height: | Size: 70 KiB |
15
needles/kde/apps/kwrite/kwrite_new_document_opened.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 454,
|
||||
"ypos": 5,
|
||||
"width": 114,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_new_document_opened"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_new_document_opened.png
Normal file
After Width: | Height: | Size: 54 KiB |
15
needles/kde/apps/kwrite/kwrite_newwindow_shortcut_found.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 286,
|
||||
"ypos": 253,
|
||||
"width": 188,
|
||||
"height": 13,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_newwindow_shortcut_found"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_newwindow_shortcut_found.png
Normal file
After Width: | Height: | Size: 70 KiB |
15
needles/kde/apps/kwrite/kwrite_search_bar.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 230,
|
||||
"ypos": 152,
|
||||
"width": 51,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_search_bar"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_search_bar.png
Normal file
After Width: | Height: | Size: 94 KiB |
15
needles/kde/apps/kwrite/kwrite_select_documents.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 262,
|
||||
"ypos": 248,
|
||||
"width": 75,
|
||||
"height": 17,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_select_documents"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_select_documents.png
Normal file
After Width: | Height: | Size: 490 KiB |
15
needles/kde/apps/kwrite/kwrite_shortcuts_shown.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 387,
|
||||
"ypos": 112,
|
||||
"width": 189,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_shortcuts_shown"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_shortcuts_shown.png
Normal file
After Width: | Height: | Size: 94 KiB |
15
needles/kde/apps/kwrite/kwrite_submenu_about.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 403,
|
||||
"ypos": 242,
|
||||
"width": 86,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_submenu_about"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_submenu_about.png
Normal file
After Width: | Height: | Size: 76 KiB |
15
needles/kde/apps/kwrite/kwrite_submenu_highlight.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 304,
|
||||
"ypos": 93,
|
||||
"width": 82,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_submenu_highlight"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_submenu_highlight.png
Normal file
After Width: | Height: | Size: 118 KiB |
15
needles/kde/apps/kwrite/kwrite_submenu_markup.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 608,
|
||||
"ypos": 251,
|
||||
"width": 52,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_submenu_markup"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_submenu_markup.png
Normal file
After Width: | Height: | Size: 70 KiB |
15
needles/kde/apps/kwrite/kwrite_submenu_shorcuts.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 421,
|
||||
"ypos": 315,
|
||||
"width": 134,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_submenu_shorcuts"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_submenu_shorcuts.png
Normal file
After Width: | Height: | Size: 131 KiB |
15
needles/kde/apps/kwrite/kwrite_text_added.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 48,
|
||||
"ypos": 193,
|
||||
"width": 220,
|
||||
"height": 36,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_text_added"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_text_added.png
Normal file
After Width: | Height: | Size: 58 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"width": 123,
|
||||
"xpos": 449,
|
||||
"height": 21,
|
||||
"type": "match",
|
||||
"ypos": 4
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kcalc_text_file_opened"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_text_file_opened-20240325.png
Normal file
After Width: | Height: | Size: 57 KiB |
15
needles/kde/apps/kwrite/kwrite_text_file_opened.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 453,
|
||||
"ypos": 6,
|
||||
"width": 120,
|
||||
"height": 20,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_text_file_opened"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_text_file_opened.png
Normal file
After Width: | Height: | Size: 98 KiB |
15
needles/kde/apps/kwrite/kwrite_text_replaced.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 49,
|
||||
"ypos": 193,
|
||||
"width": 301,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_text_replaced"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_text_replaced.png
Normal file
After Width: | Height: | Size: 99 KiB |
15
needles/kde/apps/kwrite/kwrite_txt_file.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 262,
|
||||
"ypos": 271,
|
||||
"width": 59,
|
||||
"height": 15,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kwrite_txt_file"
|
||||
]
|
||||
}
|
BIN
needles/kde/apps/kwrite/kwrite_txt_file.png
Normal file
After Width: | Height: | Size: 454 KiB |
15
needles/kde/kde_mainmenu_help.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 378,
|
||||
"ypos": 35,
|
||||
"width": 34,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kde_mainmenu_help"
|
||||
]
|
||||
}
|
BIN
needles/kde/kde_mainmenu_help.png
Normal file
After Width: | Height: | Size: 57 KiB |
15
needles/kde/kde_window_maximize.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 806,
|
||||
"ypos": 94,
|
||||
"width": 15,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"kde_window_maximize"
|
||||
]
|
||||
}
|
BIN
needles/kde/kde_window_maximize.png
Normal file
After Width: | Height: | Size: 560 KiB |
@ -2393,6 +2393,17 @@
|
||||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
|
||||
}
|
||||
},
|
||||
"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,
|
||||
|
@ -11,7 +11,7 @@ sub run {
|
||||
# before we start testing.
|
||||
sleep 5;
|
||||
# Open the menu and click on the About item.
|
||||
assert_and_click("kcalc_mainmenu_help");
|
||||
assert_and_click("kde_mainmenu_help");
|
||||
wait_still_screen(2);
|
||||
assert_and_click("kcalc_submenu_about");
|
||||
# Check that it is shown.
|
||||
|
57
tests/applications/kwrite/aaa_setup.pm
Normal file
@ -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();
|
||||
# Remove gedit on upgraded systems so we don't launch it by accident
|
||||
script_run("dnf -y remove gedit") if (get_var("IMAGETYPE") eq "upgrade");
|
||||
# Return to Desktop
|
||||
desktop_vt();
|
||||
|
||||
# Start the application
|
||||
menu_launch_type("kwrite");
|
||||
# Check that it started
|
||||
assert_screen("kwrite_runs");
|
||||
|
||||
# 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:
|
35
tests/applications/kwrite/about.pm
Normal file
@ -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:
|
41
tests/applications/kwrite/delete_line.pm
Normal file
@ -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:
|
65
tests/applications/kwrite/find_text.pm
Normal file
@ -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:
|
27
tests/applications/kwrite/line_numbering.pm
Normal file
@ -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:
|
56
tests/applications/kwrite/new_file.pm
Normal file
@ -0,0 +1,56 @@
|
||||
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_menu_tools");
|
||||
assert_and_click("kwrite_submenu_highlight");
|
||||
assert_and_click("kwrite_submenu_markup");
|
||||
send_key_until_needlematch("kwrite_markdown_selected", "down", 50);
|
||||
send_key("ret");
|
||||
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:
|
37
tests/applications/kwrite/show_help.pm
Normal file
@ -0,0 +1,37 @@
|
||||
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";
|
||||
|
||||
# No help today.
|
||||
#
|
||||
#
|
||||
## Navigate through several screens
|
||||
#assert_and_click "kwrite_help_files";
|
||||
#assert_screen "kwrite_help_open_file";
|
||||
#assert_and_click "kwrite_help_bread_main";
|
||||
## Another screen
|
||||
#assert_and_click "kwrite_help_search";
|
||||
#assert_screen("kwrite_help_search_replace");
|
||||
#assert_and_click "kwrite_help_bread_main";
|
||||
}
|
||||
|
||||
|
||||
sub test_flags {
|
||||
return {always_rollback => 1};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set sw=4 et:
|
34
tests/applications/kwrite/show_shortcuts.pm
Normal file
@ -0,0 +1,34 @@
|
||||
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
|
||||
assert_and_click("kwrite_menu_settings");
|
||||
|
||||
# Open Shortcuts.
|
||||
assert_and_click("kwrite_submenu_shorcuts");
|
||||
|
||||
# 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:
|