The tests are playing with the visibility (mss.hidden) of subfields, but does not revert it later. It leads to problem for other tests relying on default data.
Found using the diag from commit c70de8c5305700cce9a6fe9a6f75c2cf53be02f1 Bug 28445: Add diag for failing test Temporary patch to help trying to fix the following random error: # Failed test 'Item types should be sorted by description and an empty entries should be shown' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 121. # Structures begin differing at: # $got->[12] = 'Be9T9FH5aO' # $expected->[12] = 'REF' # Looks like you failed 1 test of 2. # Failed test 'itemtypes' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 130.
# Failed test 'Item types should be sorted by description and an empty entries should be shown' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 127. # Structures begin differing at: # $got = undef # $expected = ARRAY(0x557716b68e98) # Itemtypes details: $VAR1 = undef; # $VAR2 = [ # 'BK', # 'CF', # 'CR', # 'ihxGmo7', # 'MP', # 'MU', # 'MX', # 'REF', # 'VM' # ]; # Failed test 'Labels should be correctly displayed' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 130. # Structures begin differing at: # $got = undef # $expected = HASH(0x557716e2e150) # Looks like you failed 2 tests of 2. # Failed test 'itemtypes' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 133. subfield was hidden and so $subfield->{marc_value}->{values} was empty
Created attachment 127080 [details] [review] Bug 29364: Revert changes to framework visibility made by Search.t To recreate run: drop database koha_kohadev; create database koha_kohadev; restart_all KOHA_TESTING=1 prove t/db_dependent/selenium/01-installation.t t/db_dependent/Search.t t/db_dependent/Koha/UI/Form/Builder/Item.t # Failed test 'Item types should be sorted by description and an empty entries should be shown' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 127. # Structures begin differing at: # $got = undef # $expected = ARRAY(0x557716b68e98) # Itemtypes details: $VAR1 = undef; # $VAR2 = [ # 'BK', # 'CF', # 'CR', # 'ihxGmo7', # 'MP', # 'MU', # 'MX', # 'REF', # 'VM' # ]; # Failed test 'Labels should be correctly displayed' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 130. # Structures begin differing at: # $got = undef # $expected = HASH(0x557716e2e150) # Looks like you failed 2 tests of 2. # Failed test 'itemtypes' # at t/db_dependent/Koha/UI/Form/Builder/Item.t line 133.
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.05
Pushed to 20.11.x for 20.11.12
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.