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

Add needle for Win11 aarch64 obsolete build popup #20179

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions lib/windowsbasetest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,30 @@ sub wait_boot_windows {
$self->run_in_powershell(cmd => 'exit', code => sub { });
} else {
record_info("Win boot", "Windows started properly");
assert_screen ['finish-setting', 'windows-desktop'], 240;
if (match_has_tag 'finish-setting') {
assert_and_click 'finish-setting';
assert_screen ['finish-setting', 'windows-desktop', 'obsolete-build-aarch64'], 240;
# poo#166205 --> A pop-up for obsolete build has shown up. As we're in
# an early development state without access to official ARM ISOs, we
# must just click the pop-up and continue the test run
if ((is_aarch64) && (match_has_tag 'obsolete-build-aarch64')) {
click_lastmatch;
# The 'finish-setting' screen stays after closing the pop-up so
# there's need to check screen again
assert_screen ['finish-setting', 'windows-desktop'];
}
click_lastmatch if (match_has_tag 'finish-setting');

# As the aarch64 image is being created manually by now, these
# commands are not added.
# This piece of code should be removed if the image creation is
# automated at some point.
if (is_aarch64) {
$self->open_powershell_as_admin;
$self->run_in_powershell(cmd => 'reg add "HKLM\Software\Policies\Microsoft\Windows" /v Explorer');
$self->run_in_powershell(cmd => 'reg add "HKLM\Software\Policies\Microsoft\Windows\Explorer" /v DisableNotificationCenter /t REG_DWORD /d 1');
$self->run_in_powershell(cmd => 'reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\PushNotifications" /v ToastEnabled /t REG_DWORD /d 0');
$self->run_in_powershell(cmd => 'Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name WUAUHandoffEnabled -Value 0');
$self->run_in_powershell(cmd => '$port.close()', code => sub { });
$self->run_in_powershell(cmd => 'exit', code => sub { });
}
}
}
Expand Down
Loading