#323 Extend the Navigation test for QA:Testcase_window_manager.
Opened 3 months ago by lruzicka. Modified 2 months ago

file modified
+4 -1
@@ -225,11 +225,13 @@ 

  'root_password', 'select_packages', 'installation_source', 'time_date', 'user_creation',

  'language_selection', 'language', 'summary_link'))

  # for Gnome navigation test

- for app in ("calculator", "clocks", "files", "terminal", "editor"):

+ for app in ("calculator", "clocks", "files", "terminal", "text_editor"):

      testtags.append(f"navigation_navibar_{app}")

  testtags.append("navigation_terminal_fullscreen")

  testtags.extend(f"anaconda_main_hub_{fsys}" for fsys in ('language_support', 'selec_packages',

  'time_date', 'create_user','keyboard_layout'))

+ for selection in ("hide", "maximize", "restore"):

+     testtags.append(f"calculator_context_{selection}")

  

  # retcode tracker

  ret = 0
@@ -251,6 +253,7 @@ 

      needletags.update(needlejson["tags"])

      if any(tag in testtags for tag in needlejson["tags"]):

          continue

+     print(needlepath)

      unused.append(needlepath)

  

  # check for tags with no needle

file modified
+18 -2
@@ -1374,10 +1374,11 @@ 

      # Launch an application in a graphical environment, by opening a

      # launcher, typing the specified string and hitting enter. Pass

      # the string to be typed to launch whatever it is you want.

-     my $app = shift;

+     my ($app, $maximize) = @_;

+     my $desktop = get_var("DESKTOP");

      # To overcome BZ2097208, let's move the mouse out of the way

      # and give the launcher some time to take the correct focus.

-     if (get_var("DESKTOP") eq "kde") {

+     if ($desktop eq "kde") {

          diag("Moving the mouse away from the launcher.");

          mouse_set(1, 1);

      }
@@ -1389,6 +1390,21 @@ 

      wait_still_screen 2;

      send_key 'ret';

      wait_still_screen 3;

+     diag("Launcher: The application $app should have been launched.");

+     # If we should maximize the application

+     if ($maximize) {

+         if ($desktop eq "kde") {

+             send_key('super-pgup');

+         }

+         elsif ($desktop eq 'gnome') {

+             send_key('super-up');

+         }

+         else {

+             diag('Maximizing in this desktop is not supported at the moment!');

+         }

+         wait_still_screen 3;

+         diag("Maximizer: The application should have been maximized.");

+     }

  }

  

  sub tell_source {

@@ -0,0 +1,25 @@ 

+ {

+   "area": [

+     {

+       "width": 38,

+       "ypos": 112,

+       "type": "match",

+       "height": 16,

+       "xpos": 1

+     },

+     {

+       "type": "match",

+       "height": 14,

+       "xpos": 104,

+       "width": 10,

+       "ypos": 113

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "root_logged_in",

+     "root_console",

+     "ENV-DISTRI-fedora",

+     "ENV-FLAVOR-server"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 457,

+       "height": 18,

+       "type": "match",

+       "ypos": 118,

+       "width": 110

+     },

+     {

+       "width": 60,

+       "ypos": 116,

+       "xpos": 172,

+       "type": "match",

+       "height": 18

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "apps_run_text_editor"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 457,

+       "ypos": 118,

+       "width": 110,

+       "height": 18,

+       "type": "match"

+     },

+     {

+       "xpos": 172,

+       "ypos": 116,

+       "width": 60,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "apps_run_text_editor"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "properties": [],

+   "tags": [

+     "clocks_location_access"

+   ],

+   "area": [

+     {

+       "xpos": 383,

+       "ypos": 306,

+       "width": 138,

+       "height": 22,

+       "type": "match",

+       "match": "94"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
needles/gnome/apps/navigation/apps_run_tuxracer.json needles/gnome/apps/navigation/navigation_files_fullscreen-20240408.json
file renamed
+5 -5
@@ -1,15 +1,15 @@ 

  {

    "area": [

      {

-       "xpos": 4,

-       "ypos": 4,

-       "width": 124,

-       "height": 65,

+       "xpos": 422,

+       "ypos": 53,

+       "width": 68,

+       "height": 33,

        "type": "match"

      }

    ],

    "properties": [],

    "tags": [

-     "navigation_files_fullscreen"

+     "apps_run_tuxracer"

    ]

  } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 335,

+       "ypos": 190,

+       "width": 35,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_context_hide"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 336,

+       "ypos": 229,

+       "width": 68,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_context_maximize"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 516,

+       "ypos": 150,

+       "width": 56,

+       "height": 23,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_context_restore"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "ypos": 5,

+       "height": 64,

+       "width": 89,

+       "xpos": 929,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_maximized"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 929,

+       "ypos": 5,

+       "width": 89,

+       "height": 64,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_maximized"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
needles/gnome/apps/navigation/calculator_select_hidden-20240624.json needles/gnome/apps/navigation/navigation_editor_fullscreen-20230929.json
file renamed
+5 -5
@@ -1,15 +1,15 @@ 

  {

    "area": [

      {

-       "ypos": 1,

        "type": "match",

-       "xpos": 6,

-       "height": 67,

-       "width": 82

+       "height": 77,

+       "xpos": 433,

+       "width": 91,

+       "ypos": 436

      }

    ],

    "properties": [],

    "tags": [

-     "navigation_editor_fullscreen"

+     "calculator_select_hidden"

    ]

  } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 433,

+       "ypos": 436,

+       "width": 91,

+       "height": 77,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_select_hidden"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 470,

+       "ypos": 27,

+       "width": 59,

+       "height": 44,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_tiled_left"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
needles/gnome/apps/navigation/calculator_tiled_right-20240624.json needles/gnome/apps/navigation/navigation_files_fullscreen-20240424.json
file renamed
+5 -5
@@ -1,15 +1,15 @@ 

  {

    "area": [

      {

-       "ypos": 4,

        "type": "match",

-       "height": 65,

-       "xpos": 4,

-       "width": 124

+       "height": 46,

+       "xpos": 506,

+       "width": 83,

+       "ypos": 25

      }

    ],

    "properties": [],

    "tags": [

-     "navigation_files_fullscreen"

+     "calculator_tiled_right"

    ]

  } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 506,

+       "ypos": 25,

+       "width": 83,

+       "height": 46,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_tiled_right"

+   ]

+ } 

\ No newline at end of file

needles/gnome/apps/navigation/calculator_title_bar-20240624.json needles/gnome/apps/navigation/navigation_navibar_editor-20240409.json
file renamed
+5 -5
@@ -1,15 +1,15 @@ 

  {

    "area": [

      {

-       "width": 121,

+       "width": 49,

+       "ypos": 124,

        "type": "match",

-       "height": 50,

-       "xpos": 728,

-       "ypos": 353

+       "height": 17,

+       "xpos": 280

      }

    ],

    "properties": [],

    "tags": [

-     "navigation_navibar_editor"

+     "calculator_title_bar"

    ]

  } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 280,

+       "ypos": 124,

+       "width": 49,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_title_bar"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "ypos": 124,

+       "width": 72,

+       "height": 19,

+       "type": "match",

+       "xpos": 208

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_upper_edge"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 209,

+       "ypos": 124,

+       "width": 72,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "calculator_upper_edge"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "width": 113,

+       "ypos": 44,

+       "type": "match",

+       "height": 21,

+       "xpos": 294,

+       "match": 94

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "editor_inactive"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 294,

+       "ypos": 44,

+       "width": 113,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "editor_inactive"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 794,

+       "ypos": 102,

+       "width": 48,

+       "height": 153,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "files_inactive"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 88,

+       "type": "match",

+       "ypos": 89,

+       "width": 17,

+       "height": 18

+     },

+     {

+       "xpos": 991,

+       "type": "match",

+       "ypos": 88,

+       "width": 17,

+       "height": 18

+     },

+     {

+       "xpos": 380,

+       "height": 17,

+       "type": "match",

+       "width": 19,

+       "ypos": 124

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "firefox",

+     "browser",

+     "apps_run_firefox"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 14,

+       "ypos": 320,

+       "width": 69,

+       "height": 19,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "gnome_filedialogue_videos"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,22 @@ 

+ {

+   "area": [

+     {

+       "ypos": 723,

+       "width": 103,

+       "height": 27,

+       "type": "match",

+       "xpos": 534

+     },

+     {

+       "type": "match",

+       "height": 34,

+       "xpos": 561,

+       "width": 40,

+       "ypos": 424

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "navigation_details_notloaded"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,22 @@ 

+ {

+   "area": [

+     {

+       "xpos": 530,

+       "ypos": 558,

+       "type": "match",

+       "width": 103,

+       "height": 27

+     },

+     {

+       "width": 40,

+       "type": "match",

+       "ypos": 424,

+       "height": 34,

+       "xpos": 561

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "navigation_details_shown"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 554,

+       "ypos": 528,

+       "width": 78,

+       "height": 220,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "navigation_details_shown"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 746,

+       "ypos": 362,

+       "width": 89,

+       "height": 45,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "navigation_navibar_text_editor"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 447,

+       "height": 38,

+       "type": "match",

+       "width": 127,

+       "ypos": 98

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "navigation_three_workspaces"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 2,

+       "ypos": 246,

+       "width": 88,

+       "height": 14,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "terminal_prompt"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 3,

+       "ypos": 244,

+       "width": 88,

+       "height": 16,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "terminal_prompt"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 318,

+       "ypos": 367,

+       "width": 91,

+       "height": 23,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "tuxracer_bunnyhill"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 257,

+       "ypos": 308,

+       "width": 120,

+       "height": 32,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "tuxracer_bunnyhill"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 316,

+       "ypos": 180,

+       "width": 108,

+       "height": 74,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "tuxracer_menu"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 329,

+       "ypos": 69,

+       "width": 147,

+       "height": 97,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "tuxracer_menu"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 962,

+       "ypos": 45,

+       "width": 37,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_add_button"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 26,

+       "ypos": 105,

+       "width": 107,

+       "height": 20,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_add_local_video"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 14,

+       "ypos": 44,

+       "width": 22,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_add_video"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 434,

+       "ypos": 684,

+       "width": 149,

+       "height": 46,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_first_stop"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "width": 80,

+       "ypos": 6,

+       "type": "match",

+       "height": 107,

+       "xpos": 879

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_fullscreen_off"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "type": "match",

+       "height": 107,

+       "ypos": 6,

+       "xpos": 879,

+       "width": 80

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_fullscreen_off"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 472,

+       "ypos": 44,

+       "width": 80,

+       "height": 62,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_fullscreen_off"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 471,

+       "type": "match",

+       "ypos": 5,

+       "width": 85,

+       "height": 21

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_fullscreen_on"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 471,

+       "ypos": 5,

+       "width": 85,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_fullscreen_on"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 30,

+       "height": 278,

+       "ypos": 102,

+       "type": "match",

+       "width": 251

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_grid_shown"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "ypos": 105,

+       "width": 251,

+       "height": 278,

+       "type": "match",

+       "xpos": 29

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_grid_shown"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 30,

+       "ypos": 103,

+       "width": 251,

+       "height": 278,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_grid_shown"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "height": 107,

+       "type": "match",

+       "ypos": 342,

+       "width": 92,

+       "xpos": 103

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_second_stop"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 464,

+       "ypos": 178,

+       "width": 92,

+       "height": 107,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_second_stop"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 319,

+       "ypos": 164,

+       "width": 83,

+       "height": 20,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "video_third_stop"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -7,23 +7,27 @@ 

  

  sub run {

      my $self = shift;

+     my $version = get_release_number();

+     my $user = get_var("USER_LOGIN", "test");

+     my $canned = get_var("CANNED");

      # Let us wait here for a couple of seconds to give the VM time to settle.

      # Starting right over might result in erroneous behavior.

      sleep(5);

-     # Start Firefox

-     menu_launch_type("nautilus");

-     assert_screen "apps_run_files", 45;

-     # let it settle a bit

-     wait_still_screen(stilltime => 5, similarity_level => 45);

-     send_key("super-up");

-     assert_screen("navigation_files_fullscreen");

- 

-     # Start Gnome Text Editor

-     menu_launch_type("text-editor");

-     assert_screen("apps_run_editor");

-     wait_still_screen(2);

-     send_key("super-up");

-     assert_screen("navigation_editor_fullscreen");

+     # Change to root console, install a game package,

+     # download testdata, and return to the desktop environment.

+     $self->root_console(tty => 3);

+     if ($canned) {

+         assert_script_run('flatpak install -y net.sourceforge.ExtremeTuxRacer', timeout => 300);

+         # On Silverblue, Totem is not installed by default. Install it.

+         assert_script_run('flatpak install -y org.gnome.Totem', timeout => 300);

+     }

+     else {

+         assert_script_run("dnf install -y extremetuxracer", timeout => 180);

+     }

+     assert_script_run("curl -O https://pagure.io/fedora-qa/openqa_testdata/blob/thetree/f/video/video.ogv", timeout => 120);

+     # Put the downloaded video in the Videos folder

+     assert_script_run("mv video.ogv /home/$user/Videos/");

+     desktop_vt();

  }

  

  sub test_flags {

@@ -0,0 +1,51 @@ 

+ use base "installedtest";

+ use strict;

+ use testapi;

+ use utils;

+ 

+ # This will test that

+ # - application can be toggled between full screen and normal view

+ 

+ sub run {

+     my $self = shift;

+     # Settle in for a while

+     sleep(5);

+     # The full screen is not supported by any application, but it

+     # is supported by several, such as Terminal.

+     menu_launch_type("terminal", "maximize");

+     # If we see prompt, everything is ok.

+     assert_screen("terminal_prompt");

+ 

+     # When the application is maximised but not full screen,

+     # the panel controls should be visible.

+     assert_screen("panel_controls");

+ 

+     # F11 will trigger the full screen mode, the panel controls

+     # should no longer be visible, but the page content should

+     # still be visible.

+     send_key("f11");

+ 

+     # We still need to see the prompt.

+     assert_screen("terminal_prompt");

+     # But we should not see the panels.

+     if (check_screen("panel_controls")) {

+         die("It seems that full screen mode has not been triggered correctly.");

+     }

+ 

+     # Another F11 will trigger that full screen mode off. The panel

+     # controls will be visible again and the page content, too.

+     send_key("f11");

+     assert_screen("terminal_prompt");

+     assert_screen("panel_controls");

+ }

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

+ 

+ 

+ 

@@ -11,6 +11,10 @@ 

      # Let us wait here for a couple of seconds to give the VM time to settle.

      # Starting right over might result in erroneous behavior.

      sleep(5);

+     menu_launch_type("text editor", "maximize");

+     assert_screen("apps_run_texteditor");

+     menu_launch_type("files", "maximize");

+     assert_screen("apps_run_files");

  

      # If we are at Nautilus switch to editor

      if (check_screen("apps_run_files")) {
@@ -24,7 +28,16 @@ 

      hold_key("alt");

      send_key("tab");

      send_key("~");

-     assert_screen("navigation_details_shown");

+     # Sometimes, the details take a time to load,

+     # if that happens, fail softly.

+     unless (check_screen('navigation_details_shown', timeout => 30)) {

+         if (check_screen('navigation_details_notloaded')) {

+             record_soft_failure('Window details not loaded in time.');

+         }

+     }

+     else {

+         assert_screen("navigation_details_shown", timeout => 60);

+     }

      release_key("alt");

  }

  

@@ -0,0 +1,112 @@ 

+ use base "installedtest";

+ use strict;

+ use testapi;

+ use utils;

+ 

+ # This will test that

+ # - a game can be played both full screen or normal

+ 

+ sub send_tab_to_select {

+     my $times = shift;

+     foreach (1 .. $times) {

+         send_key("tab");

+         sleep(1);

+     }

+     send_key("ret");

+     sleep(2);

+ }

+ 

+ sub go_tux {

+     my $time = shift // 20;

+     while ($time > 0) {

+         hold_key("up");

+         sleep(1);

+         release_key("up");

+         sleep(3);

+         $time -= 1;

+     }

+ }

+ 

+ sub run {

+     my $self = shift;

+ 

+     # Open the game

+     menu_launch_type("tux racer");

+     assert_screen("apps_run_tuxracer");

+ 

+     # Check that it has started in the fullscreen mode.

+     if (check_screen("panel_controls")) {

+         record_soft_failure("The game should have started in full screen mode.");

+     }

+     # Select new game. The background changes like hell,

+     # and the mouse does not work particularly well

+     # without 3d acceleration, so we need to rely

+     # on keyboard.

+     # Take what is offered.

+     send_tab_to_select(2);

+     assert_screen('tuxracer_menu');

+     # Navigate to start the practice

+     send_tab_to_select(1);

+     assert_screen('tuxracer_bunnyhill');

+     # Navigate to start the race.

+     send_tab_to_select(6);

+     # Wait a little bit to start the race

+     sleep(5);

+ 

+     # Try to play the game.

+     # This is sending a forward key intermittently

+     # to slide to slope towards the finish. As it is difficult

+     # to make sure Tux finishes in the right place and because

+     # the game graphics changes a lot, we need to check whether

+     # the screen changes and when it stops changing for some

+     # time, we could assume that we have finished the game.

+     assert_screen_change(sub { go_tux(30) }, timeout => 10);

+     # Then hit to come back to the Race settings.

+     send_key('esc');

+     assert_screen('tuxracer_bunnyhill');

+     sleep(2);

+     # One more escape to come to the menu.

+     send_key('esc');

+     assert_screen('tuxracer_menu');

+     # Navigate to Configuration and switch off full screen.

+     send_tab_to_select(2);

+     # Hit space to switch off full screen.

+     send_key('spc');

+     sleep(1);

+     # Go and press OK.

+     send_tab_to_select(7);

+ 

+     # Now the application should be in non-fs mode,

+     # so we should be able to see the Gnome panel

+     assert_screen("panel_controls");

+ 

+     # Start the game again.

+     send_tab_to_select(1);

+     assert_screen('tuxracer_bunnyhill');

+     send_tab_to_select(6);

+     sleep(5);

+ 

+     # Play it as before.

+     assert_screen_change(sub { go_tux(30) }, timeout => 10);

+ 

+     # Send Esc

+     send_key('esc');

+     assert_screen('tuxracer_bunnyhill');

+ 

+     send_key('esc');

+     assert_screen('tuxracer_menu');

+ 

+     # Quit game

+     send_tab_to_select(6);

+ }

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

+ 

+ 

+ 

@@ -0,0 +1,79 @@ 

+ use base "installedtest";

+ use strict;

+ use testapi;

+ use utils;

+ 

+ # This will test that

+ # - a video can be played both full screen or normal

+ 

+ sub run {

+     my $self = shift;

+     # Start the Video player

+     menu_launch_type("videos");

+     assert_screen("apps_run_videos");

+     # The Video player should start with a grid view

+     # of videos, check that it runs and that the

+     # video is displayed in that view or we will add

+     # the video to the grid.

+     unless (check_screen("video_grid_shown")) {

+         assert_and_click("video_add_video");

+         assert_and_click("video_add_local_video");

+         wait_still_screen(3);

+         assert_and_click("gnome_filedialogue_videos");

+         assert_and_click("video_add_button");

+     }

+     assert_screen("video_grid_shown");

+     # We will start the Video by clicking on the icon

+     click_lastmatch();

+     # The Video should not start in the full screen mode

+     # therefore, we check for panel controls.

+     assert_screen("panel_controls");

+     # We wait for a couple of seconds and then we try

+     # to stop the video to make some screen assertion.

+     sleep(3);

+     # Stop the Video

+     send_key("spc");

+     # Check that correct picture is shown.

+     assert_screen("video_first_stop");

+     # Continue, wait three seconds, stop and repeat.

+     send_key("spc");

+     sleep(3);

+     # Stop the video for the second time.

+     send_key("spc");

+     assert_screen("video_second_stop");

+     # Continue and switch to full screen

+     send_key("spc");

+     sleep(1);

+     send_key("f");

+     # And stop the video

+     send_key("spc");

+     # We should be in the full screen

+     # mode and no panels should be visible.

+     assert_screen("video_fullscreen_on");