#245 [WIP] Add openQA tests for i3
Closed 2 months ago by adamwill. Opened 3 years ago by defolos.
fedora-qa/ defolos/os-autoinst-distri-fedora i3-tests  into  main

file modified
+17 -2
@@ -4,6 +4,7 @@ 

  

  use base 'distribution';

  use Cwd;

+ use i3;

  

  # Fedora distribution class

  
@@ -19,7 +20,7 @@ 

  

  # importing whole testapi creates circular dependency, so import only

  # necessary functions from testapi

- use testapi qw(check_var get_var send_key type_string assert_screen);

+ use testapi qw(check_var get_var send_key type_string assert_screen check_screen);

  

  sub init() {

      my ($self) = @_;
@@ -38,12 +39,26 @@ 

  

  sub x11_start_program {

      my ($self, $program, $timeout, $options) = @_;

-     send_key "alt-f2";

+     send_key (get_var("DESKTOP") eq "i3" ? get_i3_modifier() . "-d" : "alt-f2");

      assert_screen "desktop_runner";

      type_string $program, 20;

      sleep 5; # because of KDE dialog - SUSE guys are doing the same!

      send_key "ret", 1;

  }

  

+ sub become_root {

+     my ($self) = @_;

+ 

+     my $rootpwd = get_var("ROOT_PASSWORD", "weakpassword");

+ 

+     if (check_screen("apps_run_terminal") || is_serial_terminal()) {

+         type_string("su -\n");

+         sleep(2);

+         type_string("$rootpwd\n");

+     } else {

+         die "No terminal to become root is present";

+     }

+ }

+ 

  1;

  # vim: set sw=4 et:

file added
+55
@@ -0,0 +1,55 @@ 

+ package i3;

+ 

+ use strict;

+ 

+ use base 'Exporter';

+ use Exporter;

+ 

+ use testapi;

+ use utils;

+ 

+ our @EXPORT = qw/firstlaunch_setup get_i3_modifier create_user_i3_config launch_terminal/;

+ 

+ 

+ sub get_i3_modifier {

+     return get_var("I3_MODIFIER", 'alt');

+ }

+ 

+ sub firstlaunch_setup {

+     my %args = @_;

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

+     my $modifier = $args{modifier} || get_i3_modifier();

+ 

+     die "invalid modifier $modifier, only alt and super are possible" unless (($modifier eq 'alt') || ($modifier eq 'super'));

+ 

+     assert_screen('i3_firstlaunch_wizard', $timeout);

+ 

+     if ($modifier eq 'alt') {

+         send_key('esc', wait_screen_change => 1);

+     } else {

+         send_key('ret', wait_screen_change => 1);

+         send_key_until_needlematch('down', 'i3_generate_config');

+         send_key('ret', wait_screen_change => 1);

+     }

+ }

+ 

+ sub create_user_i3_config {

+     my %args = @_;

+ 

+     my $login = $args{login};

+     my $remove_config_wizard = $args{remove_config_wizard} || 1;

+ 

+     assert_script_run("mkdir -p /home/$login/.config/i3/");

+     # ensure that no alias of cp prevents an existing config from being overwritten

+     assert_script_run("/usr/bin/cp -f /etc/i3/config /home/$login/.config/i3/config");

+     if ($remove_config_wizard) {

+         assert_script_run("sed -i '/i3-config-wizard/d' /home/$login/.config/i3/config");

+     }

+     assert_script_run "chown -R $login.$login /home/$login/.config";

+     assert_script_run "restorecon -vr /home/$login/.config";

+ }

+ 

+ sub launch_terminal {

+     send_key(get_i3_modifier() . '-ret');

+     assert_screen("apps_run_terminal");

+ }

file modified
+32 -11
@@ -4,6 +4,7 @@ 

  

  use base 'Exporter';

  use Exporter;

+ use i3;

  

  use lockapi;

  use testapi;
@@ -873,15 +874,31 @@ 

      # back to just being a simple needle match.

      my %args = (

          timeout => 30,

+         no_firstlaunch_check => 0,

          @_

      );

-     assert_screen "apps_menu_button", $args{timeout};

-     # GNOME 40 starts on the overview by default; for consistency with

-     # older GNOME and KDE, let's just close it

-     if (match_has_tag "apps_menu_button_active") {

-         wait_still_screen 3;

-         send_key "alt-f1";

-         assert_screen "apps_menu_button_inactive";

+     if (get_var("DESKTOP") eq 'i3') {

+         my $version = get_var('VERSION');

+ 

+         # i3 launches pretty quickly, but sometimes we have to wait for the

+         # whole VM to launch

+         assert_screen("i3-bar", $args{timeout});

+         if ($version ne "Rawhide") {

+             assert_screen("${version}_background");

+         }

+ 

+         unless ($args{no_firstlaunch_check}) {

+             die "firstlaunch setup is present" if defined(check_screen('i3_firstlaunch_wizard'));

+         }

+     } else {

+         assert_screen "apps_menu_button", $args{timeout};

+         # GNOME 40 starts on the overview by default; for consistency with

+         # older GNOME and KDE, let's just close it

+         if (match_has_tag "apps_menu_button_active") {

+             wait_still_screen 3;

+             send_key "alt-f1";

+             assert_screen "apps_menu_button_inactive";

+         }

      }

  }

  
@@ -1128,10 +1145,14 @@ 

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

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

      my $app = shift;

-     # super does not work on KDE, because fml

-     send_key 'alt-f1';

-     # srsly KDE y u so slo

-     wait_still_screen 3;

+     if (get_var("DESKTOP") eq "i3") {

+         send_key(get_var("I3_MODIFIER", 'alt') . "-d");

+     } else {

+         # super does not work on KDE, because fml

+         send_key 'alt-f1';

+         # srsly KDE y u so slo

+         wait_still_screen 3;

+     }

      type_very_safely $app;

      send_key 'ret';

  }

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

+ {

+   "area": [

+     {

+       "width": 30,

+       "height": 18,

+       "ypos": 508,

+       "xpos": 475,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "firefox_addon_add"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 520,

+       "type": "match",

+       "width": 62,

+       "height": 17,

+       "ypos": 508

+     },

+     {

+       "width": 20,

+       "ypos": 73,

+       "height": 19,

+       "type": "match",

+       "xpos": 951

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "firefox_addon_success"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 0,

+       "type": "match",

+       "width": 16,

+       "ypos": 751,

+       "height": 17

+     },

+     {

+       "height": 14,

+       "width": 15,

+       "ypos": 752,

+       "type": "match",

+       "xpos": 434

+     },

+     {

+       "type": "match",

+       "xpos": 486,

+       "height": 14,

+       "width": 18,

+       "ypos": 751

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "i3-bar"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 0,

+       "ypos": 0,

+       "width": 44,

+       "height": 17,

+       "type": "match"

+     },

+     {

+       "xpos": 999,

+       "ypos": 0,

+       "width": 25,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "desktop_runner"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "ypos": 369,

+       "width": 130,

+       "height": 41,

+       "type": "match",

+       "xpos": 460

+     },

+     {

+       "type": "match",

+       "height": 24,

+       "xpos": 599,

+       "width": 53,

+       "ypos": 424

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "login_screen",

+     "graphical_login_input",

+     "graphical_login",

+     "lightdm_login_screen"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 460,

+       "ypos": 369,

+       "width": 130,

+       "height": 41,

+       "type": "match"

+     },

+     {

+       "xpos": 599,

+       "ypos": 424,

+       "width": 53,

+       "height": 24,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "login_screen",

+     "graphical_login_input",

+     "graphical_login",

+     "lightdm_login_screen"

+   ]

+ }

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

+ {

+   "area": [

+     {

+       "xpos": 4,

+       "ypos": 5,

+       "width": 180,

+       "height": 17,

+       "type": "match"

+     },

+     {

+       "xpos": 891,

+       "ypos": 7,

+       "width": 73,

+       "height": 15,

+       "type": "match",

+       "click_point": {

+         "xpos": 36.5,

+         "ypos": 7.5

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "i3-logout-bar"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 227,

+       "ypos": 200,

+       "width": 113,

+       "height": 21,

+       "type": "match",

+       "click_point": {

+         "xpos": 56.5,

+         "ypos": 10.5

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "printing_pdfprinter_ready"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 763,

+       "ypos": 601,

+       "width": 56,

+       "height": 21,

+       "type": "match",

+       "click_point": {

+         "xpos": 28,

+         "ypos": 10.5

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "printing_print"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "height": 18,

+       "type": "match",

+       "xpos": 116,

+       "ypos": 18,

+       "width": 328

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "printing_check_sentence"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 3,

+       "ypos": 3,

+       "width": 95,

+       "height": 11,

+       "type": "match"

+     },

+     {

+       "xpos": 17,

+       "ypos": 22,

+       "width": 68,

+       "height": 25,

+       "type": "match"

+     },

+     {

+       "xpos": 111,

+       "ypos": 26,

+       "width": 71,

+       "height": 20,

+       "type": "match"

+     },

+     {

+       "xpos": 209,

+       "ypos": 25,

+       "width": 106,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "audio_mixer"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "height": 14,

+       "type": "match",

+       "ypos": 2,

+       "width": 38,

+       "xpos": 2

+     },

+     {

+       "type": "match",

+       "ypos": 33,

+       "xpos": 163,

+       "width": 37,

+       "height": 13

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "apps_run_terminal",

+     "i3_dunst_no_notification"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "height": 19,

+       "ypos": 29,

+       "width": 285,

+       "type": "match",

+       "xpos": 702

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "i3_dunst_foo_notification"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 493,

+       "ypos": 281,

+       "width": 137,

+       "height": 13,

+       "type": "match"

+     },

+     {

+       "xpos": 514,

+       "ypos": 364,

+       "width": 201,

+       "height": 16,

+       "type": "match"

+     },

+     {

+       "xpos": 519,

+       "ypos": 391,

+       "width": 214,

+       "height": 14,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "i3_firstlaunch_wizard"

+   ]

+ }

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

+ {

+   "area": [

+     {

+       "width": 679,

+       "height": 16,

+       "ypos": 0,

+       "type": "match",

+       "xpos": 0

+     },

+     {

+       "ypos": 535,

+       "height": 128,

+       "width": 373,

+       "type": "match",

+       "xpos": 328

+     },

+     {

+       "xpos": 728,

+       "ypos": 7,

+       "width": 132,

+       "height": 23,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "i3_windows_split"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 0,

+       "ypos": 0,

+       "width": 133,

+       "height": 52,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "i3_windows_stacked"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 0,

+       "ypos": 0,

+       "width": 824,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "i3_windows_tabbed"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 467,

+       "type": "match",

+       "ypos": 258,

+       "width": 89,

+       "height": 26,

+       "click_point": {

+         "xpos": 44.5,

+         "ypos": 13

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "login_jack"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 467,

+       "ypos": 347,

+       "width": 66,

+       "height": 23,

+       "type": "match",

+       "click_point": {

+         "xpos": 33,

+         "ypos": 11.5

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "login_jim"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 360,

+       "ypos": 407,

+       "width": 293,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "login_wrong_password"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 278,

+       "ypos": 314,

+       "width": 53,

+       "height": 53,

+       "type": "match"

+     },

+     {

+       "xpos": 345,

+       "ypos": 316,

+       "width": 53,

+       "height": 18,

+       "type": "match"

+     },

+     {

+       "xpos": 682,

+       "ypos": 426,

+       "width": 54,

+       "height": 22,

+       "type": "match",

+       "click_point": {

+         "xpos": 27,

+         "ypos": 11

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "lightdm_power_menu-reboot-confirm"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 366,

+       "ypos": 324,

+       "width": 76,

+       "height": 85,

+       "type": "match"

+     },

+     {

+       "xpos": 599,

+       "ypos": 425,

+       "width": 54,

+       "height": 21,

+       "type": "match"

+     },

+     {

+       "xpos": 855,

+       "ypos": 77,

+       "width": 82,

+       "height": 21,

+       "type": "match",

+       "click_point": {

+         "xpos": 41,

+         "ypos": 10.5

+       }

+     },

+     {

+       "xpos": 965,

+       "ypos": 0,

+       "width": 59,

+       "height": 25,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "lightdm_power_menu-reboot"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 333,

+       "ypos": 311,

+       "width": 76,

+       "height": 27,

+       "type": "match"

+     },

+     {

+       "xpos": 263,

+       "ypos": 309,

+       "width": 63,

+       "height": 64,

+       "type": "match"

+     },

+     {

+       "xpos": 675,

+       "ypos": 429,

+       "width": 70,

+       "height": 17,

+       "type": "match",

+       "click_point": {

+         "xpos": 35,

+         "ypos": 8.5

+       }

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "lightdm_power_menu-shutdown-confirm"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 966,

+       "ypos": 3,

+       "width": 54,

+       "height": 19,

+       "type": "match",

+       "click_point": {

+         "xpos": 42,

+         "ypos": 9.5

+       }

+     },

+     {

+       "xpos": 358,

+       "ypos": 323,

+       "width": 89,

+       "height": 91,

+       "type": "match"

+     },

+     {

+       "xpos": 597,

+       "ypos": 423,

+       "width": 56,

+       "height": 25,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "lightdm_power_menu"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 600,

+       "ypos": 442,

+       "width": 51,

+       "height": 21,

+       "type": "match"

+     },

+     {

+       "xpos": 624,

+       "ypos": 303,

+       "width": 43,

+       "height": 47,

+       "type": "match",

+       "click_point": {

+         "xpos": 21.5,

+         "ypos": 23.5

+       }

+     },

+     {

+       "xpos": 364,

+       "ypos": 306,

+       "width": 81,

+       "height": 90,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "lightdm_user_selection"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "xpos": 422,

+       "ypos": 27,

+       "width": 182,

+       "height": 19,

+       "type": "match"

+     },

+     {

+       "xpos": 684,

+       "ypos": 2,

+       "width": 129,

+       "height": 12,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "mousepad_no_document_open"

+   ]

+ } 

\ No newline at end of file

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

+ {

+   "area": [

+     {

+       "ypos": 223,

+       "width": 99,

+       "type": "match",

+       "xpos": 231,

+       "height": 19

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "printing_select_pdfprinter"

+   ]

+ } 

\ No newline at end of file

empty or binary file added
file modified
+71 -19
@@ -203,6 +203,20 @@ 

              },

              "version": "*"

          },

+         "fedora-i3-live-x86_64*": {

+             "arch": "x86_64",

+             "distri": "fedora",

+             "flavor": "i3-live-iso",

+             "settings": {

+                 "DESKTOP": "i3",

+                 "DEPLOY_UPLOAD_TEST": "install_default_upload",

+                 "LIVE": "1",

+                 "PACKAGE_SET": "default",

+                 "TEST_TARGET": "ISO",

+                 "USER_LOGIN": "i3-user"

+             },

+             "version": "*"

+         },

          "fedora-Minimal-raw_xz-raw.xz-aarch64-*": {

              "arch": "aarch64",

              "distri": "fedora",
@@ -469,6 +483,14 @@ 

              "machine": "uefi",

              "product": "fedora-KDE-live-iso-x86_64-*"

          },

+         "fedora-i3-live-x86_64-*-uefi": {

+             "machine": "uefi",

+             "product": "fedora-i3-live-x86_64*"

+         },

+         "fedora-i3-live-x86_64-*-64bit": {

+             "machine": "64bit",

+             "product": "fedora-i3-live-x86_64*"

+         },

          "fedora-Minimal-raw_xz-raw.xz-aarch64-*-aarch64": {

              "machine": "aarch64",

              "product": "fedora-Minimal-raw_xz-raw.xz-aarch64-*"
@@ -579,7 +601,8 @@ 

              "profiles": {

                  "fedora-KDE-live-iso-x86_64-*-64bit": 40,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 40,

-                 "fedora-Workstation-live-iso-x86_64-*-64bit": 40

+                 "fedora-Workstation-live-iso-x86_64-*-64bit": 40,

+                 "fedora-i3-live-x86_64-*-64bit": 40

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -625,7 +648,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 20,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22,

+                 "fedora-i3-live-x86_64-*-64bit": 20

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -656,7 +680,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 20,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22,

+                 "fedora-i3-live-x86_64-*-64bit": 20

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -682,7 +707,8 @@ 

                  "fedora-Server-raw_xz-raw.xz-aarch64-*-aarch64": 22,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 20,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22,

+                 "fedora-i3-live-x86_64-*-64bit": 20

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -708,7 +734,8 @@ 

                  "fedora-Server-raw_xz-raw.xz-aarch64-*-aarch64": 42,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 40,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 40,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42,

+                 "fedora-i3-live-x86_64-*-64bit": 40

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -740,7 +767,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 40,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 40,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42,

+                 "fedora-i3-live-x86_64-*-64bit": 40

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -771,7 +799,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 40,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 40,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42,

+                 "fedora-i3-live-x86_64-*-64bit": 40

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -802,7 +831,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 40,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 40,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42,

+                 "fedora-i3-live-x86_64-*-64bit": 40

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -860,7 +890,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 20,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22,

+                 "fedora-i3-live-x86_64-*-64bit": 50

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -873,7 +904,8 @@ 

              "profiles": {

                  "fedora-KDE-live-iso-x86_64-*-64bit": 30,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 30,

-                 "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 30

+                 "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 30,

+                 "fedora-i3-live-x86_64-*-64bit": 30

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -901,7 +933,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 20,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22,

+                 "fedora-i3-live-x86_64-*-64bit": 20

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -914,7 +947,8 @@ 

              "profiles": {

                  "fedora-KDE-live-iso-x86_64-*-64bit": 32,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 30,

-                 "fedora-Workstation-live-iso-x86_64-*-64bit": 30

+                 "fedora-Workstation-live-iso-x86_64-*-64bit": 30,

+                 "fedora-i3-live-x86_64-*-64bit": 30

              },

              "settings": {

                  "ENTRYPOINT": "desktop_notifications"
@@ -924,7 +958,8 @@ 

              "profiles": {

                  "fedora-KDE-live-iso-x86_64-*-64bit": 32,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 30,

-                 "fedora-Workstation-live-iso-x86_64-*-64bit": 30

+                 "fedora-Workstation-live-iso-x86_64-*-64bit": 30,

+                 "fedora-i3-live-x86_64-*-64bit": 30

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -938,7 +973,8 @@ 

                  "fedora-KDE-live-iso-x86_64-*-64bit": 20,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 20,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22,

+                 "fedora-i3-live-x86_64-*-64bit": 20

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -954,7 +990,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 20,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22,

+                 "fedora-i3-live-x86_64-*-64bit": 30

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -998,7 +1035,8 @@ 

                  "fedora-KDE-live-iso-x86_64-*-64bit": 32,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 30,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 30,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 32

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 32,

+                 "fedora-Workstation-live-iso-x86_64-*-64bit": 30

              },

              "settings": {

                  "BOOTFROM": "c",
@@ -1018,6 +1056,17 @@ 

                  "POSTINSTALL": "_addrepo_metalink_post"

              }

          },

+         "i3_tilling": {

+             "profiles": {

+                 "fedora-i3-live-x86_64-*-64bit": 30

+             },

+             "settings": {

+                 "BOOTFROM": "c",

+                 "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",

+                 "POSTINSTALL": "i3_tilling",

+                 "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"

+             }

+         },

          "install_anaconda_text": {

              "profiles": {

                  "fedora-universal-aarch64-*-aarch64": 20,
@@ -1279,7 +1328,8 @@ 

                  "fedora-Server-boot-iso-x86_64-*-uefi": 11,

                  "fedora-Server-dvd-iso-x86_64-*-uefi": 11,

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-uefi": 51,

-                 "fedora-Workstation-live-iso-x86_64-*-uefi": 11

+                 "fedora-Workstation-live-iso-x86_64-*-uefi": 11,

+                 "fedora-i3-live-x86_64-*-64bit": 10

              },

              "settings": {

                  "PACKAGE_SET": "default",
@@ -1298,7 +1348,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50,

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 10,

-                 "fedora-Workstation-live-iso-x86_64-*-64bit": 10

+                 "fedora-Workstation-live-iso-x86_64-*-64bit": 10,

+                 "fedora-i3-live-x86_64-*-64bit": 20

              },

              "settings": {

                  "PACKAGE_SET": "default",
@@ -2118,7 +2169,8 @@ 

                  "fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,

                  "fedora-Workstation-live-iso-ppc64le-*-ppc64le": 40,

                  "fedora-Workstation-live-iso-x86_64-*-64bit": 40,

-                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42

+                 "fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 42,

+                 "fedora-i3-live-x86_64-*-64bit": 50

              },

              "settings": {

                  "BOOTFROM": "c",

file modified
+20 -13
@@ -5,6 +5,7 @@ 

  use utils;

  use tapnet;

  use anaconda;

+ use i3;

  

  sub run {

      my $self = shift;
@@ -113,19 +114,25 @@ 

          else {

              # on lives, we have to explicitly launch anaconda

              if (get_var('LIVE')) {

-                 assert_screen ["live_start_anaconda_icon", "apps_menu_button_active"], 300;

-                 send_key "alt-f1" if match_has_tag "apps_menu_button_active";

-                 # for KDE we need to double-click after kde-settings-34.6-1,

-                 # which is stable now.

-                 # FIXME: when F33 goes EOL, make the condition just "if kde"

-                 my $relnum = get_release_number;

-                 my $dclick = 0;

-                 $dclick = 1 if (get_var("DESKTOP") eq "kde" && $relnum > 33);

-                 assert_and_click("live_start_anaconda_icon", dclick=>$dclick);

-                 unless (check_screen "anaconda_select_install_lang", 180) {

-                     # click it again - on KDE since 2019-10 or so it seems

-                     # like the first attempt sometimes just doesn't work

-                     assert_and_click("live_start_anaconda_icon", dclick=>$dclick, timeout=>300);

+                 # i3 got no real desktop, so we need to launch liveinst via the launcher

+                 if (get_var('DESKTOP') eq 'i3') {

+                     firstlaunch_setup(timeout => 300);

+                     x11_start_program("liveinst");

+                 } else {

+                     assert_screen ["live_start_anaconda_icon", "apps_menu_button_active"], 300;

+                     send_key "alt-f1" if match_has_tag "apps_menu_button_active";

+                     # for KDE we need to double-click after kde-settings-34.6-1,

+                     # which is stable now.

+                     # FIXME: when F33 goes EOL, make the condition just "if kde"

+                     my $relnum = get_release_number;

+                     my $dclick = 0;

+                     $dclick = 1 if (get_var("DESKTOP") eq "kde" && $relnum > 33);

+                     assert_and_click("live_start_anaconda_icon", dclick=>$dclick);

+                     unless (check_screen "anaconda_select_install_lang", 180) {

+                         # click it again - on KDE since 2019-10 or so it seems

+                         # like the first attempt sometimes just doesn't work

+                         assert_and_click("live_start_anaconda_icon", dclick=>$dclick, timeout=>300);

+                     }

                  }

              }

              my $language = get_var('LANGUAGE') || 'english';

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

  use strict;

  use testapi;

  use utils;

+ use i3;

  

  sub run {

      my $self = shift;
@@ -106,6 +107,10 @@ 

          }

      }

  

+     if (get_var("DESKTOP") eq 'i3') {

+         firstlaunch_setup();

+     }

+ 

      # Move the mouse somewhere it won't highlight the match areas

      mouse_set(300, 800);

      # KDE can take ages to start up

file modified
+13 -1
@@ -2,9 +2,21 @@ 

  use strict;

  use testapi;

  use utils;

+ use i3;

  

  sub run {

-     check_desktop;

+     if (!get_var("BOOTFROM")) {

+         # If we are checking the desktop background on live, we will not get

+         # _graphical_wait_login scheduled and need to boot ourselves.

+         # On i3, we'll also get the firstlaunch wizard on auto-login and need to

+         # ignore it for check_desktop. We then run the firstlaunch setup so that

+         # the wizard window does not block the desktop background.

+         do_bootloader(postinstall=>0);

+         check_desktop(timeout => 120, no_firstlaunch_check => 1);

+         firstlaunch_setup() if (get_var("DESKTOP") eq "i3");

+     } else {

+         check_desktop;

+     }

      # If we want to check that there is a correct background used, as a part

      # of self identification test, we will do it here. For now we don't do

      # this for Rawhide as Rawhide doesn't have its own backgrounds and we

file modified
+8 -4
@@ -28,10 +28,14 @@ 

  sub run {

      my $self = shift;

      check_desktop;

-     send_key 'alt-f1';

-     # wait out animations

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

-     assert_and_click 'browser_launcher';

+     if (get_var("DESKTOP") eq "i3") {

+         x11_start_program("firefox");

+     } else {

+         send_key 'alt-f1';

+         # wait out animations

+         wait_still_screen(stilltime=>4, similarity_level=>45);

+         assert_and_click 'browser_launcher';

+     }

      assert_screen 'browser', 45;

      # firefox is quite grindy on startup, let it settle

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

file modified
+98 -29
@@ -2,12 +2,15 @@ 

  use strict;

  use testapi;

  use utils;

+ use i3;

  

  our $desktop = get_var("DESKTOP");

  our $syspwd = get_var("USER_PASSWORD") || "weakpassword";

  our $term = "gnome-terminal";

  if ($desktop eq "kde") {

      $term = "konsole";

+ } elsif ($desktop eq "i3") {

+     $term = "i3-sensible-terminal";

  }

  

  sub type_password {
@@ -21,12 +24,12 @@ 

  sub adduser {

      # Add user to the system.

      my %args = @_;

-     $args{termstop} //= 1;

      my $name = $args{name};

      my $login = $args{login};

      my $password = $args{password};

  

      assert_script_run "useradd -c '$name' $login";

+     assert_script_run "usermod -a -G dialout $login";

      if ($password ne "askuser") {

          # If we want to create a user with a defined password.

          assert_script_run "echo '$login:$password' | chpasswd";
@@ -45,19 +48,27 @@ 

          assert_script_run "mkdir /home/$login/.config";

          # gnome-initial-setup-done is obsolete from F34 onwards, can be removed after F33 EOL

          assert_script_run "echo 'yes' >> /home/$login/.config/gnome-initial-setup-done";

+     } elsif ($desktop eq "i3") {

+         create_user_i3_config(login => $login);

+     }

+ 

+     if ($desktop eq "gnome") {

          assert_script_run "chown -R $login.$login /home/$login/.config";

          assert_script_run "restorecon -vr /home/$login/.config";

      }

  }

  

  sub lock_screen {

-     # Click on buttons to lock the screen.

-     #my $desktop = get_var("DESKTOP");

-     assert_and_click "system_menu_button";

-     if ($desktop eq "kde") {

-         assert_and_click "leave_button";

+     if ($desktop eq "i3") {

+         x11_start_program("i3lock");

+     } else {

+         # Click on buttons to lock the screen.

+         assert_and_click "system_menu_button";

+         if ($desktop eq "kde") {

+             assert_and_click "leave_button";

+         }

+         assert_and_click "lock_button";

      }

-     assert_and_click "lock_button";

      wait_still_screen 10;

  }

  
@@ -70,14 +81,20 @@ 

      my $user = $args{user};

      my $password = $args{password};

      my $method = $args{method};

-     if (!check_screen "login_$user") {

+     if (!check_screen "login_$user" || ($desktop eq 'i3')) {

          # Sometimes, especially in SDDM, we do not get the user list

          # but rather a "screensaver" screen for the DM. If this is the

          # case, hit Escape to bring back the user list.

+         # We do want to skip this with lightdm though, as we would then deselect

+         # the password entry field

          send_key "esc";

          wait_still_screen 5;

      }

      if ($method ne "unlock") {

+         # on lightdm we have to open the drop down menu to get to the user selection

+         if (check_screen('lightdm_login_screen')) {

+             assert_and_click('lightdm_user_selection');

+         }

          # When we do not just want to unlock the screen, we need to select a user.

          assert_and_click "login_$user";

          wait_still_screen 5;
@@ -87,7 +104,16 @@ 

          # of password typing.

          type_very_safely "$password\n";

      }

-     type_very_safely "$password\n";

+ 

+     if (get_var('DESKTOP') ne 'i3') {

+         type_very_safely "$password\n";

+     } else {

+         # use essentially type_very_safely, but without wait_screen_change being

+         # set, because the i3lock screen does not change enough when typing a

+         # character and that just causes huge delays to unlock the screen

+         type_string("$password\n", max_interval => 1);

+     }

+ 

      check_desktop(timeout=>60) if ($args{checklogin});

      wait_still_screen 5;

  }
@@ -104,6 +130,13 @@ 

          menu_launch_type $term;

          wait_still_screen 2;

          $exitkey = "alt-f4";

+     } elsif ($desktop eq "i3") {

+         my $mod = get_i3_modifier();

+         send_key("$mod-ret");

+         assert_screen("apps_run_terminal");

+         assert_script_run('[ $(whoami) = "' . "$user\" ]");

+         wait_screen_change { send_key("$mod-shift-q"); };

+         return;

      }

      # With KDE, the user is shown in the main menu, so let us just

      # open this and see.
@@ -117,13 +150,20 @@ 

  }

  

  sub logout_user {

-     # Do steps to log out the user to reach the login screen.

-     assert_and_click "system_menu_button";

-     assert_and_click "leave_button";

-     assert_and_click "log_out_entry";

-     assert_and_click "log_out_confirm";

-     wait_still_screen 5;

-     sleep 10;

+     if ($desktop eq "i3") {

+         my $mod = get_i3_modifier();

+         send_key("$mod-shift-e");

+         assert_and_click("i3-logout-bar");

+         assert_screen("graphical_login_input");

+     } else {

+         # Do steps to log out the user to reach the login screen.

+         assert_and_click "system_menu_button";

+         assert_and_click "leave_button";

+         assert_and_click "log_out_entry";

+         assert_and_click "log_out_confirm";

+         wait_still_screen 5;

+         sleep 10;

+     }

  }

  

  sub switch_user {
@@ -146,7 +186,23 @@ 

      }

  }

  

+ sub reboot_system_i3 {

+     # we are still in i3 if the bar is visible

+     if (check_screen('i3-bar')) {

+         logout_user();

+     }

+     assert_and_click('lightdm_power_menu');

+     assert_and_click('lightdm_power_menu-reboot');

+     assert_and_click('lightdm_power_menu-reboot-confirm');

+     boot_to_login_screen();

+ }

+ 

  sub reboot_system {

+     if ($desktop eq 'i3') {

+         reboot_system_i3();

+         return;

+     }

+ 

      # Reboots the system and handles everything until the next GDM screen.

      if (check_screen "system_menu_button") {

          # In a logged in desktop, we access power options through system menu
@@ -168,12 +224,23 @@ 

  

  sub power_off {

      # Powers-off the machine.

-     assert_and_click "system_menu_button";

-     # in KDE since F34, there's no submenu to access, the button is right here

-     assert_screen ["power_entry", "power_off_entry"];

-     click_lastmatch;

-     assert_and_click "power_off_entry" if (match_has_tag("power_entry"));

-     assert_and_click "power_off_confirm";

+     if (get_var('DESKTOP') eq 'i3') {

+         # we are still in i3 if the bar is visible

+         if (check_screen('i3-bar')) {

+             logout_user();

+         }

+         assert_screen('lightdm_login_screen');

+         send_key('alt-f4');

+         assert_and_click('lightdm_power_menu-shutdown-confirm');

+     }

+     else {

+         assert_and_click "system_menu_button";

+         # in KDE since F34, there's no submenu to access, the button is right here

+         assert_screen ["power_entry", "power_off_entry"];

+         click_lastmatch;

+         assert_and_click "power_off_entry" if (match_has_tag("power_entry"));

+         assert_and_click "power_off_confirm";

+     }

      assert_shutdown;

  }

  
@@ -237,14 +304,16 @@ 

      # Try to log in with either account, intentionally entering the wrong password.

      login_user(user=>"jack", password=>"wrongpassword", checklogin=>0);

      my $relnum = get_release_number;

-     if ($desktop eq "gnome" && $relnum < 34) {

-         # In GDM before F34, a message is shown about an unsuccessful login

-         # and it can be asserted, so let's do it. In SDDM and GDM F34+,

-         # there is also a message, but it is only displayed for a short

-         # moment and the assertion fails here,  so we will skip the assertion.

-         # Not being able to login in with a wrong password is enough here.

+     if (($desktop eq "gnome" && $relnum < 34) || $desktop eq 'i3') {

+         # In GDM before F34 or lightdm (used by i3), a message is shown about an

+         # unsuccessful login and it can be asserted, so let's do it. In SDDM and

+         # GDM F34+, there is also a message, but it is only displayed for a

+         # short moment and the assertion fails here, so we will skip the

+         # assertion.  Not being able to login in with a wrong password is enough

+         # here.

          assert_screen "login_wrong_password";

-         send_key 'esc';

+         # don't send escape in lightdm, it does nothing there

+         send_key 'esc' unless $desktop eq 'i3';

      }

      send_key 'esc' unless (check_screen "login_jim");

  

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

  use testapi;

  use utils;

  use packagetest;

+ use i3;

  

  # This test sort of covers QA:Testcase_desktop_update_notification

  # and QA:Testcase_desktop_error_checks . If it fails, probably *one*
@@ -26,6 +27,7 @@ 

      $self->root_console(tty=>1);

      # ensure we actually have some package updates available

      prepare_test_packages;

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

      if ($desktop eq 'gnome') {

          # On GNOME, move the clock forward if needed, because it won't

          # check for updates before 6am(!)
@@ -46,7 +48,7 @@ 

              my $longago = $now - 14*24*60*60;

              # have to log in as the user to do this

              script_run 'exit', 0;

-             console_login(user=>get_var('USER_LOGIN', 'test'), password=>get_var('USER_PASSWORD', 'weakpassword'));

+             console_login(user=>$user, password=>get_var('USER_PASSWORD', 'weakpassword'));

              script_run "gsettings set org.gnome.software check-timestamp ${yyday}", 0;

              script_run "gsettings set org.gnome.software update-notification-timestamp ${longago}", 0;

              script_run "gsettings set org.gnome.software online-updates-timestamp ${longago}", 0;
@@ -56,6 +58,14 @@ 

              script_run 'exit', 0;

              console_login(user=>'root', password=>get_var('ROOT_PASSWORD', 'weakpassword'));

          }

+     } elsif ($desktop eq 'i3') {

+         assert_script_run('dnf install -y libnotify');

+         my $target_user = get_var("USER_LOGIN");

+         if (!defined(get_var("BOOTFROM"))) {

+             $target_user = "liveuser";

+         }

+         assert_script_run("usermod -a -G dialout $target_user");

+         create_user_i3_config(login => $target_user);

      }

      # can't use assert_script_run here as long as we're on tty1

      type_string "systemctl isolate graphical.target\n";
@@ -117,6 +127,21 @@