Bugzilla – Attachment 186967 Details for
Bug 40809
JS warning should make Cypress tests fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40809: Fail on DataTables 'warnings'
Bug-40809-Fail-on-DataTables-warnings.patch (text/plain), 1.29 KB, created by
Matt Blenkinsop
on 2025-09-26 10:38:01 UTC
(
hide
)
Description:
Bug 40809: Fail on DataTables 'warnings'
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-09-26 10:38:01 UTC
Size:
1.29 KB
patch
obsolete
>From 059951e2bbe51e76d8b862c977d8e79513356c6a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 26 Sep 2025 07:01:44 +0200 >Subject: [PATCH] Bug 40809: Fail on DataTables 'warnings' > >They are not in the warn buffer but log >DataTables warning: table id=DataTables_Table_0 - Requested unknown parameter 'status' for row 0, column 4. For more information about this error, please see https://datatables.net/tn/4 > >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> >--- > t/cypress/support/e2e.js | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/t/cypress/support/e2e.js b/t/cypress/support/e2e.js >index b395ad1e2e3..604628b09bc 100644 >--- a/t/cypress/support/e2e.js >+++ b/t/cypress/support/e2e.js >@@ -31,6 +31,16 @@ Cypress.on("window:before:load", win => { > throw new Error(`JS Warning detected: ${args[0]}`); > } > }; >+ win.console.log = (...args) => { >+ if (args[0] && typeof args[0] === "string") { >+ if (args[0].match(/DataTables warning: /)) { >+ throw new Error( >+ `DataTables warning detected in log: ${args[0]}` >+ ); >+ } >+ console.log(args[0]); >+ } >+ }; > }); > > function get_fallback_login_value(param) { >-- >2.50.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40809
:
186401
|
186951
|
186966
| 186967 |
186968
|
186969
|
186977