#323 Extend the Navigation test for QA:Testcase_window_manager.
Opened 14 days ago by lruzicka. Modified 5 hours ago

file modified
+3
@@ -230,6 +230,8 @@ 

  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

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

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

+ {

+   "area": [

+     {

+       "width": 49,

+       "ypos": 124,

+       "type": "match",

+       "height": 17,

+       "xpos": 280

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "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": 480,

+       "ypos": 582,

+       "width": 64,

+       "height": 20,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "firefox_skip_wallpaper"

+   ]

+ } 

\ No newline at end of file

@@ -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": 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": 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": [

+     {

+       "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 $subvariant = get_var("SUBVARIANT");

      # 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 ($subvariant eq 'Silverblue') {

+         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("wget 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,61 @@ 

+ 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. It is supported

+     # by Firefox. Therefore, we will use Firefox to test this feature.

+     menu_launch_type("firefox");

+     assert_screen("apps_run_firefox");

+     if (check_screen("firefox_skip_wallpaper", timeout => 30)) {

+         click_lastmatch();

+     }

+     # Maximize the application

+     send_key('super-up');

+ 

+     # Let us navigate to a certain page.

+     send_key('ctrl-l');

+     sleep(1);

+     type_very_safely("accounts.fedoraproject.org\n");

+ 

+     # The page should have opened.

+     assert_screen("browser_fas_home");

+ 

+     # Also the Gnome panel should be visible, so we check

+     # for the controls.

+     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");

+ 

+     assert_screen("browser_fas_home");

+     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("browser_fas_home");

+     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");

+     send_key('super-up');

+     menu_launch_type("files");

+     send_key('super-up');

  

      # 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,115 @@ 

+ 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 // 90;

+     while ($time > 0) {

+         my @keys = qw( right left );

+         my $key = $keys[rand(@keys)];

+         hold_key("up");

+         sleep(1);

+         release_key("up");

+         #send_key($key);

+         sleep(2);

+         $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,78 @@ 

+ 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");

+     # 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");

+     # Start the video again.

+     send_key("spc");

+     sleep(2);

+     send_key("spc");

+     assert_screen("video_third_stop");

+     # Continue playing, make video not

+     # full screen again, check the panels.

+     send_key("spc");

+     sleep(1);

+     send_key("f");

+     send_key("spc");

+     assert_screen("video_fullscreen_off", timeout => 3);

+     # Finish the video and check the content

+     send_key("spc");

+     assert_screen_change(sub { sleep(1) }, timeout => 2);

+ }

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

+ 

+ 

+ 

@@ -62,6 +62,8 @@ 

      my $self = shift;

  

      ### Switch between two applications

+     menu_launch_type("files");

+     menu_launch_type("text editor");

      # From the setup script, we should be seeing the editor

      # window.

      # Switch to the other application.
@@ -72,6 +74,12 @@ 

      send_key("alt-tab");

      assert_screen("apps_run_editor");

  

+     # Switch by clicking on the certain application.

+     assert_and_click("files_inactive");

+     assert_screen("apps_run_files");

+     assert_and_click("editor_inactive");

+     assert_screen("apps_run_editor");

+ 

      ### Switch between more applications

  

      # Start more applications.

@@ -27,6 +27,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("files");

+     send_key('super-up');

+     menu_launch_type("text editor");

+     send_key('super-up');

  

      # The focused application should be the Editor, so let's check it is

      # visible on the beginning screen. Then switch to another workplace.

@@ -0,0 +1,103 @@ 

+ use base "installedtest";

+ use strict;

+ use testapi;

+ use utils;

+ 

+ # This will test that

+ # - window can be maximized

+ # - window can be minimized

+ # - window can be restored to the previous size

+ # - window can be moved across screen

+ # - window can be tiled left, right, up, down

+ # - window can be resized

+ # - window can be closed

+ 

+ sub use_menu {

+     my $selection = shift;

+     assert_and_click("calculator_title_bar", button => 'right');

+     assert_and_click("calculator_context_$selection");

+     wait_still_screen(2);

+ }

+ 

+ sub run {

+     my $self = shift;

+     my $version = get_release_number();

+     sleep(5);

+ 

+     # Let's start a new application. We'll go with Calculator,

+     # because it has a small window that fits nicely into

+     # a small screen we use in openQA.

+     menu_launch_type("calculator");

+     assert_screen("apps_run_calculator");

+ 

+     # Maximize the application - right click and select from

+     # the context menu.

+     use_menu('maximize');

+     assert_screen("calculator_maximized");

+ 

+     # Restore the application - right click and select from

+     # the context menu.

+     use_menu('restore');

+     # If we are still maximized, it did not work -> die

+     if (check_screen('calculator_maximized', timeout => 5)) {

+         die("The application should have been restored via menu, but is not.");

+     }

+ 

+     # Hide the application - right click and select from

+     # the context menu.

+     use_menu('hide');

+     # Check that we see the application, if so, it did not work

+     # and we die.

+     if (check_screen('apps_run_calculator', timeout => 5)) {

+         die("The application should have been hidden via menu, but is not.");

+     }

+ 

+     # Unhide the application

+     send_key('super');

+     sleep(2);

+     assert_and_click('calculator_select_hidden');

+     assert_screen('apps_run_calculator');

+ 

+     # Maximise the application using a double click.

+     assert_and_dclick("calculator_upper_edge");

+     assert_screen("calculator_maximized");

+ 

+     # Restore using a double click.

+     assert_and_dclick("calculator_upper_edge");

+     if (check_screen("calculator_maximized", timeout => 5)) {

+         die("The application should have been restored via click, but is not.");

+     }

+ 

+     # Maximise the application using a short cut

+     send_key("super-up");

+     assert_screen('calculator_maximized');

+ 

+     # Restore using short cut

+     send_key("super-down");

+     if (check_screen("calculator_maximized")) {

+         die("The application should have been restored via keyboard, but is not.");

+     }

+ 

+     # Tile the application to left side

+     send_key("super-left");

+     assert_screen("calculator_tiled_left");

+ 

+     # Tile the application to the right side

+     send_key("super-right");

+     assert_screen("calculator_tiled_right");

+ 

+     # Close the window.

+     send_key("alt-f4");

+     check_desktop();

+ }

+ 

+ sub test_flags {

+     return {always_rollback => 1};

+ }

+ 

+ 1;

+ 

+ # vim: set sw=4 et:

+ 

+ 

+ 

This PR extends the Navigation test to comply more with the above test case for Window manager and attempts to fix issue #301.

rebased onto 943c419

13 days ago

rebased onto 356ee97

7 days ago

rebased onto 356ee97

7 days ago

1 new commit added

  • Retry if Fonts wont start
7 days ago

1 new commit added

  • Prolong check timeout
7 days ago

1 new commit added

  • Fix for Silverblue.
7 days ago

1 new commit added

  • Extend the Navigation test for QA:Testcase_window_manager.
7 days ago

Rebased and deployed on lab for testing.

rebased onto 6a4ed83

5 days ago

rebased onto 73b8eac

4 days ago

this does not work on Silverblue. https://openqa.stg.fedoraproject.org/tests/3980160#step/aaa_setup/7 . you'll need to overlay it, or use a flatpak, or something.

you can't unconditionally assert the background as we usually do not have a background for rawhide. if you want to make sure we got back to the desktop, call check_desktop, but we don't usually do that after calling desktop_vt(), it's fairly reliable...

It failed on all variants on Rawhide due to the above two issues.

rebased onto c8de083

2 days ago

1 new commit added

  • Use Flatpak on Silverblue and stop doing desktop background checking.
2 days ago

1 new commit added

  • Tidy _boot_to_anaconda.pm
2 days ago

1 new commit added

  • Use 'text editor' to launch editor app.
2 days ago

1 new commit added

  • Install Totem on Silverblue.
2 days ago

1 new commit added

  • Dismiss wallpaper selection if it appears.
2 days ago

1 new commit added

  • Prolong wait time for navigation.
2 days ago

1 new commit added

  • Use shortened version for launch.
2 days ago

1 new commit added

  • The same with a different file.
2 days ago

1 new commit added

  • Softfail when details not loaded.
2 days ago

1 new commit added

  • Check desktop correctly.
2 days ago

1 new commit added

  • Fix the command name.
2 days ago

1 new commit added

  • Add needles which have been failing.
2 days ago

rebased onto c8de083

2 days ago

rebased onto c8de083

2 days ago

rebased onto c8de083

2 days ago

rebased onto c8de083

2 days ago

1 new commit added

  • Do not maximize
2 days ago

Thanks, it failed for more reasons on Silverblue, I am working on it.

rebased onto f3f1299

a day ago

1 new commit added

  • Add needles which have failed on WS.
21 hours ago

rebased onto f3f1299

21 hours ago

rebased onto 527210e

21 hours ago

Metadata Update from @lruzicka:
- Request assigned

21 hours ago

I hope that this will now work on both WS and Silverblue. I will switch it on on Staging.

rebased onto 99074fa

13 hours ago
  • I'd prefer if (get_var("CANNED")) to if ($subvariant eq 'Silverblue'). Silverblue is not the only Atomic variant; we don't test other atomic desktops ATM but we may in future. We use CANNED as the canonical indicator of whether we're testing an atomic/ostree system or not.
  • I tend to prefer using curl to wget as curl seems to be more guaranteed to be present; wget is a bit more optional. In practice it's in Workstation ATM, but it seems less of a sure bet that it will always be in everything we test.
  • I'd prefer we don't do the firefox_skip_wallpaper thing. These Firefox startup things are a menace, but the preferred way to deal with them is by wrangling settings in disable_firefox_studies (that's why I was fiddling with it a few days ago). The problem with doing it via needles is there are a lot of places we start firefox and we'd have to patch them all, and these things constantly change and it's a pain to keep up with the needles (and the check_screen is slow - any time we don't hit that screen, it delays this test for 30 seconds, for instance). I didn't figure out a setting that kills this one yet, but we also didn't see it break any tests for a day or two, so I'm hoping maybe it's gone away naturally somehow. If we really wind up having to deal with this using a needle, we should make it a separate PR and somehow apply it to all the places we run firefox, not just here.
  • We now maximize windows at the start of navigation_details.pm and switch_workplaces.pm instead of in aaa_setup.pm, but we seem to be a lot more casual about it - we don't check the app started before maximizing, we don't check the maximize worked. Is that safe? Seems like we had the checks before for a reason? Also, we now re-launch apps three times and maximize them twice...it'd be nice to factor this out as before if possible, but maybe it's not practical to set a snapshot point that works for everything?
  • go_tux seems to have two fighting implementations within it - the whole my @keys and my $key bit isn't actually used because the #send_key($key); line is commented out. All it does is hold 'up' for a bit, then release it and wait for a bit, over and over until the counter expires. Can you decide which implementation you actually want there and remove traces of the one you don't want?
  • I'm not sure the tuxracer test is very strong, ultimately we only assert that the screen changed twice and the menus work. It may be the best we can do, but...is there maybe a more deterministic game we can use? I was just fixing one called pychess this morning, maybe something board game-y like that? If not I guess we'll just have to live with it.

Apart from those notes this is looking good, thanks!

Metadata
Changes Summary 96
+3 -0
file changed
check-needles.py
+5 -5
file renamed
needles/gnome/apps/navigation/navigation_files_fullscreen-20240408.json
needles/gnome/apps/navigation/apps_run_tuxracer.json
+0
file added
needles/gnome/apps/navigation/apps_run_tuxracer.png
+15
file added
needles/gnome/apps/navigation/calculator_context_hide-20240624.json
+0
file added
needles/gnome/apps/navigation/calculator_context_hide-20240624.png
+15
file added
needles/gnome/apps/navigation/calculator_context_maximize.json
+0
file added
needles/gnome/apps/navigation/calculator_context_maximize.png
+15
file added
needles/gnome/apps/navigation/calculator_context_restore-20240624.json
+0
file added
needles/gnome/apps/navigation/calculator_context_restore-20240624.png
+15
file added
needles/gnome/apps/navigation/calculator_maximized-nonet.json
+0
file added
needles/gnome/apps/navigation/calculator_maximized-nonet.png
+15
file added
needles/gnome/apps/navigation/calculator_maximized.json
+0
file added
needles/gnome/apps/navigation/calculator_maximized.png
+5 -5
file renamed
needles/gnome/apps/navigation/navigation_editor_fullscreen-20230929.json
needles/gnome/apps/navigation/calculator_select_hidden-20240624.json
+0
file added
needles/gnome/apps/navigation/calculator_select_hidden-20240624.png
+15
file added
needles/gnome/apps/navigation/calculator_select_hidden.json
+0
file added
needles/gnome/apps/navigation/calculator_select_hidden.png
+15
file added
needles/gnome/apps/navigation/calculator_tiled_left.json
+0
file added
needles/gnome/apps/navigation/calculator_tiled_left.png
+5 -5
file renamed
needles/gnome/apps/navigation/navigation_files_fullscreen-20240424.json
needles/gnome/apps/navigation/calculator_tiled_right-20240624.json
+0
file added
needles/gnome/apps/navigation/calculator_tiled_right-20240624.png
+15
file added
needles/gnome/apps/navigation/calculator_tiled_right.json
+0
file added
needles/gnome/apps/navigation/calculator_tiled_right.png
+15
file added
needles/gnome/apps/navigation/calculator_title_bar-20240624.json
+0
file added
needles/gnome/apps/navigation/calculator_title_bar-20240624.png
+15
file added
needles/gnome/apps/navigation/calculator_title_bar.json
+0
file added
needles/gnome/apps/navigation/calculator_title_bar.png
+15
file added
needles/gnome/apps/navigation/calculator_upper_edge-20240624.json
+0
file added
needles/gnome/apps/navigation/calculator_upper_edge-20240624.png
+15
file added
needles/gnome/apps/navigation/calculator_upper_edge.json
+0
file added
needles/gnome/apps/navigation/calculator_upper_edge.png
+16
file added
needles/gnome/apps/navigation/editor_inactive-20240624.json
+0
file added
needles/gnome/apps/navigation/editor_inactive-20240624.png
+15
file added
needles/gnome/apps/navigation/editor_inactive.json
+0
file added
needles/gnome/apps/navigation/editor_inactive.png
+15
file added
needles/gnome/apps/navigation/files_inactive.json
+0
file added
needles/gnome/apps/navigation/files_inactive.png
+31
file added
needles/gnome/apps/navigation/firefox-20240610.json
+0
file added
needles/gnome/apps/navigation/firefox-20240610.png
+15
file added
needles/gnome/apps/navigation/firefox_skip_wallpaper.json
+0
file added
needles/gnome/apps/navigation/firefox_skip_wallpaper.png
+15
file added
needles/gnome/apps/navigation/gnome_filedialogue_videos.json
+0
file added
needles/gnome/apps/navigation/gnome_filedialogue_videos.png
+22
file added
needles/gnome/apps/navigation/navigation_details_notloaded.json
+0
file added
needles/gnome/apps/navigation/navigation_details_notloaded.png
+22
file added
needles/gnome/apps/navigation/navigation_details_shown-20240610.json
+0
file added
needles/gnome/apps/navigation/navigation_details_shown-20240610.png
+15
file added
needles/gnome/apps/navigation/navigation_details_shown-20240624.json
+0
file added
needles/gnome/apps/navigation/navigation_details_shown-20240624.png
-0
file removed
needles/gnome/apps/navigation/navigation_editor_fullscreen-20230929.png
-0
file removed
needles/gnome/apps/navigation/navigation_files_fullscreen-20240408.png
-0
file removed
needles/gnome/apps/navigation/navigation_files_fullscreen-20240424.png
+15
file added
needles/gnome/apps/navigation/navigation_three_workspaces-20240610.json
+0
file added
needles/gnome/apps/navigation/navigation_three_workspaces-20240610.png
+15
file added
needles/gnome/apps/navigation/tuxracer_bunnyhill-smaller.json
+0
file added
needles/gnome/apps/navigation/tuxracer_bunnyhill-smaller.png
+15
file added
needles/gnome/apps/navigation/tuxracer_bunnyhill.json
+0
file added
needles/gnome/apps/navigation/tuxracer_bunnyhill.png
+15
file added
needles/gnome/apps/navigation/tuxracer_menu-smaller.json
+0
file added
needles/gnome/apps/navigation/tuxracer_menu-smaller.png
+15
file added
needles/gnome/apps/navigation/tuxracer_menu.json
+0
file added
needles/gnome/apps/navigation/tuxracer_menu.png
+15
file added
needles/gnome/apps/navigation/video_add_button.json
+0
file added
needles/gnome/apps/navigation/video_add_button.png
+15
file added
needles/gnome/apps/navigation/video_add_local_video.json
+0
file added
needles/gnome/apps/navigation/video_add_local_video.png
+15
file added
needles/gnome/apps/navigation/video_add_video.json
+0
file added
needles/gnome/apps/navigation/video_add_video.png
+15
file added
needles/gnome/apps/navigation/video_first_stop.json
+0
file added
needles/gnome/apps/navigation/video_first_stop.png
+15
file added
needles/gnome/apps/navigation/video_fullscreen_off.json
+0
file added
needles/gnome/apps/navigation/video_fullscreen_off.png
+15
file added
needles/gnome/apps/navigation/video_fullscreen_on-20240610.json
+0
file added
needles/gnome/apps/navigation/video_fullscreen_on-20240610.png
+15
file added
needles/gnome/apps/navigation/video_fullscreen_on.json
+0
file added
needles/gnome/apps/navigation/video_fullscreen_on.png
+15
file added
needles/gnome/apps/navigation/video_grid_shown-20240610.json
+0
file added
needles/gnome/apps/navigation/video_grid_shown-20240610.png
+15
file added
needles/gnome/apps/navigation/video_grid_shown-20240624.json
+0
file added
needles/gnome/apps/navigation/video_grid_shown-20240624.png
+15
file added
needles/gnome/apps/navigation/video_grid_shown.json
+0
file added
needles/gnome/apps/navigation/video_grid_shown.png
+15
file added
needles/gnome/apps/navigation/video_second_stop-20240610.json
+0
file added
needles/gnome/apps/navigation/video_second_stop-20240610.png
+15
file added
needles/gnome/apps/navigation/video_second_stop.json
+0
file added
needles/gnome/apps/navigation/video_second_stop.png
+15
file added
needles/gnome/apps/navigation/video_third_stop.json
+0
file added
needles/gnome/apps/navigation/video_third_stop.png
+18 -14
file changed
tests/applications/navigation/aaa_setup.pm
+61
file added
tests/applications/navigation/full_screen.pm
+14 -1
file changed
tests/applications/navigation/navigation_details.pm
+115
file added
tests/applications/navigation/play_game.pm
+78
file added
tests/applications/navigation/play_video.pm
+8 -0
file changed
tests/applications/navigation/switch_application.pm
+4 -0
file changed
tests/applications/navigation/switch_workplaces.pm
+103
file added
tests/applications/navigation/window_operations.pm