Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
|
|
|
our $desktop = get_var("DESKTOP");
|
|
|
|
our $syspwd = get_var("USER_PASSWORD") || "weakpassword";
|
|
|
|
|
|
|
|
sub type_password {
|
|
|
|
# Safe typing prolongs the operation terribly.
|
|
|
|
# Let's just use type_string and wait afterwards.
|
|
|
|
my $string = shift;
|
|
|
|
type_string "$string\n";
|
|
|
|
sleep 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub adduser {
|
|
|
|
# Add user to the system.
|
|
|
|
my %args = @_;
|
|
|
|
my $name = $args{name};
|
|
|
|
my $login = $args{login};
|
|
|
|
my $password = $args{password};
|
|
|
|
|
|
|
|
assert_script_run "useradd -c '$name' $login";
|
2020-10-17 22:22:09 +00:00
|
|
|
assert_script_run "usermod -a -G dialout $login";
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
if ($password ne "askuser") {
|
|
|
|
# If we want to create a user with a defined password.
|
2020-11-12 18:26:10 +00:00
|
|
|
assert_script_run "echo '$login:$password' | chpasswd";
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
# If we want to create a user without a password,
|
|
|
|
# that forces GDM to create a password upon the
|
|
|
|
# first login.
|
|
|
|
assert_script_run "passwd -d $login";
|
|
|
|
assert_script_run "chage --lastday 0 $login";
|
|
|
|
}
|
|
|
|
assert_script_run "grep $login /etc/passwd";
|
2024-06-20 13:39:34 +00:00
|
|
|
# Create Config file for $login.
|
|
|
|
if ($desktop eq "i3") {
|
|
|
|
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");
|
|
|
|
assert_script_run("sed -i '/i3-config-wizard/d' /home/$login/.config/i3/config");
|
|
|
|
assert_script_run "chown -R $login:$login /home/$login/.config";
|
2020-10-17 22:22:09 +00:00
|
|
|
assert_script_run "restorecon -vr /home/$login/.config";
|
|
|
|
}
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub lock_screen {
|
2020-10-17 22:22:09 +00:00
|
|
|
if ($desktop eq "i3") {
|
|
|
|
x11_start_program("i3lock");
|
2024-06-20 13:39:34 +00:00
|
|
|
}
|
|
|
|
else {
|
2020-10-17 22:22:09 +00:00
|
|
|
# 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";
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
wait_still_screen 10;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub login_user {
|
|
|
|
# Do steps to unlock a previously locked screen. We use it to handle
|
|
|
|
# logins as well, because it is practically the same.
|
|
|
|
my %args = @_;
|
|
|
|
$args{checklogin} //= 1;
|
|
|
|
$args{method} //= "";
|
|
|
|
my $user = $args{user};
|
|
|
|
my $password = $args{password};
|
|
|
|
my $method = $args{method};
|
2024-06-20 13:39:34 +00:00
|
|
|
if (($method ne 'unlock' && !check_screen "login_$user") || $desktop eq "i3") {
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
# Sometimes, especially in SDDM, we do not get the user list
|
2024-06-20 13:39:34 +00:00
|
|
|
# but rather a "screensaver" screen for the DM.
|
|
|
|
# We send the Esc key to come back to the login screen.
|
|
|
|
send_key('esc');
|
2022-07-28 20:32:57 +00:00
|
|
|
wait_still_screen(stilltime => 5, similarity_level => 45);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
if ($method ne "unlock") {
|
2020-10-17 22:22:09 +00:00
|
|
|
# on lightdm we have to open the drop down menu to get to the user selection
|
2024-06-20 13:39:34 +00:00
|
|
|
if ($desktop eq "i3") {
|
2020-10-17 22:22:09 +00:00
|
|
|
assert_and_click('lightdm_user_selection');
|
|
|
|
}
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
# When we do not just want to unlock the screen, we need to select a user.
|
2023-02-18 19:47:07 +00:00
|
|
|
if (check_screen "login_$user", 30) {
|
|
|
|
click_lastmatch;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
record_soft_failure "logout seems to be taking too long";
|
|
|
|
assert_and_click "login_$user";
|
|
|
|
}
|
2022-07-28 20:32:57 +00:00
|
|
|
wait_still_screen(stilltime => 5, similarity_level => 45);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
if ($method eq "create") {
|
|
|
|
# With users that do not have passwords, we need to make an extra round
|
|
|
|
# of password typing.
|
2020-11-12 19:25:52 +00:00
|
|
|
type_very_safely "$password\n";
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
2024-06-20 13:39:34 +00:00
|
|
|
if (get_var('DESKTOP') eq 'i3') {
|
2020-10-17 22:22:09 +00:00
|
|
|
# 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);
|
|
|
|
}
|
2024-06-20 13:39:34 +00:00
|
|
|
else {
|
|
|
|
type_very_safely "$password\n";
|
|
|
|
}
|
2020-10-17 22:22:09 +00:00
|
|
|
check_desktop(timeout => 60) if ($args{checklogin});
|
|
|
|
wait_still_screen(stilltime => 5, similarity_level => 45);
|
2024-06-20 13:39:34 +00:00
|
|
|
if ($desktop eq "kde") {
|
|
|
|
click_lastmatch if (check_screen "getting_started");
|
|
|
|
}
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub check_user_logged_in {
|
|
|
|
# Performs a check that a correct user has been locked in.
|
|
|
|
my $user = shift;
|
2021-05-06 16:52:13 +00:00
|
|
|
my $exitkey;
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
# In Gnome, the name of the user was accessible through menu
|
|
|
|
# in the upper right corner, but apparently it has been removed.
|
|
|
|
# Reading the login name from the terminal prompt seems to be
|
|
|
|
# the most reliable thing to do.
|
|
|
|
if ($desktop eq "gnome") {
|
2024-06-20 13:39:34 +00:00
|
|
|
menu_launch_type("terminal");
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
wait_still_screen 2;
|
2021-05-06 16:52:13 +00:00
|
|
|
$exitkey = "alt-f4";
|
2024-06-20 13:39:34 +00:00
|
|
|
}
|
|
|
|
elsif ($desktop eq "i3") {
|
|
|
|
send_key("alt-ret");
|
2020-10-17 22:22:09 +00:00
|
|
|
assert_screen("apps_run_terminal");
|
|
|
|
assert_script_run('[ $(whoami) = "' . "$user\" ]");
|
2024-06-20 13:39:34 +00:00
|
|
|
wait_screen_change { send_key("alt-shift-q"); };
|
2020-10-17 22:22:09 +00:00
|
|
|
return;
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
# With KDE, the user is shown in the main menu, so let us just
|
|
|
|
# open this and see.
|
|
|
|
else {
|
|
|
|
assert_and_click "system_menu_button";
|
2021-05-06 16:52:13 +00:00
|
|
|
$exitkey = "esc";
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
assert_screen "user_confirm_$user";
|
2021-05-06 16:52:13 +00:00
|
|
|
send_key $exitkey;
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
wait_still_screen 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
sub logout_user {
|
2020-10-17 22:22:09 +00:00
|
|
|
if ($desktop eq "i3") {
|
2024-06-20 13:39:34 +00:00
|
|
|
send_key("alt-shift-e");
|
2020-10-17 22:22:09 +00:00
|
|
|
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;
|
|
|
|
}
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub switch_user {
|
|
|
|
# Switch the user, i.e. leave the current user logged in and
|
|
|
|
# log in another user simultaneously.
|
2020-04-22 11:39:57 +00:00
|
|
|
send_key "ret";
|
2020-04-24 17:39:12 +00:00
|
|
|
if (check_screen "locked_screen_switch_user", 5) {
|
2020-04-22 11:39:57 +00:00
|
|
|
assert_and_click "locked_screen_switch_user";
|
|
|
|
}
|
|
|
|
elsif (check_screen "system_menu_button") {
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
# The system_menu_button indicates that we are in an active
|
|
|
|
# and unlocked session, where user switching differs
|
|
|
|
# from a locked but active session.
|
|
|
|
assert_and_click "system_menu_button";
|
2021-02-12 21:34:04 +00:00
|
|
|
assert_and_click "leave_button";
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
assert_and_click "switch_user_entry";
|
|
|
|
wait_still_screen 5;
|
|
|
|
# Add sleep to slow down the process a bit
|
|
|
|
sleep 10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sub reboot_system {
|
2020-10-17 22:22:09 +00:00
|
|
|
if ($desktop eq 'i3') {
|
2024-06-20 13:39:34 +00:00
|
|
|
# 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');
|
2020-10-17 22:22:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Reboots the system and handles everything until the next GDM screen.
|
2024-06-20 13:39:34 +00:00
|
|
|
else {
|
2020-10-17 22:22:09 +00:00
|
|
|
# In a logged in desktop, we access power options through system menu
|
|
|
|
assert_and_click "system_menu_button";
|
2024-06-20 13:39:34 +00:00
|
|
|
# In KDE reboot entry is right here, on GNOME we need to
|
2020-10-17 22:22:09 +00:00
|
|
|
# enter some kind of power option submenu
|
|
|
|
assert_screen ["power_entry", "reboot_entry"];
|
|
|
|
click_lastmatch;
|
|
|
|
assert_and_click "reboot_entry" if (match_has_tag("power_entry"));
|
|
|
|
assert_and_click "restart_confirm";
|
|
|
|
}
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
boot_to_login_screen();
|
|
|
|
}
|
|
|
|
|
|
|
|
sub power_off {
|
2021-07-21 08:04:36 +00:00
|
|
|
# Powers-off the machine.
|
2020-10-17 22:22:09 +00:00
|
|
|
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;
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
# Do a default installation of the Fedora release you wish to test. Create two user accounts.
|
|
|
|
my $self = shift;
|
|
|
|
my $jackpass = "kozapanijezibaby";
|
|
|
|
my $jimpass = "babajagakozaroza";
|
|
|
|
our $desktop = get_var("DESKTOP");
|
2020-11-12 21:08:20 +00:00
|
|
|
# replace the wallpaper with a black image, this should work for
|
|
|
|
# all desktops. Takes effect after a logout / login cycle
|
2022-07-28 20:32:57 +00:00
|
|
|
$self->root_console(tty => 3);
|
2020-11-12 21:08:20 +00:00
|
|
|
assert_script_run "dnf -y install GraphicsMagick", 300;
|
|
|
|
assert_script_run "gm convert -size 1024x768 xc:black /usr/share/backgrounds/black.png";
|
2022-09-28 15:41:45 +00:00
|
|
|
assert_script_run "gm convert -size 1024x768 xc:black /usr/share/backgrounds/black.webp";
|
2022-10-10 13:04:06 +00:00
|
|
|
if (script_run 'for i in /usr/share/backgrounds/f*/default/*.png; do ln -sf /usr/share/backgrounds/black.png $i; done') {
|
2022-09-28 15:41:45 +00:00
|
|
|
# if that failed, they're probably in webp format
|
2022-10-10 13:04:06 +00:00
|
|
|
assert_script_run 'for i in /usr/share/backgrounds/f*/default/*.webp; do ln -sf /usr/share/backgrounds/black.webp $i; done';
|
2022-09-28 15:41:45 +00:00
|
|
|
}
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
if ($desktop eq "kde") {
|
2020-11-12 21:08:20 +00:00
|
|
|
# use solid blue background for SDDM
|
2023-12-06 01:17:42 +00:00
|
|
|
# theme.conf.user was dropped in 5.90.0-2.fc40, doing
|
|
|
|
# theme.conf* should work before and after
|
|
|
|
assert_script_run "sed -i -e 's,image,solid,g' /usr/share/sddm/themes/01-breeze-fedora/theme.conf*";
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
2022-07-28 20:32:57 +00:00
|
|
|
adduser(name => "Jack Sparrow", login => "jack", password => $jackpass);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
if ($desktop eq "gnome") {
|
2021-02-18 20:15:06 +00:00
|
|
|
# suppress the Welcome Tour for new users in GNOME 40+
|
2021-02-18 22:16:14 +00:00
|
|
|
assert_script_run 'printf "[org.gnome.shell]\nwelcome-dialog-last-shown-version=\'4294967295\'\n" > /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override';
|
2022-03-08 00:38:30 +00:00
|
|
|
# Disable automatic update installation (so we don't install an update
|
|
|
|
# to fXX-backgrounds and put the 'real' image back when we reboot)
|
|
|
|
assert_script_run 'printf "[org.gnome.software]\ndownload-updates=false\n" > /usr/share/glib-2.0/schemas/org.gnome.software.gschema.override';
|
2021-02-18 22:16:14 +00:00
|
|
|
assert_script_run 'glib-compile-schemas /usr/share/glib-2.0/schemas';
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
# In Gnome, we can create a passwordless user that can provide his password upon
|
|
|
|
# the first login. So we can create the second user in this way to test this feature
|
|
|
|
# later.
|
2022-07-28 20:32:57 +00:00
|
|
|
adduser(name => "Jim Eagle", login => "jim", password => "askuser");
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
# In KDE, we can also create a passwordless user, but we cannot log into the system
|
|
|
|
# later, so we will create the second user the standard way.
|
2022-07-28 20:32:57 +00:00
|
|
|
adduser(name => "Jim Eagle", login => "jim", password => $jimpass);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Clean boot the system, and note what accounts are listed on the login screen.
|
2020-11-13 01:42:43 +00:00
|
|
|
# There is no need to check specifically if the users are listed, because if they
|
|
|
|
# are not, the login tests will fail later.
|
|
|
|
script_run "systemctl reboot", 0;
|
|
|
|
boot_to_login_screen;
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
|
|
|
|
# Log in with the first user account.
|
2022-07-28 20:32:57 +00:00
|
|
|
login_user(user => "jack", password => $jackpass);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
check_user_logged_in("jack");
|
|
|
|
# Log out the user.
|
|
|
|
logout_user();
|
|
|
|
|
|
|
|
# Log in with the second user account. The second account, Jim Eagle,
|
|
|
|
if ($desktop eq "gnome") {
|
|
|
|
# If we are in Gnome, we will this time assign a password on first log-in.
|
2022-07-28 20:32:57 +00:00
|
|
|
login_user(user => "jim", password => $jimpass, method => "create");
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
# If not, we are in KDE and we will log in normally.
|
2022-07-28 20:32:57 +00:00
|
|
|
login_user(user => "jim", password => $jimpass);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
check_user_logged_in("jim");
|
|
|
|
# And this time reboot the system using the menu.
|
|
|
|
reboot_system();
|
|
|
|
|
|
|
|
# Try to log in with either account, intentionally entering the wrong password.
|
2024-06-20 13:39:34 +00:00
|
|
|
login_user(user => "jack", password => "wrongpassword", checklogin => 0);
|
2020-10-17 22:22:09 +00:00
|
|
|
my $relnum = get_release_number;
|
2024-06-20 13:39:34 +00:00
|
|
|
if ($desktop eq 'i3') {
|
|
|
|
# In LightDM (used by i3), a message is shown about an
|
|
|
|
# unsuccessful login and it can be asserted, so let's do it.
|
2020-10-17 22:22:09 +00:00
|
|
|
assert_screen "login_wrong_password";
|
|
|
|
}
|
2021-05-03 22:54:41 +00:00
|
|
|
send_key 'esc' unless (check_screen "login_jim");
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
|
2021-03-11 01:00:01 +00:00
|
|
|
# Now, log into the system again using the correct password. This will
|
|
|
|
# only work if we were correctly denied login with the wrong password,
|
|
|
|
# if we were let in with the wrong password it'll fail
|
2022-07-28 20:32:57 +00:00
|
|
|
login_user(user => "jim", password => $jimpass);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
check_user_logged_in("jim");
|
|
|
|
|
|
|
|
# Lock the screen and unlock again.
|
|
|
|
lock_screen();
|
|
|
|
# Use the password to unlock the screen.
|
2022-07-28 20:32:57 +00:00
|
|
|
login_user(user => "jim", password => $jimpass, method => "unlock");
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
|
|
|
|
# Switch user tests
|
|
|
|
if ($desktop eq "gnome") {
|
|
|
|
# Because KDE at the moment (20200403) is very unreliable concerning switching the users inside
|
|
|
|
# the virtual machine, we will skip this part, until situation is better. Switching users will
|
|
|
|
# be only tested in Gnome.
|
|
|
|
|
|
|
|
# Start a terminal session to monitor on which sessions we are, when we start switching users.
|
|
|
|
# This time, we will open the terminal window manually because we want to leave it open later.
|
|
|
|
menu_launch_type "terminal";
|
|
|
|
wait_still_screen 2;
|
|
|
|
# Initiate switch user
|
|
|
|
switch_user();
|
|
|
|
# Now, we get a new login screen, so let's do the login into the new session.
|
2022-07-28 20:32:57 +00:00
|
|
|
login_user(user => "jack", password => $jackpass);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
# Check that it is a new session, the terminal window should not be visible.
|
|
|
|
if (check_screen "user_confirm_jim") {
|
|
|
|
die "The session was not switched!";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
check_user_logged_in("jack");
|
|
|
|
}
|
|
|
|
# Log out the user.
|
|
|
|
logout_user();
|
|
|
|
# Now, let us log into the original session, this time, the terminal window
|
|
|
|
# should still be visible.
|
2022-07-28 20:32:57 +00:00
|
|
|
login_user(user => "jim", password => $jimpass);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
assert_screen "user_confirm_jim";
|
|
|
|
|
|
|
|
# We will also test another alternative - switching the user from
|
|
|
|
# a locked screen.
|
|
|
|
lock_screen();
|
|
|
|
send_key "ret";
|
|
|
|
switch_user();
|
2022-07-28 20:32:57 +00:00
|
|
|
login_user(user => "jack", password => $jackpass);
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
check_user_logged_in("jack");
|
|
|
|
}
|
|
|
|
# Power off the machine
|
|
|
|
power_off();
|
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
2022-07-28 20:32:57 +00:00
|
|
|
return {fatal => 1};
|
Add desktop login test, revise and rename check_desktop
This adds a new test that implementsQA:Testcase_desktop_login
on both GNOME and KDE.
While working on this, we realized that the "desktop_clean"
needles were really "app menu" needles, and for KDE, this was
a duplication with the new "system menu" needles, because on KDE
the app menu and the system menu are the same. So I (Adam)
started to de-duplicate that, but also realized that "app menu
button" is a much more accurate name for these needles, so I was
renaming the old desktop_clean needles to app_menu_button. That
led me to the realization that "check_desktop_clean" is itself a
dumb name, because we don't (at least, any more, way back in the
mists of time we may have done) do anything to check that the
desktop is "clean" - we're really just asserting that we're at a
desktop *at all*. While thinking *that* through, I *also* realized
that the whole "open the overview and look for the app grid icon"
workaround it did is no longer necessary, because GNOME doesn't
use a translucent top bar any more. That went away in GNOME 3.32,
which is in Fedora 30, our oldest supported release.
So I threw that away, renamed the function "check_desktop",
cleaned up all the needle naming and tagging, and also added an
app menu needle for GNOME in Japanese because we were missing
one (the Japanese tests have been using the "app grid icon"
workaround the whole time).
2020-03-20 09:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|