-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13750 from ge0r/activate_dasd
Handle dasd activation via libyui-rest-api
- Loading branch information
Showing
13 changed files
with
171 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
lib/Installation/DiskActivation/DASDDiskManagementController.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2021 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: This class introduces business actions for DASD Disk Management page | ||
# Maintainer: QE YaST <[email protected]> | ||
|
||
package Installation::DiskActivation::DASDDiskManagementController; | ||
use strict; | ||
use warnings; | ||
use Installation::DiskActivation::DASDDiskManagementPage; | ||
use YuiRestClient; | ||
|
||
sub new { | ||
my ($class, $args) = @_; | ||
my $self = bless {}, $class; | ||
return $self->init($args); | ||
} | ||
|
||
sub init { | ||
my ($self, $args) = @_; | ||
$self->{DASDDiskManagementPage} = Installation::DiskActivation::DASDDiskManagementPage->new({app => YuiRestClient::get_app()}); | ||
return $self; | ||
} | ||
|
||
sub get_dasd_disk_management_page { | ||
my ($self) = @_; | ||
die "DASD Disk Management page is not displayed" unless $self->{DASDDiskManagementPage}->is_shown(); | ||
return $self->{DASDDiskManagementPage}; | ||
} | ||
|
||
sub filter_channel { | ||
my ($self, $channel) = @_; | ||
$self->get_dasd_disk_management_page()->enter_minimum_channel($channel); | ||
$self->get_dasd_disk_management_page()->enter_maximum_channel($channel); | ||
$self->get_dasd_disk_management_page()->press_filter_button(); | ||
} | ||
|
||
sub activate_device { | ||
my ($self, $channel) = @_; | ||
$self->get_dasd_disk_management_page()->select_device($channel); | ||
$self->get_dasd_disk_management_page()->perform_action_activate(); | ||
} | ||
|
||
sub accept_configuration { | ||
my ($self) = @_; | ||
$self->get_dasd_disk_management_page()->press_next(); | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2021 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: Handles DASD Disk Management page | ||
# Maintainer: QE YaST <[email protected]> | ||
|
||
package Installation::DiskActivation::DASDDiskManagementPage; | ||
use parent 'Installation::Navigation::NavigationBase'; | ||
use strict; | ||
use warnings; | ||
|
||
sub init { | ||
my ($self) = @_; | ||
$self->SUPER::init(); | ||
$self->{tbx_minimum_channel} = $self->{app}->textbox({id => 'min_chan'}); | ||
$self->{tbx_maximum_channel} = $self->{app}->textbox({id => 'max_chan'}); | ||
$self->{btn_filter} = $self->{app}->button({id => 'filter'}); | ||
$self->{tbl_devices} = $self->{app}->table({id => 'table'}); | ||
$self->{mco_operation} = $self->{app}->menucollection({id => 'operation'}); | ||
return $self; | ||
} | ||
|
||
sub is_shown { | ||
my ($self) = @_; | ||
return $self->{mco_operation}->exist(); | ||
} | ||
|
||
sub enter_minimum_channel { | ||
my ($self, $channel) = @_; | ||
return $self->{tbx_minimum_channel}->set($channel); | ||
} | ||
|
||
sub enter_maximum_channel { | ||
my ($self, $channel) = @_; | ||
return $self->{tbx_maximum_channel}->set($channel); | ||
} | ||
|
||
sub press_filter_button { | ||
my ($self) = @_; | ||
return $self->{btn_filter}->click(); | ||
} | ||
|
||
sub get_devices { | ||
my ($self) = @_; | ||
return $self->{tbl_devices}->items(); | ||
} | ||
|
||
sub select_device { | ||
my ($self, $channel) = @_; | ||
return $self->{tbl_devices}->select(value => $channel); | ||
} | ||
|
||
sub perform_action_activate { | ||
my ($self) = @_; | ||
$self->{mco_operation}->select('Activate'); | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2021 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: Activates a device in DASD disk management page | ||
# Maintainer: QE YaST <[email protected]> | ||
|
||
use parent 'y2_installbase'; | ||
use strict; | ||
use warnings; | ||
|
||
sub run { | ||
my $dasd_disk_management = $testapi::distri->get_dasd_disk_management(); | ||
$dasd_disk_management->activate_device('0.0.0150'); | ||
$dasd_disk_management->accept_configuration(); | ||
} | ||
|
||
1; |
18 changes: 18 additions & 0 deletions
18
tests/installation/disk_activation/select_configure_dasd_disks.pm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2021 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Summary: Selects DASD disk configuration in disk activation page | ||
# Maintainer: QE YaST <[email protected]> | ||
|
||
use base 'y2_installbase'; | ||
use strict; | ||
use warnings; | ||
|
||
sub run { | ||
my $disk_activation = $testapi::distri->get_disk_activation(); | ||
$disk_activation->configure_dasd_disks(); | ||
} | ||
|
||
1; |