action #89866
Updated by JRivrain about 4 years ago
I tried to introduce a way to assert clients (modules) using libyui's debug_label in firstboot, but this is not supported at the moment. The idea is to make use So I still created the necessary code, with parts of it commented, but also kept the only element I could find wchich is common to all pages/modules, so we don't need to do a different "is_shown" method assert_screen calls for each page. Example: { "class" : "YWizard", "debug_label" : "Welcome", "hstretch" : true, "id" : "wizard", "vstretch" : true } now. I'm not entirely sure the code will work, it may require some adjustments. So once parent ticket is done and debug_label is supported, we could get rid of assert_screen for the following clients: - welcome - timezone - hostname - registration For now and then un-comment (and/or adapt) this in lib/YaST/Firstboot/FirstbootController.pm # if ($returned_label eq $debug_label) { # record_info $returned_label; # } else { # die "debug_label returned: $returned_label instead of $debug_label"; # } Currently, the [property](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/8323fa21a381d78786e825defe2ba761c2a8f197/lib/YuiRestClient/Widget/Base.pm#L43) function returns undef when we send try to probe a query like "curl http://server:someport/v1/widgets?debug_label=somedebuglabel" debug_label, since debug_label is doing exactly not supported. In theory, with the same as just "curl http://server:someport/v1/widgets" without arguments, it returns a following json with all widgets. response: if { "class" : "YWizard", "debug_label" : "Welcome", "hstretch" : true, "id" : "wizard", "vstretch" : true } we could should get "Welcome" returned, so we would have a unique way to can assert that we are on the right client/page and maybe send it back to record_info, record_info. If not, code should be adjusted, [exist](https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/8323fa21a381d78786e825defe2ba761c2a8f197/lib/YuiRestClient/Widget/Base.pm#L35) could also be used, for example. So to sum it up, **Acceptance Criteria:** once parent ticket is done - Verify that the commented code for asserting debug_label works, and if not, make it work, or find another way to assert clients with the debug labels - get rid of the assert_screen calls in the clients mentioned above