action #125561
Updated by JERiveraMoya about 1 year ago
#### Motivation
When we fix the ticket [124964](https://progress.opensuse.org/issues/124964), we use code like this
~~~ text
my $timeout = YuiRestClient::get_timeout() * get_var('TIMEOUT_SCALE', 1);
my $product_selection = $testapi::distri->get_product_selection();
$product_selection->wait_product_selection_page({timeout => $timeout, message => 'Product Selection page is not displayed'});
~~~
But we should pass the timeout scale as a parameter to not introduce dependency with YuiRestClientin the Test Layer, then we would repeat that operation (multiplication) in several places in the code and we need some object to encapsulate it to avoid that. which looks like this:
~~~ text
$product_selection->wait_product_selection_page({timeout_scale => get_var('TIMEOUT_SCALE', 1), message => 'Product Selection page is not displayed'});
and in the YuiRestClient::Wait::wait_until
this multiplication (timeout * timeout_scale ) should be encapsulated in the YuiRestClient::Wait::wait_until
~~~
#### Acceptance criteria
**AC1**: Create a new object that encapsulates the timeout_scale property in the YuiRestClient class.
#### Additional information
PR where this was discussed: https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/16462