Skip to content

Commit

Permalink
lib/y2_installbase.pm: Create go_to_security_settings method
Browse files Browse the repository at this point in the history
Used by enable_selinux and a future enable_apparmor module.
  • Loading branch information
Vogtinator committed Feb 6, 2025
1 parent ade60d3 commit 14c713b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
23 changes: 23 additions & 0 deletions lib/y2_installbase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,29 @@ sub go_to_search_packages {
}
}

=head2 go_to_security_settings
go_to_security_settings();
From the installation overview screen, open the security settings.
=cut

sub go_to_security_settings {
my ($self) = @_;
assert_screen "installation-settings-overview-loaded";
if (check_var('VIDEOMODE', 'text')) {
send_key $cmd{change};
assert_screen 'inst-overview-options';
send_key 'alt-e';
}
else {
send_key_until_needlematch 'security-section-selected', 'tab', 31, 2;
send_key 'ret';
}

wait_still_screen stilltime => 9, timeout => 45;
}

=head2 move_down
move_down();
Expand Down
17 changes: 3 additions & 14 deletions tests/installation/enable_selinux.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,10 @@ use testapi;
use version_utils qw(is_sle_micro is_leap_micro);

sub run {
my ($self) = @_;
my $textmode = check_var('VIDEOMODE', 'text');
# Verify Installation Settings overview is displayed as starting point
assert_screen "installation-settings-overview-loaded";

if ($textmode) {
# Select section booting on Installation Settings overview on text mode
send_key $cmd{change};
assert_screen 'inst-overview-options';
send_key 'alt-e';
}
else {
# Select section booting on Installation Settings overview (video mode)
send_key_until_needlematch 'security-section-selected', 'tab', 31, 2;
send_key 'ret';
}

$self->go_to_security_settings();

if (is_sle_micro('<5.3') || is_leap_micro('<5.3')) {
# Combobox for SELinux specifically
Expand Down

0 comments on commit 14c713b

Please sign in to comment.