[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2026-03-05 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174
Bug 40174 depends on bug 40344, which changed state.

Bug 40344 Summary: KohaTable_spec.ts is failing
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40344

   What|Removed |Added

 Status|Needs documenting   |RESOLVED
 Resolution|--- |FIXED

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2026-02-28 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174
Bug 40174 depends on bug 40169, which changed state.

Bug 40169 Summary: Cypress tests - mockData should not replace "_id" fields if 
passed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40169

   What|Removed |Added

 Status|Needs documenting   |RESOLVED
 Resolution|--- |FIXED

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-11-12 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174
Bug 40174 depends on bug 40173, which changed state.

Bug 40173 Summary: Reuse http-client from Cypress tests - preparation steps
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40173

   What|Removed |Added

 Status|Needs documenting   |RESOLVED
 Resolution|--- |FIXED

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-10-25 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

David Nind  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|Needs documenting   |RESOLVED

--- Comment #38 from David Nind  ---
Related to the test suite, no changes required to the manual.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-09-17 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Fridolin Somers  changed:

   What|Removed |Added

 CC||[email protected]
   ||m
 Status|Pushed to stable|Needs documenting

--- Comment #37 from Fridolin Somers  ---
Dependencies not in 24.11.x

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-09-01 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #36 from Jonathan Druart  ---
(In reply to Tomás Cohen Arazi (tcohen) from comment #34)
> We didn't we just add a TestBuilder wrapper endpoint?

It’s not as straightforward as it might seem.

First we already have code to build mocked objects based on the REST API spec,
without actually creating them in the database. This works well for simple,
non-end-to-end tests.

Secondly t::lib::TestBuilder returns objects with attributes named after DB
columns, but the Vue app expects REST API field names. We could have added a
conversion layer (as we did here), but it would have required additional effort
anyway.

Finally this approach would have required a GET request for every object, which
would have significantly slowed down the tests.

Also it seems more consistent to have a JS solution for JS tests.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-08-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174
Bug 40174 depends on bug 40179, which changed state.

Bug 40179 Summary: Add maxLength to the patron's category definition
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40179

   What|Removed |Added

 Status|Needs documenting   |RESOLVED
 Resolution|--- |FIXED

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-08-29 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174
Bug 40174 depends on bug 40170, which changed state.

Bug 40170 Summary: Replace cypress-mysql with mysql2
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170

   What|Removed |Added

 Status|Needs documenting   |RESOLVED
 Resolution|--- |FIXED

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-08-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Paul Derscheid  changed:

   What|Removed |Added

 Version(s)|25.11.00|25.11.00,25.05.03
released in||
 Status|Pushed to main  |Pushed to stable

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-08-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #35 from Paul Derscheid  ---
Nice work everyone!

Pushed to 25.05.x

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-08-01 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Tomás Cohen Arazi (tcohen)  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #34 from Tomás Cohen Arazi (tcohen)  ---
We didn't we just add a TestBuilder wrapper endpoint?

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #33 from Jonathan Druart  ---
(In reply to Jonathan Druart from comment #32)
> Created attachment 184461 [details] [review]
> Bug 40174: Fix codespell

Patch pushed.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-22 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #32 from Jonathan Druart  ---
Created attachment 184461
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184461&action=edit
Bug 40174: Fix codespell

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #31 from Lucas Gass (lukeg)  ---
Nice work everyone!

Pushed to main for 25.11

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Lucas Gass (lukeg)  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to main
 Version(s)||25.11.00
released in||

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Blocks||40383


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40383
[Bug 40383] Modernise the EDIFACT Message display modal
-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-21 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #30 from Jonathan Druart  ---
(In reply to Martin Renvoize (ashimema) from comment #28)
> Created attachment 184332 [details] [review]
> Bug 40174: Require RESTBasicAuth turned ON

See https://gitlab.com/koha-community/koha-misc4dev/-/issues/91

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 CC||[email protected]
   ||o.uk
 QA Contact|[email protected] |[email protected]
   |y.org   |o.uk

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #29 from Martin Renvoize (ashimema) 
 ---
Created attachment 184333
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184333&action=edit
Bug 40174: Do not generate bigint

Prevent "Out of range value for column 'deliverytime'" in a later
follow-up bug reports.

Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #28 from Martin Renvoize (ashimema) 
 ---
Created attachment 184332
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184332&action=edit
Bug 40174: Require RESTBasicAuth turned ON

From MM thread
https://chat.koha-community.org/koha-community/pl/aptoodssm7gu8x491onfgxs1xr

Cypress tests need RESTBasicAuth - I’m stuck in a chicken-and-egg problem being
eaten by its own tail...
I need advice. Some Cypress tests need RESTBasicAuth, but it's disabled by
default.
My plan was to turn it on globally (ie. set before any tests, and reset to its
original value after)
but we cannot right now:
Update in DB could work, but its cached
Call the svc script won't work, as we are not logged in yet (and this script
require the session cookie)

so, I have a lot of solutions, but not sure which one to pick
* have a "flush cache" route (smells the rabbit hole)
* login to get the cookie, set the syspref via the svc script, logout (ugly,
and will slower the cypress tests)
* require the pref on for cypress tests
* ?

I would opt now for the third option, turn it on in Jenkins when we run the
cypress tests. And explode for devs when the pref is not set.
What do you think?

If we push this as it, Jenkins is going to fail.
We need to restructure how Jenkins is running the Cypress tests anyway:
we need a dedicated job to run them all. We will turn ON the syspref for
this job.

Signed-off-by: Matt Blenkinsop 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #26 from Martin Renvoize (ashimema) 
 ---
Created attachment 184330
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184330&action=edit
Bug 40174: Deal with enum

Data too long for column 'checkprevcheckout'

Signed-off-by: Matt Blenkinsop 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #27 from Martin Renvoize (ashimema) 
 ---
Created attachment 184331
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184331&action=edit
Bug 40174: Set minLength to 3

When we generate several objects we often get "Duplicate ID" from the
server. This mostly happens when the tests failed previously and the
objects have not been removed from the DB.

Signed-off-by: Matt Blenkinsop 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #25 from Martin Renvoize (ashimema) 
 ---
Created attachment 184329
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184329&action=edit
Bug 40174: Use api-client

Signed-off-by: Matt Blenkinsop 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #24 from Martin Renvoize (ashimema) 
 ---
Created attachment 184328
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184328&action=edit
Bug 40174: Introduce Cypress auth plugin

So we can easily retrieve the value for the Authorization header.

Signed-off-by: Matt Blenkinsop 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Attachment #184103|0   |1
is obsolete||
 Attachment #184104|0   |1
is obsolete||
 Attachment #184105|0   |1
is obsolete||
 Attachment #184106|0   |1
is obsolete||
 Attachment #184107|0   |1
is obsolete||
 Attachment #184108|0   |1
is obsolete||
 Attachment #184195|0   |1
is obsolete||

--- Comment #23 from Martin Renvoize (ashimema) 
 ---
Created attachment 184327
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184327&action=edit
Bug 40174: Allow proper E2E testing with Cypress

This is the first step toward implementing true end-to-end testing with
Cypress.

Until now, we have been mocking responses using cy.intercept(), but this
approach can lead to confusion. In some cases, we have even had to mock
global JavaScript variables, which makes the code unnecessarily complex
and unconventional (e.g. win.categories_map).

All the bug reports listed under this tree have helped lay the
groundwork for this patch. With it, we are able to build mock objects
(via plugin mockData) and insert them directly into the database
(insertData). Once the tests are complete, we’ll restore the database to
its previous state by removing any data generated during the tests.

The tests in KohaTable/Holdings_spec.ts have been updated to leverage
this new setup.

Additionally, a caching mechanism has been added to prevent _id
attributes from being generated with the same values (a rare issue we
occasionally encountered).

While this is still not a perfect solution, it introduces a solid
foundation for future improvements.

Test plan:
All Cypress tests must pass

Signed-off-by: Matt Blenkinsop 
Signed-off-by: Martin Renvoize 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Martin Renvoize (ashimema)  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-17 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #22 from Jonathan Druart  ---
Created attachment 184195
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184195&action=edit
Bug 40174: Do not generate bigint

Prevent "Out of range value for column 'deliverytime'" in a later
follow-up bug reports.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Matt Blenkinsop  changed:

   What|Removed |Added

 Attachment #183373|0   |1
is obsolete||

--- Comment #17 from Matt Blenkinsop  ---
Created attachment 184104
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184104&action=edit
Bug 40174: Introduce Cypress auth plugin

So we can easily retrieve the value for the Authorization header.

Signed-off-by: Matt Blenkinsop 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Matt Blenkinsop  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Matt Blenkinsop  changed:

   What|Removed |Added

 Attachment #183981|0   |1
is obsolete||

--- Comment #21 from Matt Blenkinsop  ---
Created attachment 184108
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184108&action=edit
Bug 40174: Require RESTBasicAuth turned ON

From MM thread
https://chat.koha-community.org/koha-community/pl/aptoodssm7gu8x491onfgxs1xr

Cypress tests need RESTBasicAuth - I’m stuck in a chicken-and-egg problem being
eaten by its own tail...
I need advice. Some Cypress tests need RESTBasicAuth, but it's disabled by
default.
My plan was to turn it on globally (ie. set before any tests, and reset to its
original value after)
but we cannot right now:
Update in DB could work, but its cached
Call the svc script won't work, as we are not logged in yet (and this script
require the session cookie)

so, I have a lot of solutions, but not sure which one to pick
* have a "flush cache" route (smells the rabbit hole)
* login to get the cookie, set the syspref via the svc script, logout (ugly,
and will slower the cypress tests)
* require the pref on for cypress tests
* ?

I would opt now for the third option, turn it on in Jenkins when we run the
cypress tests. And explode for devs when the pref is not set.
What do you think?

If we push this as it, Jenkins is going to fail.
We need to restructure how Jenkins is running the Cypress tests anyway:
we need a dedicated job to run them all. We will turn ON the syspref for
this job.

Signed-off-by: Matt Blenkinsop 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Matt Blenkinsop  changed:

   What|Removed |Added

 Attachment #183980|0   |1
is obsolete||

--- Comment #20 from Matt Blenkinsop  ---
Created attachment 184107
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184107&action=edit
Bug 40174: Set minLength to 3

When we generate several objects we often get "Duplicate ID" from the
server. This mostly happens when the tests failed previously and the
objects have not been removed from the DB.

Signed-off-by: Matt Blenkinsop 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Matt Blenkinsop  changed:

   What|Removed |Added

 Attachment #183374|0   |1
is obsolete||

--- Comment #18 from Matt Blenkinsop  ---
Created attachment 184105
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184105&action=edit
Bug 40174: Use api-client

Signed-off-by: Matt Blenkinsop 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Matt Blenkinsop  changed:

   What|Removed |Added

 Attachment #183929|0   |1
is obsolete||

--- Comment #19 from Matt Blenkinsop  ---
Created attachment 184106
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184106&action=edit
Bug 40174: Deal with enum

Data too long for column 'checkprevcheckout'

Signed-off-by: Matt Blenkinsop 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Matt Blenkinsop  changed:

   What|Removed |Added

 Attachment #183372|0   |1
is obsolete||

--- Comment #16 from Matt Blenkinsop  ---
Created attachment 184103
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184103&action=edit
Bug 40174: Allow proper E2E testing with Cypress

This is the first step toward implementing true end-to-end testing with
Cypress.

Until now, we have been mocking responses using cy.intercept(), but this
approach can lead to confusion. In some cases, we have even had to mock
global JavaScript variables, which makes the code unnecessarily complex
and unconventional (e.g. win.categories_map).

All the bug reports listed under this tree have helped lay the
groundwork for this patch. With it, we are able to build mock objects
(via plugin mockData) and insert them directly into the database
(insertData). Once the tests are complete, we’ll restore the database to
its previous state by removing any data generated during the tests.

The tests in KohaTable/Holdings_spec.ts have been updated to leverage
this new setup.

Additionally, a caching mechanism has been added to prevent _id
attributes from being generated with the same values (a rare issue we
occasionally encountered).

While this is still not a perfect solution, it introduces a solid
foundation for future improvements.

Test plan:
All Cypress tests must pass

Signed-off-by: Matt Blenkinsop 

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Depends on||40344
 Status|Failed QA   |Needs Signoff

--- Comment #15 from Jonathan Druart  ---
(In reply to Jonathan Druart from comment #14)
> (In reply to Matt Blenkinsop from comment #13)
> > I'm getting a failure in KohaTable/KohaTable_spec.ts - looks like its to do
> > with the patron category failing to render (line 647 patron-search.inc)
> 
> Booh, I've the fix on the tree, but not attached here!
>   Bug 40344: Fix KohaTable_spec.ts
> 
> Moving it here now.

Hum it's on its own bug actually, adding the dependency instead then.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40344
[Bug 40344] KohaTable_spec.ts is failing
-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-15 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #14 from Jonathan Druart  ---
(In reply to Matt Blenkinsop from comment #13)
> I'm getting a failure in KohaTable/KohaTable_spec.ts - looks like its to do
> with the patron category failing to render (line 647 patron-search.inc)

Booh, I've the fix on the tree, but not attached here!
  Bug 40344: Fix KohaTable_spec.ts

Moving it here now.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-14 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

David Cook  changed:

   What|Removed |Added

 CC||[email protected]

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-14 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Matt Blenkinsop  changed:

   What|Removed |Added

 CC||[email protected]
   ||o.uk
 Status|Needs Signoff   |Failed QA

--- Comment #13 from Matt Blenkinsop  ---
I'm getting a failure in KohaTable/KohaTable_spec.ts - looks like its to do
with the patron category failing to render (line 647 patron-search.inc)

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-11 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #12 from Jonathan Druart  ---
Created attachment 183981
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183981&action=edit
Bug 40174: Require RESTBasicAuth turned ON

From MM thread
https://chat.koha-community.org/koha-community/pl/aptoodssm7gu8x491onfgxs1xr

Cypress tests need RESTBasicAuth - I’m stuck in a chicken-and-egg problem being
eaten by its own tail...
I need advice. Some Cypress tests need RESTBasicAuth, but it's disabled by
default.
My plan was to turn it on globally (ie. set before any tests, and reset to its
original value after)
but we cannot right now:
Update in DB could work, but its cached
Call the svc script won't work, as we are not logged in yet (and this script
require the session cookie)

so, I have a lot of solutions, but not sure which one to pick
* have a "flush cache" route (smells the rabbit hole)
* login to get the cookie, set the syspref via the svc script, logout (ugly,
and will slower the cypress tests)
* require the pref on for cypress tests
* ?

I would opt now for the third option, turn it on in Jenkins when we run the
cypress tests. And explode for devs when the pref is not set.
What do you think?

If we push this as it, Jenkins is going to fail.
We need to restructure how Jenkins is running the Cypress tests anyway:
we need a dedicated job to run them all. We will turn ON the syspref for
this job.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-11 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #11 from Jonathan Druart  ---
The second version of the last patch fixes mockData.ts

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-11 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #183978|0   |1
is obsolete||

--- Comment #10 from Jonathan Druart  ---
Created attachment 183980
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183980&action=edit
Bug 40174: Set minLength to 3

When we generate several objects we often get "Duplicate ID" from the
server. This mostly happens when the tests failed previously and the
objects have not been removed from the DB.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-11 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #9 from Jonathan Druart  ---
Created attachment 183978
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183978&action=edit
Bug 40174: Set minLength to 3

When we generate several objects we often get "Duplicate ID" from the
server. This mostly happens when the tests failed previously and the
objects have not been removed from the DB.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-11 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||40346


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40346
[Bug 40346] Allow Cypress to test OPAC
-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-08 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #7 from Jonathan Druart  ---
(In reply to David Nind from comment #6)
> Created attachment 183851 [details]
> Bug 40174 (and related bugs) - Test failues.txt
> 
> I tested the bug_40180 branch from your repository.
> 
> This is how I tested things:
> 1. Added the remote: git remote add joubu https://gitlab.com/joubu/Koha
> 2. Fetched the remote: git fetch joubu
> 3. Checked out the branch from the remote: git checkout -b bug_40180
> joubu/bug_40180
> 4. yarn build
> 5. restart_all (maybe this should be a reset_all?)

Yes, `reset_all` or `yarn api:bundle && restart_all`

> 6. Enabled the RESTBasicAuth system preference.
> 7. Ran individual tests for the dependent and related bugs - see [1] for the
> list
> 8. Ran all the cypress tests: perl /kohadevbox/misc4dev/run_tests.pl
> --run-cypress-tests-only
>- ERM/DataProviders_spec.ts and ERM/UsageReports_spec.ts failed, but I
> think they've been fixed now
>- KohaTable/Holdings_spec.ts sometimes failed for me [2]
>- KohaTable/KohaTable_spec.ts sometimes failed for me [3]

I think there are failing because you have not rebuilt the swapper spec (`yarn
api:bundle` then restarted plack, or `reset_all`).
In theory they could still fail, but with way less reproducibility (without the
 spec regenerated, branchcodes are generated using only 1 letter, and it
clashes if it starts with the first letter of an existing library (eg. C and
CPL in your case). With the new changes it will be 10 letters long and we won't
have such clashes.

> 9. The tests related to bugs 40301 and 40320 failed for me.

I would suggest to have the first batch (up to bug 40181) pushed before we
focus on the other ones :)

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-07 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #6 from David Nind  ---
Created attachment 183851
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183851&action=edit
Bug 40174 (and related bugs) - Test failues.txt

I tested the bug_40180 branch from your repository.

This is how I tested things:
1. Added the remote: git remote add joubu https://gitlab.com/joubu/Koha
2. Fetched the remote: git fetch joubu
3. Checked out the branch from the remote: git checkout -b bug_40180
joubu/bug_40180
4. yarn build
5. restart_all (maybe this should be a reset_all?)
6. Enabled the RESTBasicAuth system preference.
7. Ran individual tests for the dependent and related bugs - see [1] for the
list
8. Ran all the cypress tests: perl /kohadevbox/misc4dev/run_tests.pl
--run-cypress-tests-only
   - ERM/DataProviders_spec.ts and ERM/UsageReports_spec.ts failed, but I think
they've been fixed now
   - KohaTable/Holdings_spec.ts sometimes failed for me [2]
   - KohaTable/KohaTable_spec.ts sometimes failed for me [3]
9. The tests related to bugs 40301 and 40320 failed for me.

[1] All the interrelated bugs
=

40168 - Signed off
- yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts

40169 - Signed off
- yarn cypress run --spec t/cypress/integration/t/mockData.ts

40170
- yarn cypress run --spec t/cypress/integration/Auth/csrf.ts
- yarn cypress run --spec
t/cypress/integration/Islands/AcquisitionsMenu_spec.ts
- yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts
- yarn cypress run --spec t/cypress/integration/KohaTable/PatronSearch_spec.ts
- yarn cypress run --spec t/cypress/integration/t/db.ts

40172 (Signed off)
- No additional tests to run

40173
- yarn cypress run --spec t/cypress/integration/t/api-client.ts

40174
- yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts 
(failed??? passed when run before on 40168)
- yarn cypress run --spec t/cypress/integration/t/insertData.ts

40175 - OMNIBUS bug (no actual patches)

40176 (Passed QA)
- prove xt/api.t 

40177 (Passed QA)
- prove xt/api.t 

40178 (Passed QA)
- provec xt/api.t 

40179 (Passed QA)
- prove xt/api.t

40180
- yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts
- yarn cypress run --spec t/cypress/integration/KohaTable/PendingHolds_spec.ts
- yarn cypress run --spec t/cypress/integration/t/insertData.ts

40181 - Applied on top
- yarn cypress run --spec t/cypress/integration/t/insertData.ts

40301 - Applied on top as well as 40281: both tests failed with and without
40281
- yarn cypress run --spec t/cypress/integration/t/insertData.ts
- yarn cypress run --spec
t/cypress/integration/KohaTable/CirculationHistory_spec.ts

40319 - Applied on top: OK
- Follow the test plan in the bug (no tests to run yet)

40320 - Applied on top: tests fail for me [5]
- Follow the test plan
- Make sure the display of city, state and zipcode is the same as before the
patch
- yarn cypress run --spec t/cypress/integration/Patron/Address.ts

[2], [3], [4], [5] - see attachment to the bug
===

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #5 from Jonathan Druart  ---
Yes the tree is a bit complicated. If you want to have everything applied you
can have a look at the branch `bug_40180` on my gitlab repo.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-07-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

David Nind  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #4 from David Nind  ---
I attempted to test, but one of the dependent bugs doesn't apply:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 40173: Make http-client reusable from Cypress tests
Applying: Bug 40173: Return the response early if the caller needs it
Applying: Bug 40173: Add test for the api-client Cypress plugin
Using index info to reconstruct a base tree...
M   t/cypress/plugins/index.js
Falling back to patching base and 3-way merge...
Auto-merging t/cypress/plugins/index.js
CONFLICT (content): Merge conflict in t/cypress/plugins/index.js
error: Failed to merge in the changes.
Patch failed at 0001 Bug 40173: Add test for the api-client Cypress plugin

However, it applies fine if I just apply it by itself.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-19 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #3 from Jonathan Druart  ---
Created attachment 183374
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183374&action=edit
Bug 40174: Use api-client

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-19 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #2 from Jonathan Druart  ---
Created attachment 183373
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183373&action=edit
Bug 40174: Introduce Cypress auth plugin

So we can easily retrieve the value for the Authorization header.

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-19 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

--- Comment #1 from Jonathan Druart  ---
Created attachment 183372
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183372&action=edit
Bug 40174: Allow proper E2E testing with Cypress

This is the first step toward implementing true end-to-end testing with
Cypress.

Until now, we have been mocking responses using cy.intercept(), but this
approach can lead to confusion. In some cases, we have even had to mock
global JavaScript variables, which makes the code unnecessarily complex
and unconventional (e.g. win.categories_map).

All the bug reports listed under this tree have helped lay the
groundwork for this patch. With it, we are able to build mock objects
(via plugin mockData) and insert them directly into the database
(insertData). Once the tests are complete, we’ll restore the database to
its previous state by removing any data generated during the tests.

The tests in KohaTable/Holdings_spec.ts have been updated to leverage
this new setup.

Additionally, a caching mechanism has been added to prevent _id
attributes from being generated with the same values (a rare issue we
occasionally encountered).

While this is still not a perfect solution, it introduces a solid
foundation for future improvements.

Test plan:
All Cypress tests must pass

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-19 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-19 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Depends on||40170


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40170
[Bug 40170] Replace cypress-mysql with mysql2
-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-19 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Depends on||40173


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40173
[Bug 40173] Reuse http-client from Cypress tests - preparation steps
-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-19 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Depends on|40176, 40177, 40178 |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176
[Bug 40176] Add maxLength to the item definition
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40177
[Bug 40177] Add maxLength to the library definition
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40178
[Bug 40178] Add maxLength to the patron definition
-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||40180


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40180
[Bug 40180] Missing Cypress tests for 'Holds to pull' library filters
-- 
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/


[Koha-bugs] [Bug 40174] Add a way to cleanly insert data in DB from Cypress tests

2025-06-18 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Jonathan Druart  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 Depends on||40176, 40177, 40178, 40179
Version|24.11   |unspecified
   Assignee|[email protected]|[email protected]


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176
[Bug 40176] Add maxLength to the item definition
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40177
[Bug 40177] Add maxLength to the library definition
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40178
[Bug 40178] Add maxLength to the patron definition
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40179
[Bug 40179] Add maxLength to the patron's category definition
-- 
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/