Project

General

Profile

Actions

action #137195

closed

Test fails in bootcode_options due to changed widget IDs

Added by dimstar about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
Start date:
2023-09-28
Due date:
% Done:

0%

Estimated time:

Description

Observation

Seems to be one more case where the yastbootloader change hits us:

Not Found
{ "error" : "Widget not found" }

The widget tree was slightly changed in yast2-bootloader 5.x to accommodate more bootloaders than just grub2

openQA test in scenario opensuse-Tumbleweed-DVD-x86_64-yast2_gui@64bit fails in
bootcode_options

Additional information

The problem is caused by renaming the widget IDs in grub2_widgets_test.rb in this PR

This still affects our tests that rely on the old Widget Ids.

Affected IDs are:

lib/YaST/Bootloader/BootCodeOptionsPage.pm:    $self->{chb_set_active_flag} = $self->{app}->checkbox({id => '"Bootloader::ActivateWidget"'});
lib/YaST/Bootloader/BootCodeOptionsPage.pm:    $self->{chb_generic_to_mbr} = $self->{app}->checkbox({id => '"Bootloader::GenericMBRWidget"'});
lib/YaST/Bootloader/BootCodeOptionsPage.pm:    $self->{cmb_mbr_flag} = $self->{app}->combobox({id => '"Bootloader::PMBRWidget"'});
lib/YaST/Bootloader/BootCodeOptionsPage.pm:    $self->{chb_trusted_boot} = $self->{app}->checkbox({id => '"Bootloader::TrustedBootWidget"'});

lib/YaST/Bootloader/KernelParametersPage.pm:    $self->{txb_opt_kernel_param} = $self->{app}->textbox({id => "\"Bootloader::KernelAppendWidget\""});

ToDo

Replace the old IDs that won't work in newer YaST versions with a regex that matches both the old or new version. You can take PR 17878 as an example.

Acceptance criteria:

AC1: Changed IDs that affect our code are replaced by regex code that matches both new and old IDs.

Actions #1

Updated by dimstar about 1 year ago

That comes down to

https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/06435a51ce37369687d07e28b589c602ff3c1d53/lib/YaST/Bootloader/BootCodeOptionsPage.pm#L25C1-L25C99

$self->{chb_set_active_flag} = $self->{app}->checkbox({id => '"Bootloader::ActivateWidget"'});

in yast20bootloader 5.0.1, this was changed to

Bootloader::Grub2Widget::ActivateWidget

And there are some more, like:

Bootloader::GenericMBRWidget => Bootloader::Grub2Widget::GenericMBRWidget
Bootloader::TrustedBootWidget => Bootloader::Grub2Widget::TrustedBootWidget
Bootloader::PMBRWidget => describe Bootloader::Grub2Widget::PMBRWidget

Actions #2

Updated by dimstar about 1 year ago

@rainerkoenig is this something you can fix the same way using regex?

Actions #3

Updated by rainerkoenig about 1 year ago

  • Project changed from openQA Tests to qe-yam
  • Subject changed from test fails in bootcode_options to Test fails in bootcode_options due to changed widget IDs
  • Category deleted (Bugs in existing tests)
  • Status changed from New to Workable
  • Priority changed from Normal to High
  • Target version set to Current

Yes, same issue. Currently checking all renamed widgets, we also have hits in

lib/YaST/Bootloader/KernelParametersPage.pm:    $self->{txb_opt_kernel_param} = $self->{app}->textbox({id => "\"Bootloader::KernelAppendWidget\""});

I hijack this for our yam project and increase the priority.

Actions #4

Updated by rainerkoenig about 1 year ago

  • Description updated (diff)
Actions #5

Updated by lmanfredi about 1 year ago

  • Status changed from Workable to In Progress
  • Assignee set to lmanfredi
Actions #6

Updated by lmanfredi about 1 year ago

Created PR#17880

Actions #7

Updated by rainerkoenig about 1 year ago

  • Status changed from In Progress to Resolved

PR merged.

Actions

Also available in: Atom PDF