Bug 32710: Try to prevent UI/Form/Builder/Item.t to fail randomly
See the FIXME, and commit 77a34e099a
Actually we are doing the trick (of removing _) before we are creating
another itemtype, we need to do it right before we are comparing.
Test plan:
Run in a loop, be patient, it failed for me (without the patch) at run
245
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
532d4d0ac6
commit
4e6bc5385c
1 changed files with 11 additions and 10 deletions
|
@ -45,20 +45,21 @@ $cache->clear_from_cache("MarcSubfieldStructure-");
|
|||
# 952$t is linked with items.copynumber and is not repeatable
|
||||
setup_mss();
|
||||
|
||||
# FIXME Later in this script we are comparing itemtypes, ordered by their description.
|
||||
# MySQL and Perl don't sort _ identically.
|
||||
# If you have one itemtype BK and another one B_K, MySQL will sort B_K first when Perl will sort it last
|
||||
my @itemtypes = Koha::ItemTypes->search->as_list;
|
||||
for my $itemtype ( @itemtypes ) {
|
||||
my $d = $itemtype->description;
|
||||
$d =~ s|_||g;
|
||||
$itemtype->description($d)->store;
|
||||
}
|
||||
|
||||
subtest 'authorised values' => sub {
|
||||
#plan tests => 1;
|
||||
|
||||
my $biblio = $builder->build_sample_biblio({ value => {frameworkcode => ''}});
|
||||
|
||||
# FIXME Later in this script we are comparing itemtypes, ordered by their description.
|
||||
# MySQL and Perl don't sort _ identically.
|
||||
# If you have one itemtype BK and another one B_K, MySQL will sort B_K first when Perl will sort it last
|
||||
my @itemtypes = Koha::ItemTypes->search->as_list;
|
||||
for my $itemtype ( @itemtypes ) {
|
||||
my $d = $itemtype->description;
|
||||
$d =~ s|_||g;
|
||||
$itemtype->description($d)->store;
|
||||
}
|
||||
|
||||
my $subfields =
|
||||
Koha::UI::Form::Builder::Item->new(
|
||||
{ biblionumber => $biblio->biblionumber } )->edit_form;
|
||||
|
|
Loading…
Reference in a new issue