https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37707

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #69 from Jonathan Druart <[email protected]> ---
t/cypress/integration/Circulation/bookingsModalDatePicker_spec.ts is badly
written, obviously by AI (not advertised...)

1. 11             sql: "UPDATE systempreferences SET value = '1' WHERE variable
= 'RESTBasicAuth'",

not needed

2. 30                         sql: "UPDATE items SET bookable = 1, itype =
'BK', homebranch = 'CPL', enumchron = 'A', dateaccessioned = '2024-12-03' WHERE
itemnumber = ?",

We should not do that, but build the library instead.

3. 
1316                 return cy.task("buildSampleObject", {
1329                 return cy.task("query", {
1330                     sql: `INSERT INTO borrowers (borrowernumber,
firstname, surname, cardnumber, categorycode, branchcode, dateofbirth)
1331                           VALUES (?, ?, ?, ?, ?, ?, ?)`,

There is insertSamplePatron. Or insertObject, but the INSERT query here is not
the way we write Cypress tests.

4. 
1348                         sql: `INSERT INTO bookings (biblio_id, patron_id,
item_id, pickup_library_id, start_date, end_date, status)

Added several times: then you need to write the code to generate bookings from
mockData

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to