Project

General

Profile

action #89866

Updated by JRivrain almost 4 years ago

I tried to introduce a way to assert clients (modules) using by libyui's debug_label in firstboot, but this is not supported at the that moment. So I still created the necessary code, with parts of it commented, but also kept the assert_screen calls for 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 

 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 try to probe a debug_label, since debug_label is not supported. In theory, with the following json response: 
 { 
 "class" : "YWizard", 
 "debug_label" : "Welcome", 
 "hstretch" : true, 
 "id" : "wizard", 
 "vstretch" : true 
 } 
 we should get "Welcome" returned, so we can assert that we are on the right client/page and send it to 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

Back