Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement system role selection without shortcut usage #4674

Merged
merged 1 commit into from
Mar 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 17 additions & 2 deletions tests/installation/system_role.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use strict;
use base "y2logsstep";
use testapi;
use version_utils 'is_sle';


my %role_hotkey = (
Expand All @@ -26,8 +27,22 @@ my %role_hotkey = (

sub change_system_role {
my ($system_role) = @_;
send_key 'alt-' . $role_hotkey{$system_role};
assert_screen "system-role-$system_role-selected";
# Since SLE 15 we do not have shortcuts for system roles anymore
if (is_sle '15+') {
if (check_var('VIDEOMODE', 'text')) {
# Expect that no actions are done before and default system role is preselected
send_key_until_needlematch "system-role-$system_role-focused", 'down'; # select role
send_key_until_needlematch "system-role-$system_role-selected", 'spc'; # enable role
}
else {
assert_and_click "system-role-$system_role";
assert_screen "system-role-$system_role-selected";
}
}
else {
send_key 'alt-' . $role_hotkey{$system_role};
assert_screen "system-role-$system_role-selected";
}
# every system role other than default will end up in textmode
set_var('DESKTOP', 'textmode');
}
Expand Down