Change KDE desktop background at start of KDE app test

Since the KDE menus have transparency set, any time the wallpaper
changes the menus will look different, and the app tests may
fail. This sets the desktop wallpaper to black at the start of
the test suite to avoid this problem.
This commit is contained in:
Lukas Ruzicka 2019-04-08 14:29:16 +02:00 committed by Adam Williamson
parent 09e81d6510
commit 99f93945b3
11 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"deskset_plain_color"
],
"area": [
{
"xpos": 432,
"ypos": 330,
"width": 33,
"height": 13,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"deskset_select_black"
],
"area": [
{
"xpos": 242,
"ypos": 144,
"width": 14,
"height": 11,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"deskset_select_color"
],
"area": [
{
"xpos": 437,
"ypos": 215,
"width": 29,
"height": 18,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"deskset_select_type"
],
"area": [
{
"xpos": 433,
"ypos": 175,
"width": 45,
"height": 17,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 618,
"ypos": 514,
"width": 43,
"height": 17,
"type": "match"
}
],
"properties": [],
"tags": [
"kde_ok"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -0,0 +1,42 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This sets the KDE desktop background to plain black, to avoid
# needle match problems caused by transparency.
sub run {
my $self = shift;
# Run the Desktop settings
hold_key 'alt';
send_key 'd';
send_key 's';
release_key 'alt';
# Select type of background
assert_and_click "deskset_select_type";
wait_still_screen 2;
# Select plain color type
assert_and_click "deskset_plain_color";
wait_still_screen 2;
# Open colors selection
assert_and_click "deskset_select_color";
wait_still_screen 2;
# Select black
assert_and_click "deskset_select_black";
wait_still_screen 2;
# Confirm
assert_and_click "kde_ok";
wait_still_screen 2;
# Close the application
assert_and_click "kde_ok";
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et: