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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-09-26 07:01:44 +02:00 committed by Lucas Gass
parent 4043e03cd6
commit 187a9b3572
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 10 additions and 0 deletions

View File

@ -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) {