Bug 38418 - SIP/Transaction.t fails if wrong `dateformat` set
Summary: SIP/Transaction.t fails if wrong `dateformat` set
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-11 16:38 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2024-12-05 22:29 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 38418: Make SIP/Transaction.t run on all dateformat values (2.56 KB, patch)
2024-11-11 16:52 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38418: Make SIP/Transaction.t run on all dateformat values (2.61 KB, patch)
2024-11-11 18:25 UTC, David Nind
Details | Diff | Splinter Review
Bug 38418: Make SIP/Transaction.t run on all dateformat values (2.67 KB, patch)
2024-11-13 09:32 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2024-11-11 16:38:26 UTC
This tests look fragile.

'Got correct expired screen message' fails if `dateformat` is not `us`.

To test:
1. Change the `dateformat` syspref to any value other than `us`(shows as mm/dd/yyyy)
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/SIP/Transaction.t
=> FAIL: Tests fail because of the resulting string containing an unexpected date format.
3. Repeat 1-2 with other formats
=> FAIL: SAme
4. Choose `us`
5. Repeat 2
=> SUCCESS: It passes
Comment 1 Tomás Cohen Arazi (tcohen) 2024-11-11 16:52:52 UTC
Created attachment 174384 [details] [review]
Bug 38418: Make SIP/Transaction.t run on all dateformat values

To test:
1. Change the `dateformat` syspref to any value other than `us`(shows as mm/dd/yyyy)
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/SIP/Transaction.t
=> FAIL: Tests fail because of the resulting string containing an unexpected date format.
3. Repeat 1-2 with other formats
=> FAIL: SAme
4. Choose `us`
5. Repeat 2
=> SUCCESS: It passes
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 David Nind 2024-11-11 18:25:30 UTC
Created attachment 174386 [details] [review]
Bug 38418: Make SIP/Transaction.t run on all dateformat values

To test:
1. Change the `dateformat` syspref to any value other than `us`(shows as mm/dd/yyyy)
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/SIP/Transaction.t
=> FAIL: Tests fail because of the resulting string containing an unexpected date format.
3. Repeat 1-2 with other formats
=> FAIL: SAme
4. Choose `us`
5. Repeat 2
=> SUCCESS: It passes
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Jonathan Druart 2024-11-13 08:54:49 UTC
Caused by which change?
Comment 4 Martin Renvoize (ashimema) 2024-11-13 09:32:13 UTC
Created attachment 174449 [details] [review]
Bug 38418: Make SIP/Transaction.t run on all dateformat values

To test:
1. Change the `dateformat` syspref to any value other than `us`(shows as mm/dd/yyyy)
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/SIP/Transaction.t
=> FAIL: Tests fail because of the resulting string containing an unexpected date format.
3. Repeat 1-2 with other formats
=> FAIL: SAme
4. Choose `us`
5. Repeat 2
=> SUCCESS: It passes
6. Apply this patch
7. Repeat 2
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Jonathan Druart 2024-11-13 12:08:43 UTC
(In reply to Jonathan Druart from comment #3)
> Caused by which change?

selenium/patrons_search.t was failing on Jenkins and so didn't rollback the dateformat syspref to its default value.
Comment 6 Katrin Fischer 2024-11-13 16:02:26 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 7 Lucas Gass (lukeg) 2024-12-05 22:29:18 UTC
Merge conflicts in 24.05.x, no backport.