Bug 40346 - Allow Cypress to test OPAC
Summary: Allow Cypress to test OPAC
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 40174
Blocks: 40345
  Show dependency treegraph
 
Reported: 2025-07-11 07:07 UTC by Jonathan Druart
Modified: 2025-08-22 08:29 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.03
Circulation function:


Attachments
Bug 40346: Introduce loginOpac and visitOpac - Cypress (2.30 KB, patch)
2025-07-11 07:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40346: Add tests (1.28 KB, patch)
2025-07-11 07:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40346: Use KOHA_INTRANET_URL for the baseUrl (985 bytes, patch)
2025-07-11 12:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40346: Introduce loginOpac and visitOpac - Cypress (2.35 KB, patch)
2025-07-17 16:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40346: Add tests (1.33 KB, patch)
2025-07-17 16:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40346: Use KOHA_INTRANET_URL for the baseUrl (1.01 KB, patch)
2025-07-17 16:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40346: Introduce loginOpac and visitOpac - Cypress (2.42 KB, patch)
2025-07-18 11:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 40346: Add tests (1.39 KB, patch)
2025-07-18 11:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 40346: Use KOHA_INTRANET_URL for the baseUrl (1.08 KB, patch)
2025-07-18 11:26 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 Jonathan Druart 2025-07-11 07:07:51 UTC
So far we cannot test the OPAC interface.
Comment 1 Jonathan Druart 2025-07-11 07:19:40 UTC
Created attachment 183972 [details] [review]
Bug 40346: Introduce loginOpac and visitOpac - Cypress

To be able to test the OPAC interface we need to add those 2 new
commands
Comment 2 Jonathan Druart 2025-07-11 07:19:42 UTC
Created attachment 183973 [details] [review]
Bug 40346: Add tests
Comment 3 Jonathan Druart 2025-07-11 07:19:57 UTC
Adding those patches to their own bug (for reusability), but it's going to be used on bug bug 40345.

Test plan:
  yarn cypress run t/cypress/integration/t/commands.ts
must return green.
Comment 4 Jonathan Druart 2025-07-11 12:12:24 UTC
Created attachment 183982 [details] [review]
Bug 40346: Use KOHA_INTRANET_URL for the baseUrl

This will prevent the test to reload when the URL changes

See https://github.com/cypress-io/cypress/issues/2777
Comment 5 Owen Leonard 2025-07-17 16:31:35 UTC
Created attachment 184224 [details] [review]
Bug 40346: Introduce loginOpac and visitOpac - Cypress

To be able to test the OPAC interface we need to add those 2 new
commands

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2025-07-17 16:31:37 UTC
Created attachment 184225 [details] [review]
Bug 40346: Add tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 7 Owen Leonard 2025-07-17 16:31:40 UTC
Created attachment 184226 [details] [review]
Bug 40346: Use KOHA_INTRANET_URL for the baseUrl

This will prevent the test to reload when the URL changes

See https://github.com/cypress-io/cypress/issues/2777

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Martin Renvoize (ashimema) 2025-07-18 11:26:49 UTC
Created attachment 184340 [details] [review]
Bug 40346: Introduce loginOpac and visitOpac - Cypress

To be able to test the OPAC interface we need to add those 2 new
commands

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 9 Martin Renvoize (ashimema) 2025-07-18 11:26:51 UTC
Created attachment 184341 [details] [review]
Bug 40346: Add tests

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 10 Martin Renvoize (ashimema) 2025-07-18 11:26:53 UTC
Created attachment 184342 [details] [review]
Bug 40346: Use KOHA_INTRANET_URL for the baseUrl

This will prevent the test to reload when the URL changes

See https://github.com/cypress-io/cypress/issues/2777

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 11 Lucas Gass (lukeg) 2025-07-21 20:03:43 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 12 Paul Derscheid 2025-08-22 08:29:28 UTC
Nice work everyone!

Pushed to 25.05.x