Bugzilla – Attachment 128008 Details for
Bug 28445
Use the task queue for the batch delete and update items tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28445: (follow-up) Add diag for failing test
Bug-28445-follow-up-Add-diag-for-failing-test.patch (text/plain), 3.80 KB, created by
Jonathan Druart
on 2021-11-25 12:55:39 UTC
(
hide
)
Description:
Bug 28445: (follow-up) Add diag for failing test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-11-25 12:55:39 UTC
Size:
3.80 KB
patch
obsolete
>From 288b39c3d4d5e4dd3fc779003c0e9ca0e23ccec6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 25 Nov 2021 12:46:25 +0100 >Subject: [PATCH] Bug 28445: (follow-up) Add diag for failing test > >Last diag was not enough (Koha_Master_D11/457) > > # 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->[11] = 'X_vvQE5' > # $expected->[11] = 'knHm32' > # Itemtypes details: $VAR1 = [ > # '', > # 'EMVzKcGR', > # 'x4S8_BaFCp', > # 'Cp2BGkY', > # 'BK', > # 'CF', > # 'CR', > # 'bBvgmVAIzD', > # 'WKyaQ_l', > # 'Cjc0SKQz', > # 'liic63', > # 'X_vvQE5', > # 'knHm32', > # 'MP', > # 'MX', > # 'MU', > # 'g_F5eNqA', > # 'REF', > # 'pkxaMSv', > # 'VM' > # ]; > # $VAR2 = [ > # 'bBvgmVAIzD', > # 'BK', > # 'CF', > # 'Cjc0SKQz', > # 'Cp2BGkY', > # 'CR', > # 'EMVzKcGR', > # 'g_F5eNqA', > # 'knHm32', > # 'liic63', > # 'MP', > # 'MU', > # 'MX', > # 'pkxaMSv', > # 'REF', > # 'VM', > # 'WKyaQ_l', > # 'X_vvQE5', > # 'x4S8_BaFCp' > # ]; >We needed the translated_description. It should be the same actually, >but maybe something weird is happening. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/UI/Form/Builder/Item.t | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/Koha/UI/Form/Builder/Item.t b/t/db_dependent/Koha/UI/Form/Builder/Item.t >index 56ebd091c3d..514cfb279d4 100755 >--- a/t/db_dependent/Koha/UI/Form/Builder/Item.t >+++ b/t/db_dependent/Koha/UI/Form/Builder/Item.t >@@ -113,18 +113,24 @@ subtest 'authorised values' => sub { > my ($subfield) = grep { $_->{kohafield} eq 'items.itype' } @$subfields; > my $itemtypes = Koha::ItemTypes->search; > >- is_deeply( >- $subfield->{marc_value}->{values}, >- [ >- "", >+ my $expected = [ >+ "", > map { $_->itemtype } > # We need to sort using uc or perl won't be case insensitive > sort { uc($a->translated_description) cmp uc($b->translated_description) } > $itemtypes->as_list >- ], >- "Item types should be sorted by description and an empty entries should be shown" >+ ]; >+ is_deeply( >+ $subfield->{marc_value}->{values}, >+ $expected, >+ "Item types should be sorted by description and an empty entry should be shown" > ) >- or diag("Itemtypes details: ".Dumper($subfield->{marc_value}->{values}, [map { $_->itemtype } $itemtypes->as_list])); >+ or diag("Itemtypes details: " . Dumper( >+ $subfield->{marc_value}->{values}, >+ $expected, >+ { map { $_->itemtype => $_->translated_description } $itemtypes->as_list }, >+ $Koha::Schema::Result::Itemtype::LANGUAGE, >+ )); > > is_deeply( $subfield->{marc_value}->{labels}, > { map { $_->itemtype => $_->description } $itemtypes->as_list }, >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28445
:
121372
|
123221
|
123222
|
123223
|
123224
|
123225
|
123226
|
123227
|
123228
|
123229
|
123239
|
123240
|
125801
|
125802
|
125803
|
125804
|
125805
|
125808
|
125810
|
125811
|
125812
|
125817
|
125865
|
126046
|
126047
|
126136
|
126137
|
126138
|
126139
|
126140
|
126141
|
126142
|
126217
|
126218
|
126219
|
126223
|
126328
|
126329
|
126330
|
126331
|
126332
|
126333
|
126334
|
126335
|
126336
|
126337
|
126338
|
126339
|
126352
|
126353
|
126354
|
126355
|
126356
|
126357
|
126358
|
126359
|
126360
|
126361
|
126362
|
126363
|
126364
|
126365
|
126366
|
126367
|
126374
|
126375
|
126376
|
126377
|
126378
|
126379
|
126380
|
126381
|
126382
|
126383
|
126384
|
126385
|
126386
|
126387
|
126388
|
126389
|
127033
|
127037
|
127038
|
127039
|
128007
| 128008 |
128009