Bug 40809

Summary: JS warning should make Cypress tests fail
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: matt.blenkinsop
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 40809: Fail Cypress tests on JS warnings

Description Jonathan Druart 2025-09-15 12:22:57 UTC

    
Comment 1 Jonathan Druart 2025-09-15 12:25:42 UTC
Created attachment 186401 [details] [review]
Bug 40809: Fail Cypress tests on JS warnings

Currently JS warnings during Cypress tests are ignored.
This change intercepts console warnings in the browser and if any occurs
the test failed

This helps catch potential issues and ensures that warnings are not
silently ignored during test runs.
Comment 2 Jonathan Druart 2025-09-15 12:50:22 UTC
Test plan:
All Cypress tests should still pass.

QA will take care of adding a JS warning and confirm that the test fails.