-
Notifications
You must be signed in to change notification settings - Fork 273
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
Handle java license popup during installation #16346
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2022 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: The class introduces methods to handle | ||
# an Accept license popup. | ||
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de> | ||
|
||
package Installation::Popups::AcceptPopup; | ||
use strict; | ||
use warnings; | ||
|
||
sub new { | ||
my ($class, $args) = @_; | ||
my $self = bless { | ||
app => $args->{app} | ||
}, $class; | ||
return $self->init(); | ||
} | ||
|
||
sub init { | ||
my $self = shift; | ||
$self->{btn_accept} = $self->{app}->button({id => 'accept'}); | ||
return $self; | ||
} | ||
|
||
sub is_shown { | ||
my ($self) = @_; | ||
$self->{btn_accept}->exist(); | ||
} | ||
|
||
sub press_accept { | ||
my ($self) = @_; | ||
$self->{btn_accept}->click(); | ||
} | ||
|
||
1; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2021 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: The class introduces business actions for Popups with Accept option | ||
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de> | ||
|
||
package Installation::Popups::AcceptPopupController; | ||
use strict; | ||
use warnings; | ||
use YuiRestClient; | ||
use YuiRestClient::Wait; | ||
use Installation::Popups::AcceptPopup; | ||
|
||
sub new { | ||
my ($class, $args) = @_; | ||
my $self = bless {}, $class; | ||
return $self->init(); | ||
} | ||
|
||
sub init { | ||
my ($self) = @_; | ||
$self->{AcceptPopup} = Installation::Popups::AcceptPopup->new({app => YuiRestClient::get_app()}); | ||
return $self; | ||
} | ||
|
||
sub wait_accept_popup { | ||
my ($self, $args) = @_; | ||
YuiRestClient::Wait::wait_until(object => sub { | ||
$self->{AcceptPopup}->is_shown({timeout => 0}); | ||
}, %$args); | ||
} | ||
|
||
sub get_accept_popup { | ||
my ($self) = @_; | ||
die 'Accept Popup is not displayed' unless $self->{AcceptPopup}->is_shown(); | ||
return $self->{AcceptPopup}; | ||
} | ||
|
||
sub accept { | ||
my ($self) = @_; | ||
$self->get_accept_popup()->press_accept(); | ||
} | ||
|
||
1; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2021 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: This test module confirms the popup for Package license. | ||
|
||
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de> | ||
|
||
use strict; | ||
use warnings; | ||
use base 'y2_installbase'; | ||
|
||
sub run { | ||
my $package_license_popup = $testapi::distri->get_accept_popup_controller(); | ||
$package_license_popup->wait_accept_popup({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't need to wait for some action in progress to capture this popup, it appears immediately after clicking install, only accept should work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't work without the wait |
||
timeout => 3000, | ||
interval => 2, | ||
message => 'Accept license popup did not appear'}); | ||
|
||
$package_license_popup->accept(); | ||
} | ||
|
||
1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2023 and rest of the files.