#368 Use the new features of menu_launch_type in code.
Merged 3 months ago by adamwill. Opened 4 months ago by lruzicka.

file modified
+10 -1
@@ -242,7 +242,16 @@ 

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

  # After the change to menu_launch_type, applications should be whitelisted here

  # to prevent the unused needles warning in case of apps_run_<application>.

- for app in ("focuswriter", "gvim"):

+ for app in ("evince", "focuswriter", "gvim"):

+     testtags.append(f"apps_run_{app}")

+ # Needles that only originate from menu_launch_type and since they only occur

+ # in a variable, we need to whitelist them here, otherwise the script will

+ # report them as unused.

+ runapps = ("seahorse", "kwrite", "tuxracer", "akregator", "ark", "discover", "dolphin",

+            "gwenview", "kaddressbook", "kcalc", "kcharselect", "kfind", "krdc", "ktnef",

+            "kwallet", "kwalletmanager", "neochat", "spectacle", "docviewer", "patience",

+            "kolourpaint", "korganizer", "characters", "tux_racer")

+ for app in runapps:

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

  

  # retcode tracker

file modified
+8 -5
@@ -1366,8 +1366,10 @@ 

      # Use maximize => 1 to maximize the application after it

      # is started.

      # Use checkstart => 1 to check that the application has started

+     # Use timeout => X to override the default timeout (30)

      my ($application, %args) = @_;

      my $desktop = get_var("DESKTOP");

+     my $timeout = $args{timeout} // 30;

  

      # The standard combo key is the "super" key, just in I3

      # it is different.
@@ -1392,11 +1394,6 @@ 

      send_key 'ret';

      wait_still_screen 3;

  

-     # If check that app is running was requested

-     # with checkstart => 1

-     if ($args{checkstart}) {

-         assert_screen("apps_run_$application");

-     }

      # If maximizing the application was requested

      # with maximize => 1

      if ($args{maximize}) {
@@ -1411,6 +1408,12 @@ 

          }

          wait_still_screen 3;

      }

+ 

+     # If check that app is running was requested

+     # with checkstart => 1

+     if ($args{checkstart}) {

+         assert_screen("apps_run_$application", timeout => $timeout);

+     }

  }

  

  sub tell_source {

needles/gnome/apps/apps_menu_video-20210223.json needles/gnome/apps/apps_menu_videos-20210223.json
file renamed
+1 -1
@@ -10,6 +10,6 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_menu_videos"

+     "apps_menu_video"

    ]

  } 

\ No newline at end of file

needles/gnome/apps/apps_menu_video-20210223.png needles/gnome/apps/apps_menu_videos-20210223.png
file renamed
file was moved with no change to the file
needles/gnome/apps/apps_menu_video-showtime-20250422.json needles/gnome/apps/apps_menu_videos-showtime-20250422.json
file renamed
+1 -1
@@ -10,6 +10,6 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_menu_videos"

+     "apps_menu_video"

    ]

  } 

\ No newline at end of file

needles/gnome/apps/apps_menu_video-showtime-20250422.png needles/gnome/apps/apps_menu_videos-showtime-20250422.png
file renamed
file was moved with no change to the file
needles/gnome/apps/apps_run_characters-20220722.json needles/gnome/apps/apps_run_chars-20220722.json
file renamed
+2 -2
@@ -10,6 +10,6 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_chars"

+     "apps_run_characters"

    ]

- } 

\ No newline at end of file

+ }

needles/gnome/apps/apps_run_characters-20220722.png needles/gnome/apps/apps_run_chars-20220722.png
file renamed
file was moved with no change to the file
needles/gnome/apps/apps_run_evince-20210222.json needles/gnome/apps/apps_run_dviewer-20210222.json
file renamed
+3 -2
@@ -10,6 +10,7 @@ 

      ],

      "properties": [],

      "tags": [

-         "apps_run_dviewer"

+         "apps_run_dviewer",

+         "apps_run_evince"

      ]

- } 

\ No newline at end of file

+ }

needles/gnome/apps/apps_run_evince-20210222.png needles/gnome/apps/apps_run_dviewer-20210222.png
file renamed
file was moved with no change to the file
needles/gnome/apps/apps_run_evince-20250319.json needles/gnome/apps/apps_run_dviewer-20250319.json
file renamed
+3 -2
@@ -17,6 +17,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_dviewer"

+     "apps_run_dviewer",

+     "apps_run_evince"

    ]

- } 

\ No newline at end of file

+ }

needles/gnome/apps/apps_run_evince-20250319.png needles/gnome/apps/apps_run_dviewer-20250319.png
file renamed
file was moved with no change to the file
@@ -10,6 +10,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_fmw"

+     "apps_run_fmw",

+     "apps_run_mediawriter"

    ]

- } 

\ No newline at end of file

+ }

@@ -10,6 +10,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_fmw"

+     "apps_run_fmw",

+     "apps_run_mediawriter"

    ]

- } 

\ No newline at end of file

+ }

@@ -10,6 +10,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_imageviewer"

+     "apps_run_imageviewer",

+     "apps_run_loupe"

    ]

- } 

\ No newline at end of file

+ }

@@ -10,6 +10,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_imageviewer"

+     "apps_run_imageviewer",

+     "apps_run_loupe"

    ]

- } 

\ No newline at end of file

+ }

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

    "properties": [],

    "tags": [

      "apps_run_monitor",

-     "apps run systemmonitor"

+     "apps run system_monitor"

    ]

  }

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

    "properties": [],

    "tags": [

      "apps_run_monitor",

-     "apps_run_systemmonitor"

+     "apps_run_system_monitor"

    ]

  }

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

    "properties": [],

    "tags": [

      "apps_run_monitor",

-     "apps_run_systemmonitor"

+     "apps_run_system_monitor"

    ]

  }

@@ -18,6 +18,6 @@ 

    "properties": [],

    "tags": [

      "apps_run_monitor",

-     "apps_run_systemmonitor"

+     "apps_run_system_monitor"

    ]

  }

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

    "properties": [],

    "tags": [

      "apps_run_monitor",

-     "apps_run_systemmonitor"

+     "apps_run_system_monitor"

    ]

- } 

\ No newline at end of file

+ }

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

    "properties": [],

    "tags": [

      "apps_run_monitor",

-     "apps_run_systemmonitor"

+     "apps_run_system_monitor"

    ]

- } 

\ No newline at end of file

+ }

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

    "properties": [],

    "tags": [

      "apps_run_monitor",

-     "apps_run_systemmonitor"

+     "apps_run_system_monitor"

    ]

  }

needles/gnome/apps/apps_run_system_monitor-20250415.json needles/kde/kde_window_maximize.json
file renamed
+11 -4
@@ -1,15 +1,22 @@ 

  {

    "area": [

      {

-       "xpos": 806,

-       "ypos": 94,

-       "width": 15,

+       "xpos": 462,

+       "ypos": 45,

+       "width": 100,

        "height": 21,

        "type": "match"

+     },

+     {

+       "xpos": 44,

+       "ypos": 90,

+       "width": 36,

+       "height": 17,

+       "type": "match"

      }

    ],

    "properties": [],

    "tags": [

-     "kde_window_maximize"

+     "apps_run_system_monitor"

    ]

  } 

\ No newline at end of file

empty or binary file added
@@ -11,6 +11,7 @@ 

    "properties": [],

    "tags": [

      "apps_run_texteditor",

-     "apps_run_editor"

+     "apps_run_editor",

+     "apps_run_text_editor"

    ]

  }

@@ -11,6 +11,7 @@ 

    "properties": [],

    "tags": [

      "apps_run_texteditor",

-     "apps_run_editor"

+     "apps_run_editor",

+     "apps_run_text_editor"

    ]

  }

@@ -11,6 +11,7 @@ 

    "properties": [],

    "tags": [

      "apps_run_texteditor",

-     "apps_run_editor"

+     "apps_run_editor",

+     "apps_run_text_editor"

    ]

- } 

\ No newline at end of file

+ }

@@ -11,6 +11,7 @@ 

    "properties": [],

    "tags": [

      "apps_run_texteditor",

-     "apps_run_editor"

+     "apps_run_editor",

+     "apps_run_text_editor"

    ]

- } 

\ No newline at end of file

+ }

@@ -11,6 +11,7 @@ 

    "properties": [],

    "tags": [

      "apps_run_texteditor",

-     "apps_run_editor"

+     "apps_run_editor",

+     "apps_run_text_editor"

    ]

- } 

\ No newline at end of file

+ }

needles/gnome/apps/apps_run_video-20210716.json needles/gnome/apps/apps_run_videos-20210716.json
file renamed
+1 -1
@@ -10,6 +10,6 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_videos"

+     "apps_run_video"

    ]

  } 

\ No newline at end of file

needles/gnome/apps/apps_run_video-20210716.png needles/gnome/apps/apps_run_videos-20210716.png
file renamed
file was moved with no change to the file
needles/gnome/apps/apps_run_video-20250319.json needles/gnome/apps/apps_run_videos-20250319.json
file renamed
+1 -1
@@ -10,6 +10,6 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_videos"

+     "apps_run_video"

    ]

  } 

\ No newline at end of file

needles/gnome/apps/apps_run_video-20250319.png needles/gnome/apps/apps_run_videos-20250319.png
file renamed
file was moved with no change to the file
needles/gnome/apps/apps_run_video-showtime-20250422.json needles/gnome/apps/apps_run_videos-showtime-20250422.json
file renamed
+1 -1
@@ -10,6 +10,6 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_videos"

+     "apps_run_video"

    ]

  } 

\ No newline at end of file

needles/gnome/apps/apps_run_video-showtime-20250422.png needles/gnome/apps/apps_run_videos-showtime-20250422.png
file renamed
file was moved with no change to the file
@@ -10,6 +10,6 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_tuxracer"

+     "apps_run_tux_racer"

    ]

- } 

\ No newline at end of file

+ }

@@ -19,4 +19,4 @@ 

    "tags": [

      "apps_run_abrt"

    ]

- } 

\ No newline at end of file

+ }

@@ -10,6 +10,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_docviewer"

+     "apps_run_docviewer",

+     "apps_run_okular"

    ]

  }

@@ -10,6 +10,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_fmw"

+     "apps_run_fmw",

+     "apps_run_mediawriter"

    ]

  }

@@ -10,6 +10,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "apps_run_patience"

+     "apps_run_patience",

+     "apps_run_kpatience"

    ]

  }

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

    ],

    "properties": [],

    "tags": [

-     "apps_run_systemmonitor"

+     "apps_run_system_monitor"

    ]

  }

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

    ],

    "properties": [],

    "tags": [

-     "apps_run_systemmonitor"

+     "apps_run_system_monitor"

    ]

  }

@@ -17,6 +17,7 @@ 

    ],

    "properties": [],

    "tags": [

-     "imageviewer_runs"

+     "apps_run_gwenview",

+     "apps_run_imageviewer"

    ]

- } 

\ No newline at end of file

+ }

@@ -10,8 +10,7 @@ 

      # Set update notification timestamp

      set_update_notification_timestamp();

      # Run the application

-     menu_launch_type("Calculator");

-     assert_screen("apps_run_calculator");

+     menu_launch_type("calculator", checkstart => 1);

      # wait for system to settle before snapshotting

      sleep 10;

  }

@@ -12,11 +12,7 @@ 

      set_update_notification_timestamp();

  

      # Start the application

-     menu_launch_type("characters");

-     # Check it has started

-     assert_screen 'apps_run_chars';

-     # Fullsize the window.

-     send_key("super-up");

+     menu_launch_type("characters", checkstart => 1, maximize => 1);

  }

  

  sub test_flags {

@@ -24,6 +24,8 @@ 

      set_update_notification_timestamp();

  

      # Start the Application

+     # We need to do extra checking, therefore we want to start simple

+     # and not use the menu_launch_type, so we do the checks manually.

this comment is confusing; we are using menu_launch_type. it'd be clearer maybe if it said "not use the advanced features of menu_launch_type" or something like that.

      menu_launch_type("clocks");

      assert_screen ["apps_run_clocks", "grant_access"];

      # give access rights if asked

@@ -33,13 +33,7 @@ 

      # Set the update notification_timestamp

      set_update_notification_timestamp();

  

-     menu_launch_type("disks");

-     wait_still_screen(3);

- 

-     # Make it fill the entire window.

-     send_key("super-up");

-     wait_still_screen(2);

-     assert_screen("apps_run_disks");

+     menu_launch_type("disks", checkstart => 1, maximize => 1);

  

      # Click on the listed icon of the new loop device.

      assert_and_click("disks_diskloop_listed");

@@ -22,9 +22,7 @@ 

      set_update_notification_timestamp();

  

      # Start the application

-     menu_launch_type("evince");

-     # Check that is started

-     assert_screen 'apps_run_dviewer';

+     menu_launch_type("evince", checkstart => 1);

  

      # Open the test file to create a starting point for the other Evince tests.

      # Click on Open button to open the File Open Dialog

@@ -11,29 +11,8 @@ 

      # set the update notification timestamp

      set_update_notification_timestamp();

  

-     my $crash = 1;

- 

-     # Workaround on Silverblue

-     # https://gitlab.gnome.org/GNOME/gnome-font-viewer/-/issues/78

-     if (get_var("SUBVARIANT") eq "Silverblue") {

-         # Open the command line

-         send_key("alt-f2");

-         sleep(2);

-         # Start the application with a command and let it crash

-         type_very_safely("flatpak run org.gnome.font-viewer\n");

-         # In case it does not crash, remember it.

-         if (check_screen("apps_run_fonts", timeout => 30)) {

-             $crash = 0;

-         }

-     }

      # Start the application, unless already running.

-     menu_launch_type("fonts") if ($crash == 1);

-     # Check that is started

-     assert_screen('apps_run_fonts', timeout => 60);

- 

-     # Fullsize the window.

-     send_key("super-up");

-     wait_still_screen(2);

+     menu_launch_type("fonts", checkstart => 1, maximize => 1);

  }

  

  sub test_flags {

@@ -22,9 +22,7 @@ 

      # Set the update notification timestamp

      set_update_notification_timestamp();

      # Start the application

-     menu_launch_type("text-editor");

-     # Check that it started

-     assert_screen("apps_run_texteditor");

+     menu_launch_type("text_editor", checkstart => 1, maximize => 1);

  

      # Open the test file

      send_key("ctrl-o");
@@ -40,10 +38,6 @@ 

      send_key("ret");

      wait_still_screen(3);

  

-     # Make the application fullscreen

-     send_key("super-up");

-     wait_still_screen(3);

- 

      # Check that the document has been opened

      assert_screen("gte_text_file_opened");

  }

@@ -19,12 +19,7 @@ 

  

      kde_doublek_workaround(key => 'g');

      # Start the application

-     menu_launch_type("gwenview");

-     # Check that is started

-     assert_screen 'imageviewer_runs';

- 

-     # Fullsize the application window.

-     send_key("super-pgup");

+     menu_launch_type("gwenview", checkstart => 1, maximize => 1);

  

      # Open the test file to create a starting point for the other tests.

      send_key("ctrl-o");

@@ -11,8 +11,7 @@ 

      my $self = shift;

      kde_doublek_workaround();

      # Run the application

-     menu_launch_type("kcalc");

-     assert_screen("apps_run_kcalc");

+     menu_launch_type("kcalc", checkstart => 1);

      # wait for system to settle before snapshotting

      sleep 10;

  }

@@ -34,8 +34,7 @@ 

      # connection to the localhost.

      if (get_var("DESKTOP") eq "gnome") {

          # Start Nautilus.

-         menu_launch_type("nautilus");

-         assert_screen("apps_run_files");

+         menu_launch_type("nautilus", checkstart => 1);

          # Add a new network connection.

          assert_and_click("nautilus_other_locations");

          assert_and_click("nautilus_enter_address");
@@ -97,9 +96,7 @@ 

      # desktop and check that the password has been stored there.

      # On KDE, we will use the KWalletManager.

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

-         menu_launch_type("kwallet");

-         assert_screen("apps_run_kwallet");

-         send_key("super-pgup");

+         menu_launch_type("kwalletmanager", checkstart => 1, maximize => 1);

          # Navigate to the stored entry and check

          # that the credentials are stored there.

          assert_and_dclick("keyring_wallet_passwords_unfold");
@@ -110,10 +107,7 @@ 

      }

      else {

          # Start the Seahorse application and maximize it.

-         menu_launch_type("seahorse");

-         assert_screen("apps_run_seahorse");

-         send_key("super-up");

- 

+         menu_launch_type("seahorse", checkstart => 1, maximize => 1);

          # Navigate to the stored entry and check

          # that the credentials are stored there.

          assert_and_click("keyring_seahorse_login");

@@ -20,9 +20,7 @@ 

      # Workaround the KDE double char problem

      kde_doublek_workaround();

      # Start the application

-     menu_launch_type("kwrite");

-     # Check that it started

-     assert_screen("apps_run_kwrite");

+     menu_launch_type("kwrite", checkstart => 1, maximize => 1);

  

      # Hit key-combo to open the file

      send_key("ctrl-o");
@@ -40,10 +38,6 @@ 

      send_key("ret");

      wait_still_screen(3);

  

-     # Make the application fullscreen

-     assert_and_click("kde_window_maximize");

-     wait_still_screen(3);

- 

      # Check that the document has been opened

      assert_screen("kwrite_text_file_opened");

  }

@@ -20,12 +20,7 @@ 

      # Set the update notification timestamp

      set_update_notification_timestamp();

      # Start the application

-     menu_launch_type("image viewer");

-     # Check that is started

-     assert_screen 'apps_run_imageviewer';

- 

-     # Fullsize the Loupe window.

-     send_key("super-up");

+     menu_launch_type("loupe", checkstart => 1, maximize => 1);

  

      # Open the test file to create a starting point for the other EoG tests.

      send_key("ctrl-o");

@@ -48,9 +48,7 @@ 

      # it in an image viewer to see that it is correct.

      #

      # Open the Image Viewer

-     menu_launch_type("image viewer");

-     assert_screen("apps_run_imageviewer");

-     send_key("super-up");

+     menu_launch_type("loupe", checkstart => 1, maximize => 1);

      # Read the file into the application.

      send_key("ctrl-o");

      assert_and_click("gnome_dirs_pictures");

@@ -26,10 +26,7 @@ 

      # Set the update notification timestamp

      set_update_notification_timestamp();

      # Start the application

-     menu_launch_type("nautilus");

-     # Check that is started

-     assert_screen 'apps_run_files';

-     wait_still_screen("2");

+     menu_launch_type("nautilus", checkstart => 1);

  

      # Check that the icons are shown

      assert_screen("nautilus_big_icon");

@@ -31,8 +31,7 @@ 

      my $self = shift;

  

      # Open the game

-     menu_launch_type("tux racer");

-     assert_screen("apps_run_tuxracer");

+     menu_launch_type("tux_racer", checkstart => 1);

  

      # Check that it has started in the fullscreen mode.

      if (check_screen("panel_controls")) {

@@ -9,8 +9,7 @@ 

  sub run {

      my $self = shift;

      # Start the Video player

-     menu_launch_type("video");

-     assert_screen("apps_run_videos");

+     menu_launch_type("video", checkstart => 1);

      # 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

@@ -49,10 +49,9 @@ 

      my $self = shift;

  

      ### Switch between two applications

-     menu_launch_type("files");

-     assert_screen("apps_run_files");

+     menu_launch_type("files", checkstart => 1);

      menu_launch_type("text editor");

-     assert_screen('apps_run_texteditor');

+     assert_screen("apps_run_texteditor");

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

      # window.

      # Switch to the other application.

@@ -27,8 +27,7 @@ 

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

+     menu_launch_type("calculator", checkstart => 1);

  

      # Maximize the application - right click and select from

      # the context menu.

@@ -12,12 +12,7 @@ 

      # Set the update notification timestamp

      set_update_notification_timestamp();

      # Start the Application

-     menu_launch_type("system monitor");

-     assert_screen("apps_run_systemmonitor");

- 

-     # Make it fill the entire window.

-     send_key("super-up");

-     wait_still_screen(2);

+     menu_launch_type("system_monitor", checkstart => 1, maximize => 1);

  }

  

  sub test_flags {

@@ -11,7 +11,7 @@ 

      # Start the application

      start_with_launcher('apps_menu_chars');

      # Check that is started

-     assert_screen 'apps_run_chars';

+     assert_screen 'apps_run_characters';

      # Register application

      register_application("gnome-characters");

      # Close the application

@@ -9,8 +9,7 @@ 

  sub run {

      my $self = shift;

      # open the application

-     menu_launch_type "terminal";

-     assert_screen "apps_run_terminal";

+     menu_launch_type("terminal", checkstart => 1);

  

      # Register application

      register_application("terminal");

@@ -12,9 +12,9 @@ 

  

      if ($subvariant ne "Silverblue") {

          # Start the application

-         start_with_launcher('apps_menu_videos');

+         start_with_launcher('apps_menu_video');

          # Check that is started

-         assert_screen 'apps_run_videos';

+         assert_screen 'apps_run_video';

          # Register application

          if ($version eq "Rawhide") {

              register_application("showtime");

@@ -8,8 +8,7 @@ 

  sub run {

      my $self = shift;

      # Start the application

-     menu_launch_type('abrt');

-     assert_screen 'apps_run_abrt';

+     menu_launch_type('abrt', checkstart => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -8,9 +8,7 @@ 

  sub run {

      my $self = shift;

      # Start the application

-     menu_launch_type('akregator');

-     # Check that it is started

-     assert_screen 'apps_run_akregator', timeout => 60;

+     menu_launch_type('akregator', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -8,9 +8,7 @@ 

  sub run {

      my $self = shift;

      # Start the application with command

-     menu_launch_type 'ark';

-     # Check that it is started

-     assert_screen 'apps_run_ark', timeout => 60;

+     menu_launch_type('ark', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -7,7 +7,7 @@ 

  

  sub run {

      my $self = shift;

-     menu_launch_type 'print theme';

+     menu_launch_type('print theme');

      # Check that it is started

      assert_screen 'apps_run_cpteditor', timeout => 60;

      # Close the application

@@ -7,7 +7,6 @@ 

  

  sub run {

      my $self = shift;

- 

      menu_launch_type 'contactthemeeditor';

      # Check that it is started

      assert_screen 'apps_run_cteditor';

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'discover';

-     # Check that it is started

-     assert_screen 'apps_run_discover', timeout => 60;

+     menu_launch_type('discover', checkstart => 1, timeout => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'okular';

-     # Check that it is started

-     assert_screen 'apps_run_docviewer', timeout => 60;

+     menu_launch_type('okular', checkstart => 1, timeout => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'dolphin';

-     # Check that it is started

-     assert_screen 'apps_run_dolphin', timeout => 60;

+     menu_launch_type('dolphin', checkstart => 1, timeout => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -8,9 +8,7 @@ 

  sub run {

      my $self = shift;

      # Start the application

-     menu_launch_type 'mediawriter';

-     # Check that is started

-     assert_screen 'apps_run_fmw';

+     menu_launch_type('mediawriter', checkstart => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'gwenview';

-     # Check that it is started

-     assert_screen 'apps_run_gwenview', timeout => 60;

+     menu_launch_type('gwenview', checkstart => 1, timeout => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'help';

-     # Check that it is started

-     assert_screen 'apps_run_help', timeout => 60;

+     menu_launch_type('help', checkstart => 1, timeout => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'kaddressbook';

-     # Check that it is started

-     assert_screen 'apps_run_kaddressbook', timeout => 60;

+     menu_launch_type('kaddressbook', timeout => 60, checkstart => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'kcalc';

-     # Check that it is started

-     assert_screen 'apps_run_kcalc', timeout => 60;

+     menu_launch_type('kcalc', checkstart => 1, timeout => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'kcharselect';

-     # Check that it is started

-     assert_screen 'apps_run_kcharselect', timeout => 60;

+     menu_launch_type('kcharselect', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'kfind';

-     # Check that it is started

-     assert_screen 'apps_run_kfind', timeout => 60;

+     menu_launch_type('kfind', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'kolourpaint';

-     # Check that it is started

-     assert_screen 'apps_run_kolourpaint', timeout => 60;

+     menu_launch_type('kolourpaint', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -11,9 +11,7 @@ 

      # Start the application

      # we don't use desktop_launch_terminal here as we specifically

      # want to run 'konsole' from the kicker menu in this test

-     menu_launch_type 'konsole';

-     # Check that it is started

-     assert_screen 'apps_run_konsole', timeout => 60;

+     menu_launch_type('konsole', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'korganizer';

-     # Check that it is started

-     assert_screen 'apps_run_korganizer', timeout => 60;

+     menu_launch_type('korganizer', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'krdc';

-     # Check that it is started

-     assert_screen 'apps_run_krdc', timeout => 60;

+     menu_launch_type('krdc', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'ktnef';

-     # Check that it is started

-     assert_screen 'apps_run_ktnef', timeout => 60;

+     menu_launch_type('ktnef', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'kwallet';

-     # Check that it is started

-     assert_screen 'apps_run_kwallet', timeout => 60;

+     menu_launch_type('kwallet', timeout => 60, checkstart => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'kwrite';

-     # Check that it is started

-     assert_screen 'apps_run_kwrite', timeout => 60;

+     menu_launch_type('kwrite', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -8,9 +8,7 @@ 

  sub run {

      my $self = shift;

      # Start the application

-     menu_launch_type 'neochat';

-     # Check that it is started

-     assert_screen "apps_run_neochat";

+     menu_launch_type('neochat', checkstart => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'kpatience';

-     # Check that it is started

-     assert_screen 'apps_run_patience', timeout => 60;

+     menu_launch_type('kpatience', checkstart => 1, timeout => 1);

      # Close the application

      quit_with_shortcut();

  }

@@ -10,7 +10,7 @@ 

      # Start the application

      menu_launch_type 'system monitor';

      # Check that it is started

-     assert_screen 'apps_run_systemmonitor', timeout => 60;

+     assert_screen 'apps_run_system_monitor', timeout => 60;

      # Close the application

      quit_with_shortcut();

  }

@@ -9,9 +9,7 @@ 

      my $self = shift;

  

      # Start the application

-     menu_launch_type 'spectacle';

-     # Check that it is started

-     assert_screen 'apps_run_spectacle', timeout => 60;

+     menu_launch_type('spectacle', checkstart => 1, timeout => 60);

      # Close the application

      quit_with_shortcut();

  }

@@ -28,13 +28,7 @@ 

      if ($desktop eq 'kde') {

          # try and avoid double-typing issues

          kde_doublek_workaround(key => 'd');

-         menu_launch_type('discover');

-         # Wait for it to run and maximize it to make sure we see the

-         # Updates entry

-         assert_screen('apps_run_discover');

-         wait_still_screen 2;

-         wait_screen_change { send_key "super-pgup"; };

-         wait_still_screen 2;

+         menu_launch_type('discover', checkstart => 1, maximize => 1);

      }

      else {

          # this launches GNOME Software on GNOME, dunno for any other

We have enhanced the menu_launch_type to allow for
start checking and maximizing applications.
This PR uses the new functions wherever it seems
logical.
If special logic was used for certain cases,
we have not touched these to preserve the
exact behaviour.

Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/358

rebased onto 97b619a

4 months ago

rebased onto 97b619a

4 months ago

rebased onto 1b8aa92

3 months ago

this comment is confusing; we are using menu_launch_type. it'd be clearer maybe if it said "not use the advanced features of menu_launch_type" or something like that.

rebased onto 0890217

3 months ago

rebased onto b14f82d

3 months ago

Gonna deploy this on lab for testing, thanks.

so, testing on staging shows some problems:

so...various missing needle tags, and maximization looks a bit unreliable...

rebased onto b40f3ff

3 months ago

rebased onto d0fda5b

3 months ago

I will revisit those issues.

1 new commit added

  • Add fixes after the review.
3 months ago

1 new commit added

  • Update a needle for KDE Abrt.
3 months ago

thanks. and yeah, this likely needs some rebasing on the commits I recently made to clean up abrt and kwallet needles - please check this is consistent with those too (i.e. we only have the necessary 'apps_run_abrt' and 'apps_run_kwallet' needles, no 'abrt_runs' or 'apps_run_kwalletmanager').

rebased onto d6e453b

3 months ago

1 new commit added

  • Change order of steps.
3 months ago

1 new commit added

  • Fix system monitor call.
3 months ago

1 new commit added

  • Change text editor invocation.
3 months ago

1 new commit added

  • Change the call for Tux Racer.
3 months ago

1 new commit added

  • Add needles that were missing.
3 months ago

fails:

Unused needle(s) found!
/workspace/src/pagure.io/fedora-qa/os-autoinst-distri-fedora/needles/gnome/apps/apps_run_characters-20250415.json
/workspace/src/pagure.io/fedora-qa/os-autoinst-distri-fedora/needles/gnome/apps/apps_run_tux_racer-20250415.json
/workspace/src/pagure.io/fedora-qa/os-autoinst-distri-fedora/needles/kde/apps/apps_run_systemmonitor-20211112.json
/workspace/src/pagure.io/fedora-qa/os-autoinst-distri-fedora/needles/kde/apps/apps_run_systemmonitor-20240227.json

2 new commits added

  • Add fixes after the review.
  • Use the new features of menu_launch_type in code.
3 months ago

2 new commits added

  • Add fixes after the review.
  • Use the new features of menu_launch_type in code.
3 months ago

2 new commits added

  • Add fixes after the review.
  • Use the new features of menu_launch_type in code.
3 months ago

Yeah, yesterday, the PR was not ready fully, so there might have been failures. The problems were caused by launch calls that would comprise of two words, such as "tux racer" which resulted in non-valid tags like apps_run_tux racer, so I changed the calls to "tux_racer" which works very well in Gnome itself and results in valid tags apps_run_tux_racer and similar.

I also updated the check-needles.py to whitelist some more needles that are only called with a variable and thus fail on the check.

Lastly, I made sure, all Workstation and KDE tests that could be starting applications work as expected and this indeed happened, see

https://openqa.stg.fedoraproject.org/tests/overview?distri=fedora&version=Rawhide&build=Fedora-Rawhide-20250414.n.0&groupid=1

rebased onto 0d5adaa

3 months ago

2 new commits added

  • Add fixes after the review.
  • Use the new features of menu_launch_type in code.
3 months ago

rebased onto 6381857

3 months ago

2 new commits added

  • Add fixes after the review.
  • Use the new features of menu_launch_type in code.
3 months ago

rebased onto 6381857

3 months ago

rebased onto f97d967

3 months ago

I tweaked a couple of issues here (bad timeout on spectacle, bad launch string for plasmasystemmonitor.pm).

rebased onto b2aedd5

3 months ago

this now needs a rebase on the totem->showtime change :/ it's a bit tricky because you can't launch showtime by typing 'videos', it has to be 'video', so we need to think for a minute about the needle tags and names and stuff. I don't wanna work it out right now. if you want to come up with something @lruzicka go ahead, or else I'll do it tomorrow.

rebased onto 999b3db

3 months ago

rebased onto 999b3db

3 months ago

rebased onto 999b3db

3 months ago

rebased onto 999b3db

3 months ago

rebased onto 999b3db

3 months ago

rebased onto 999b3db

3 months ago

rebased onto 999b3db

3 months ago

rebased onto 999b3db

3 months ago

rebased onto 5871650

3 months ago

rebased onto 5871650

3 months ago

OK, so I did quite a bit of poking and cleaning this up, and tested it on lab. It looks good, going to merge it now.

Pull-Request has been merged by adamwill

3 months ago
Metadata
Changes Summary 94
+10 -1
file changed
check-needles.py
+8 -5
file changed
lib/utils.pm
+1 -1
file renamed
needles/gnome/apps/apps_menu_videos-20210223.json
needles/gnome/apps/apps_menu_video-20210223.json
+0 -0
file renamed
needles/gnome/apps/apps_menu_videos-20210223.png
needles/gnome/apps/apps_menu_video-20210223.png
+1 -1
file renamed
needles/gnome/apps/apps_menu_videos-showtime-20250422.json
needles/gnome/apps/apps_menu_video-showtime-20250422.json
+0 -0
file renamed
needles/gnome/apps/apps_menu_videos-showtime-20250422.png
needles/gnome/apps/apps_menu_video-showtime-20250422.png
+2 -2
file renamed
needles/gnome/apps/apps_run_chars-20220722.json
needles/gnome/apps/apps_run_characters-20220722.json
+0 -0
file renamed
needles/gnome/apps/apps_run_chars-20220722.png
needles/gnome/apps/apps_run_characters-20220722.png
+3 -2
file renamed
needles/gnome/apps/apps_run_dviewer-20210222.json
needles/gnome/apps/apps_run_evince-20210222.json
+0 -0
file renamed
needles/gnome/apps/apps_run_dviewer-20210222.png
needles/gnome/apps/apps_run_evince-20210222.png
+3 -2
file renamed
needles/gnome/apps/apps_run_dviewer-20250319.json
needles/gnome/apps/apps_run_evince-20250319.json
+0 -0
file renamed
needles/gnome/apps/apps_run_dviewer-20250319.png
needles/gnome/apps/apps_run_evince-20250319.png
+3 -2
file changed
needles/gnome/apps/apps_run_fmw-graphic-20250227.json
+3 -2
file changed
needles/gnome/apps/apps_run_fmw.json
+3 -2
file changed
needles/gnome/apps/apps_run_imageviewer-20200117.json
+3 -2
file changed
needles/gnome/apps/apps_run_imageviewer-20230823.json
+1 -1
file changed
needles/gnome/apps/apps_run_monitor-20240127.json
+1 -1
file changed
needles/gnome/apps/apps_run_monitor-20240424.json
+1 -1
file changed
needles/gnome/apps/apps_run_monitor-20240702.json
+1 -1
file changed
needles/gnome/apps/apps_run_monitor-20240710.json
+2 -2
file changed
needles/gnome/apps/apps_run_monitor-20250318.json
+2 -2
file changed
needles/gnome/apps/apps_run_monitor-20250319.json
+1 -1
file changed
needles/gnome/apps/apps_run_monitor.json
+11 -4
file renamed
needles/kde/kde_window_maximize.json
needles/gnome/apps/apps_run_system_monitor-20250415.json
+0
file added
needles/gnome/apps/apps_run_system_monitor-20250415.png
+2 -1
file changed
needles/gnome/apps/apps_run_texteditor-20220818.json
+2 -1
file changed
needles/gnome/apps/apps_run_texteditor-20230703.json
+3 -2
file changed
needles/gnome/apps/apps_run_texteditor-20240424.json
+3 -2
file changed
needles/gnome/apps/apps_run_texteditor-20250319.json
+3 -2
file changed
needles/gnome/apps/apps_run_texteditor-20250320.json
+1 -1
file renamed
needles/gnome/apps/apps_run_videos-20210716.json
needles/gnome/apps/apps_run_video-20210716.json
+0 -0
file renamed
needles/gnome/apps/apps_run_videos-20210716.png
needles/gnome/apps/apps_run_video-20210716.png
+1 -1
file renamed
needles/gnome/apps/apps_run_videos-20250319.json
needles/gnome/apps/apps_run_video-20250319.json
+0 -0
file renamed
needles/gnome/apps/apps_run_videos-20250319.png
needles/gnome/apps/apps_run_video-20250319.png
+1 -1
file renamed
needles/gnome/apps/apps_run_videos-showtime-20250422.json
needles/gnome/apps/apps_run_video-showtime-20250422.json
+0 -0
file renamed
needles/gnome/apps/apps_run_videos-showtime-20250422.png
needles/gnome/apps/apps_run_video-showtime-20250422.png
+2 -2
file changed
needles/gnome/apps/navigation/apps_run_tuxracer.json
+1 -1
file changed
needles/kde/apps/apps_run_abrt-kde-oldver-nobold-20250411.json
+2 -1
file changed
needles/kde/apps/apps_run_docviewer-20220112.json
+2 -1
file changed
needles/kde/apps/apps_run_fmw-20220112.json
+2 -1
file changed
needles/kde/apps/apps_run_patience-20220112.json
+1 -1
file changed
needles/kde/apps/apps_run_systemmonitor-20211112.json
+1 -1
file changed
needles/kde/apps/apps_run_systemmonitor-20240227.json
+3 -2
file changed
needles/kde/apps/gwenview/imageviewer_runs-20241114.json
-0
file removed
needles/kde/kde_window_maximize.png
+1 -2
file changed
tests/applications/calculator/aaa_setup.pm
+1 -5
file changed
tests/applications/characters/aaa_setup.pm
+2 -0
file changed
tests/applications/clocks/aaa_setup.pm
+1 -7
file changed
tests/applications/disks/aaa_setup.pm
+1 -3
file changed
tests/applications/evince/aaa_setup.pm
+1 -22
file changed
tests/applications/fonts/aaa_setup.pm
+1 -7
file changed
tests/applications/gnome-text-editor/aaa_setup.pm
+1 -6
file changed
tests/applications/gwenview/aaa_setup.pm
+1 -2
file changed
tests/applications/kcalc/aaa_setup.pm
+3 -9
file changed
tests/applications/keyring/keyring_password.pm
+1 -7
file changed
tests/applications/kwrite/aaa_setup.pm
+1 -6
file changed
tests/applications/loupe/aaa_setup.pm
+1 -3
file changed
tests/applications/maps/export.pm
+1 -4
file changed
tests/applications/nautilus/aaa_setup.pm
+1 -2
file changed
tests/applications/navigation/play_game.pm
+1 -2
file changed
tests/applications/navigation/play_video.pm
+2 -3
file changed
tests/applications/navigation/switch_application.pm
+1 -2
file changed
tests/applications/navigation/window_operations.pm
+1 -6
file changed
tests/applications/sysmon/aaa_setup.pm
+1 -1
file changed
tests/apps_startstop/gnome/chars.pm
+1 -2
file changed
tests/apps_startstop/gnome/terminal.pm
+2 -2
file changed
tests/apps_startstop/gnome/videos.pm
+1 -2
file changed
tests/apps_startstop/kde/abrt.pm
+1 -3
file changed
tests/apps_startstop/kde/akregator.pm
+1 -3
file changed
tests/apps_startstop/kde/ark.pm
+1 -1
file changed
tests/apps_startstop/kde/cpteditor.pm
+0 -1
file changed
tests/apps_startstop/kde/cteditor.pm
+1 -3
file changed
tests/apps_startstop/kde/discover.pm
+1 -3
file changed
tests/apps_startstop/kde/docviewer.pm
+1 -3
file changed
tests/apps_startstop/kde/dolphin.pm
+1 -3
file changed
tests/apps_startstop/kde/fmw.pm
+1 -3
file changed
tests/apps_startstop/kde/gwenview.pm
+1 -3
file changed
tests/apps_startstop/kde/help.pm
+1 -3
file changed
tests/apps_startstop/kde/kaddressbook.pm
+1 -3
file changed
tests/apps_startstop/kde/kcalc.pm
+1 -3
file changed
tests/apps_startstop/kde/kcharselect.pm
+1 -3
file changed
tests/apps_startstop/kde/kfind.pm
+1 -3
file changed
tests/apps_startstop/kde/kolourpaint.pm
+1 -3
file changed
tests/apps_startstop/kde/konsole.pm
+1 -3
file changed
tests/apps_startstop/kde/korganizer.pm
+1 -3
file changed
tests/apps_startstop/kde/krdc.pm
+1 -3
file changed
tests/apps_startstop/kde/ktnef.pm
+1 -3
file changed
tests/apps_startstop/kde/kwallet.pm
+1 -3
file changed
tests/apps_startstop/kde/kwrite.pm
+1 -3
file changed
tests/apps_startstop/kde/neochat.pm
+1 -3
file changed
tests/apps_startstop/kde/patience.pm
+1 -1
file changed
tests/apps_startstop/kde/plasmasystemmonitor.pm
+1 -3
file changed
tests/apps_startstop/kde/spectacle.pm
+1 -7
file changed
tests/desktop_update_graphical.pm