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

Create a test suite for EoG (Image Viewer)

This commit is contained in:
Lukáš Růžička 2021-08-10 13:50:19 +02:00 committed by Adam Williamson
parent 6aa41f038c
commit cda0d0b0d1
69 changed files with 818 additions and 0 deletions

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 543,
"ypos": 227,
"width": 56,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_about_credits"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"height": 94,
"type": "match",
"width": 135,
"xpos": 444,
"ypos": 340
}
],
"properties": [],
"tags": [
"eog_about_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"ypos": 416,
"height": 57,
"xpos": 464,
"width": 149,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_credits_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 464,
"ypos": 413,
"width": 149,
"height": 57,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_credits_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"height": 15,
"type": "match",
"width": 71,
"xpos": 330,
"ypos": 157
}
],
"properties": [],
"tags": [
"eog_file_select_jpg"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 863,
"ypos": 11,
"width": 153,
"height": 65,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_fullscreen_on"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 862,
"ypos": 165,
"width": 98,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_gallery_show"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 103,
"ypos": 685,
"width": 133,
"height": 26,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_gallery_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 518,
"ypos": 454,
"width": 53,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_help_image_zoom"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"eog_help_shown"
],
"area": [
{
"xpos": 39,
"ypos": 106,
"width": 267,
"height": 45,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 3,
"ypos": 125,
"width": 107,
"height": 38,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_help_zoom_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"width": 71,
"type": "match",
"ypos": 7,
"height": 91,
"xpos": 14
}
],
"properties": [],
"tags": [
"eog_image_background"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 515,
"ypos": 469,
"width": 183,
"height": 117,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_image_default"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 403,
"ypos": 355,
"width": 155,
"height": 95,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_image_next"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 414,
"ypos": 279,
"width": 145,
"height": 98,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_image_rotated_left"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 46,
"ypos": 39,
"width": 67,
"height": 29,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_image_shown_increased"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"width": 214,
"height": 272,
"ypos": 92,
"xpos": 807
}
],
"properties": [],
"tags": [
"eog_img_info"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 816,
"ypos": 91,
"width": 205,
"height": 285,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_img_info"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 863,
"ypos": 464,
"width": 82,
"height": 14,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_menu_about"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 475,
"ypos": 47,
"width": 75,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_picture_name"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 862,
"ypos": 253,
"width": 114,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_set_wallpaper"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 KiB

View File

@ -0,0 +1,22 @@
{
"area": [
{
"xpos": 106,
"ypos": 137,
"width": 124,
"height": 17,
"type": "match"
},
{
"xpos": 568,
"ypos": 138,
"width": 62,
"height": 15,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_shortcuts_alt_shown"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View File

@ -0,0 +1,22 @@
{
"properties": [],
"tags": [
"eog_shortcuts_shown"
],
"area": [
{
"xpos": 107,
"ypos": 132,
"width": 63,
"height": 26,
"type": "match"
},
{
"xpos": 640,
"ypos": 134,
"width": 46,
"height": 22,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 793,
"ypos": 93,
"width": 162,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_side_panel"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 860,
"ypos": 350,
"width": 43,
"height": 21,
"type": "match"
}
],
"properties": [],
"tags": [
"eog_submenu_show"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 696,
"ypos": 123,
"height": 21,
"width": 26,
"type": "match"
}
],
"properties": [],
"tags": [
"gnome_burger_menu"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 959,
"ypos": 48,
"height": 16,
"width": 42,
"type": "match"
}
],
"properties": [],
"tags": [
"gnome_button_open"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 11,
"ypos": 283,
"width": 20,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"gnome_dirs_pictures"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -993,6 +993,21 @@
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
}
},
"eog": {
"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/eog",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
}
},
"desktop_update_graphical": {
"profiles": {
"fedora-KDE-live-iso-x86_64-*-64bit": 32,

View File

@ -0,0 +1,52 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This script will download the test data for evince, start the application,
# and set a milestone as a starting point for the other EoG 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("eog", "Pictures");
# Exit the terminal
desktop_vt;
# Start the application
menu_launch_type("image viewer");
# Check that is started
assert_screen 'apps_run_imageviewer';
# Fullsize the EoG window.
send_key("super-up");
# Open the test file to create a starting point for the other EoG tests.
send_key("ctrl-o");
if (get_var("CANNED") && !check_screen("gnome_dirs_pictures")) {
# open the Pictures folder.
assert_and_click("gnome_dirs_pictures", button => "left", timeout => 30);
}
# Select the image.jpg file.
assert_and_click("eog_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("eog_image_default");
}
sub test_flags {
return {fatal => 1, milestone => 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 EoG can show the About window.
sub run {
my $self = shift;
# Open the menu
send_key("f10");
# Click on the About item
assert_and_click("eog_menu_about");
assert_screen("eog_about_shown");
# Click on Credits
assert_and_click("eog_about_credits");
assert_screen("eog_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 "eog_picture_name";
# Check that the Side panel is visible, try to make it visible if it is not.
if (!check_screen("eog_side_panel")) {
send_key("f9");
}
assert_screen("eog_side_panel");
# Check that info on side panel is correct
assert_screen("eog_img_info");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,25 @@
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;
# Go to next picture.
send_key("right");
assert_screen("eog_image_next");
# Go to previous picture
send_key("left");
assert_and_click("eog_image_default");
}
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("f11");
wait_still_screen 2;
assert_screen("eog_fullscreen_on");
# Return to normal mode
send_key("f11");
wait_still_screen 2;
assert_screen("eog_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 help.
sub run {
my $self = shift;
sleep 2;
# Open the shortcuts
send_key("f1");
assert_screen("eog_help_shown");
# Try another screen
assert_and_click("eog_help_image_zoom");
assert_screen("eog_help_zoom_shown");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,32 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application can put an image as a wallpaper.
sub run {
my $self = shift;
sleep 2;
# Go to the menu
send_key("f10");
# Set as background
assert_and_click("eog_set_wallpaper");
# Confirm
send_key("tab");
send_key("ret");
# Close the application
send_key("ctrl-q");
# Check that the wallpaper was set
assert_screen("eog_image_background");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,25 @@
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");
assert_screen("eog_image_rotated_left");
# Rotate right
send_key("ctrl-r");
assert_and_click("eog_image_default");
}
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 save the image as a different file.
sub run {
my $self = shift;
sleep 2;
assert_screen("eog_image_default");
# Shift-ctrl-S to save a file as a new file.
send_key("shift-ctrl-s");
# Type the new name, this should be possible without any intervention.
type_very_safely("new_image");
# Hit enter to confirm
send_key("ret");
wait_still_screen("2");
# Go to console
$self->root_console(tty=>3);
# List the location
assert_script_run("ls /home/test/Pictures/");
# Compare the files
assert_script_run("diff /home/test/Pictures/image.jpg /home/test/Pictures/new_image.jpg");
}
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 show the shortcuts.
sub run {
my $self = shift;
sleep 2;
# Open the shortcuts
send_key("ctrl-?");
assert_screen("eog_shortcuts_shown");
# Try another screen
send_key("right");
send_key("ret");
assert_screen("eog_shortcuts_alt_shown");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,33 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests if the application can show the image gallery.
sub run {
my $self = shift;
sleep 2;
# Show the image gallery.
send_key("ctrl-f9");
unless (check_screen("eog_gallery_shown")) {
record_soft_failure("Key combo does not work, issue https://gitlab.gnome.org/GNOME/gtk/-/issues/4171");
# Open the menu
send_key("f10");
# Open Submenu Show
assert_and_click("eog_submenu_show");
# Toggle gallery
assert_and_click("eog_gallery_show");
}
assert_screen("eog_gallery_shown");
}
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 change the zoom for the displayed picture.
sub run {
my $self = shift;
sleep 2;
# Make the image size 1:1
send_key("1");
assert_screen("eog_image_shown_increased");
# Return to the best fit
send_key("f");
assert_and_click("eog_image_default");
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et: