1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-21 21:43:08 +00:00

Create tests for KDE Gwenview

This commit is contained in:
Lukas Ruzicka 2024-11-14 13:25:05 +01:00 committed by Lukáš Růžička
parent ca421dacc7
commit 4c2c88f669
62 changed files with 726 additions and 0 deletions

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 551,
"ypos": 314,
"width": 54,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"qwen_about_credits"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 371,
"ypos": 255,
"width": 140,
"height": 23,
"type": "match"
},
{
"xpos": 382,
"ypos": 314,
"width": 42,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"qwen_about_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 KiB

View File

@ -0,0 +1,29 @@
{
"area": [
{
"xpos": 32,
"ypos": 170,
"width": 75,
"height": 54,
"type": "match"
},
{
"xpos": 179,
"ypos": 172,
"width": 82,
"height": 55,
"type": "match"
},
{
"xpos": 324,
"ypos": 172,
"width": 85,
"height": 54,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_browse_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 987,
"ypos": 38,
"width": 28,
"height": 26,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_burger_menu"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 370,
"ypos": 380,
"width": 81,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"qwen_credits_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 242,
"ypos": 225,
"width": 74,
"height": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_file_select_jpg"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 5,
"ypos": 8,
"width": 58,
"height": 90,
"type": "match"
},
{
"xpos": 6,
"ypos": 687,
"width": 61,
"height": 72,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_fullscreen_on"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 354,
"ypos": 169,
"width": 215,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_help_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 193,
"ypos": 145,
"width": 119,
"height": 111,
"type": "match",
"match": 90
}
],
"properties": [],
"tags": [
"gwen_image_default"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 183,
"height": 111,
"xpos": 207,
"type": "match",
"width": 119
}
],
"properties": [],
"tags": [
"gwen_image_default"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 482,
"ypos": 453,
"width": 155,
"height": 97,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_image_next"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 310,
"ypos": 334,
"width": 136,
"height": 50,
"type": "match",
"match": 90
}
],
"properties": [],
"tags": [
"gwen_image_rotated_left"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 541,
"ypos": 82,
"width": 86,
"height": 163,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_image_unfitted"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 318,
"ypos": 258,
"width": 183,
"height": 128,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_image_zoomed_in"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 6,
"ypos": 185,
"width": 131,
"height": 71,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_img_info"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 388,
"ypos": 3,
"width": 53,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_picture_name"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 243,
"ypos": 315,
"width": 70,
"height": 16,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_pictures_directory"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 266,
"ypos": 278,
"width": 88,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_shortcuts_alt_page"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 266,
"ypos": 279,
"width": 126,
"height": 53,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_shortcuts_alt_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 442,
"ypos": 113,
"width": 122,
"height": 20,
"type": "match"
},
{
"xpos": 229,
"ypos": 192,
"width": 40,
"height": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_shortcuts_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 58,
"ypos": 38,
"width": 67,
"height": 26,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_show_browse"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 5,
"ypos": 84,
"width": 103,
"height": 65,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_side_panel"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 537,
"ypos": 536,
"width": 127,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_submenu_about"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 800,
"ypos": 380,
"width": 55,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_submenu_help"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 939,
"ypos": 689,
"width": 36,
"height": 23,
"type": "match"
}
],
"properties": [],
"tags": [
"gwen_zoom_ratio"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 197,
"ypos": 110,
"width": 19,
"height": 20,
"type": "match"
},
{
"xpos": 479,
"ypos": 111,
"width": 67,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"imageviewer_runs"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

View File

@ -1252,6 +1252,17 @@
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%" "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
} }
}, },
"gwenview": {
"profiles": {
"fedora-KDE-live-iso-x86_64-*-64bit": 30
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"POSTINSTALL_PATH": "tests/applications/gwenview",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
}
},
"help_viewer": { "help_viewer": {
"profiles": { "profiles": {
"fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50, "fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50,

View File

@ -0,0 +1,50 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This script will download the test data for Gwenview, start the application,
# and set a milestone as a starting point for the other Gwenview tests.
sub run {
my $self = shift;
# Switch to console
$self->root_console(tty => 3);
# Perform git test
check_and_install_git();
# Download the test data
download_testdata();
# Exit the terminal
desktop_vt;
# Start the application
menu_launch_type("gwenview");
# Check that is started
assert_screen 'imageviewer_runs';
# Fullsize the application window.
send_key("super-pgup");
# Open the test file to create a starting point for the other tests.
send_key("ctrl-o");
# Open the Pictures folder.
assert_and_dclick("gwen_pictures_directory", button => "left", timeout => 30);
# Select the image.jpg file.
assert_and_click("gwen_file_select_jpg", button => "left", timeout => 30);
# Hit enter to open it.
send_key("ret");
# Check that the file has been successfully opened.
assert_screen("gwen_image_default");
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,28 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if EoG can show the About window.
sub run {
my $self = shift;
# Open the menu
assert_and_click("gwen_burger_menu");
# Click to open the About item
assert_and_click("gwen_submenu_help");
assert_and_click("gwen_submenu_about");
assert_screen("qwen_about_shown");
# Click on Credits
assert_and_click("qwen_about_credits");
assert_screen("qwen_credits_shown");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,30 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application basic layout shows basic info.
sub run {
my $self = shift;
# Check that the picture name is shown
assert_screen "gwen_picture_name";
# Check that the Side panel is visible, try to make it visible if it is not.
if (!check_screen("gwen_side_panel")) {
send_key("f4");
}
assert_screen("gwen_side_panel");
# Check that info on side panel is correct
assert_screen("gwen_img_info");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,31 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application can navigate through the current folder.
sub run {
my $self = shift;
# wait to settle from snapshot
wait_still_screen 3;
# Go to next picture.
send_key("right");
assert_screen("gwen_image_next", timeout => 90);
# Go to previous picture
send_key("left");
assert_and_click("gwen_image_default", timeout => 90);
# Show the browse menu
assert_and_click("gwen_show_browse");
# Check it
assert_screen("gwen_browse_shown");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,28 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application can be switched to full screen.
sub run {
my $self = shift;
# Toggle full screen
send_key("ctrl-shift-f");
wait_still_screen 2;
assert_screen("gwen_fullscreen_on");
# Return to normal mode
send_key("ctrl-shift-f");
wait_still_screen 2;
assert_screen("gwen_image_default");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,23 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application can show help.
sub run {
my $self = shift;
sleep 2;
# Open the shortcuts
send_key("f1");
assert_screen("gwen_help_shown", timeout => 120);
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,27 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application can rotate the displayed picture.
sub run {
my $self = shift;
# Rotate left
send_key("shift-ctrl-r");
wait_still_screen(3);
assert_screen("gwen_image_rotated_left");
# Rotate right
send_key("ctrl-r");
wait_still_screen(3);
assert_and_click("gwen_image_default");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,26 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application can show the shortcuts.
sub run {
my $self = shift;
sleep 2;
# Open the shortcuts
send_key("ctrl-alt-,");
assert_screen("gwen_shortcuts_shown");
# Try another screen
assert_and_click("gwen_shortcuts_alt_page");
assert_screen("gwen_shortcuts_alt_shown");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,38 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application can change the zoom for the displayed picture.
sub run {
my $self = shift;
sleep 2;
assert_screen("gwen_image_default");
# Let us increase the image using the plus key
mouse_set("500", "350");
# Normally the picture is set to fit the screen,
# use the F key to not fit it in.
send_key("f");
assert_screen("gwen_image_unfitted");
# make it very huge
assert_and_click("gwen_zoom_ratio");
send_key("ctrl-a");
type_very_safely("400%");
wait_still_screen(2);
assert_screen("gwen_image_zoomed_in");
# return to normal
send_key("tab");
sleep(1);
send_key("f");
assert_screen("gwen_image_default");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et: