#103 Add routine to change the desktop background as a test prerequisite.
Merged 5 years ago by adamwill. Opened 5 years ago by lruzicka.

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

+ {

+   "properties": [],

+   "tags": [

+     "deskset_plain_color"

+   ],

+   "area": [

+     {

+       "xpos": 432,

+       "ypos": 330,

+       "width": 33,

+       "height": 13,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "properties": [],

+   "tags": [

+     "deskset_select_black"

+   ],

+   "area": [

+     {

+       "xpos": 242,

+       "ypos": 144,

+       "width": 14,

+       "height": 11,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "properties": [],

+   "tags": [

+     "deskset_select_color"

+   ],

+   "area": [

+     {

+       "xpos": 437,

+       "ypos": 215,

+       "width": 29,

+       "height": 18,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "properties": [],

+   "tags": [

+     "deskset_select_type"

+   ],

+   "area": [

+     {

+       "xpos": 433,

+       "ypos": 175,

+       "width": 45,

+       "height": 17,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 618,

+       "ypos": 514,

+       "width": 43,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "kde_ok"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -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:

This PR sets the background to black and thus makes the KDE start stop tests working again.

I have tested this on staging. It works without problem: https://openqa.stg.fedoraproject.org/tests/514709#

Metadata Update from @lruzicka:
- Request assigned

5 years ago

Metadata Update from @lruzicka:
- Request assignee reset

5 years ago

Metadata Update from @lruzicka:
- Request assigned

5 years ago

Could you give this a better commit summary? Just "add Desktop setting." tells you very little without any other context...

rebased onto 70bf2f54cd8ae291d7ffd64799ce4d59f8f3546f

5 years ago

rebased onto d9efa823e6b03df0967a57d5266f40d2fd861190

5 years ago

I still didn't like the summary so I rewrote it myself :P I also tweaked the PR to use a keyboard shortcut to bring up the desktop settings instead of using a menu which itself may be subject to transparency issues - this should make it more robust. With those changes, I'm gonna go ahead and merge it. Thanks!

rebased onto 99f9394

5 years ago

Yeah, if I had known how to do multiple shortcuts, I would have done that, too. Thanks. Now I know.

Pull-Request has been merged by adamwill

5 years ago

My usual reference for 'hmm can I do this thing in os-autoinst?' is just to open up testapi.pm and look at the functions it exports!

I was trying git grep and hoped something would jump at me. Will have to remember the testapi.pm thingie.