Bug 38418

Summary: SIP/Transaction.t fails if wrong `dateformat` set
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Test SuiteAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: RESOLVED FIXED QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, katrin.fischer, lucas, martin.renvoize, tomascohen
Version: Main   
Hardware: All   
OS: All   
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
Bug 38418: Make SIP/Transaction.t run on all dateformat values
Bug 38418: Make SIP/Transaction.t run on all dateformat values

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.