mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 23:58:06 +01:00
test - e2e - ignore react 'unknown props dataset' warnings
This commit is contained in:
parent
9c6e2ec8ef
commit
db08d8d43e
@ -310,10 +310,13 @@ describe('Metamask popup page', function () {
|
|||||||
|
|
||||||
async function checkBrowserForConsoleErrors() {
|
async function checkBrowserForConsoleErrors() {
|
||||||
const ignoredLogTypes = ['WARNING']
|
const ignoredLogTypes = ['WARNING']
|
||||||
|
const ignoredErrorMessages = ['Warning: Unknown prop `dataset` on ']
|
||||||
const browserLogs = await driver.manage().logs().get('browser')
|
const browserLogs = await driver.manage().logs().get('browser')
|
||||||
const errorEntries = browserLogs.filter(entry => !ignoredLogTypes.includes(entry.level.toString()))
|
const errorEntries = browserLogs.filter(entry => !ignoredLogTypes.includes(entry.level.toString()))
|
||||||
const errorEntryObjects = errorEntries.map(entry => entry.toJSON())
|
const errorObjects = errorEntries.map(entry => entry.toJSON())
|
||||||
return errorEntryObjects
|
// ignore all errors that contain a message in `ignoredErrorMessages`
|
||||||
|
const matchedErrorObjects = errorObjects.filter(entry => !ignoredErrorMessages.some(message => entry.message.includes(message)))
|
||||||
|
return matchedErrorObjects
|
||||||
}
|
}
|
||||||
|
|
||||||
async function verboseReportOnFailure (test) {
|
async function verboseReportOnFailure (test) {
|
||||||
|
Loading…
Reference in New Issue
Block a user