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:
parent
4043e03cd6
commit
187a9b3572
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue