From db08d8d43eef26005c9c022445f4530caba71ac3 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 21 May 2018 17:15:05 -0700 Subject: [PATCH] test - e2e - ignore react 'unknown props dataset' warnings --- test/e2e/metamask.spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/e2e/metamask.spec.js b/test/e2e/metamask.spec.js index fac560176..72861adc4 100644 --- a/test/e2e/metamask.spec.js +++ b/test/e2e/metamask.spec.js @@ -310,10 +310,13 @@ describe('Metamask popup page', function () { async function checkBrowserForConsoleErrors() { const ignoredLogTypes = ['WARNING'] + const ignoredErrorMessages = ['Warning: Unknown prop `dataset` on '] const browserLogs = await driver.manage().logs().get('browser') const errorEntries = browserLogs.filter(entry => !ignoredLogTypes.includes(entry.level.toString())) - const errorEntryObjects = errorEntries.map(entry => entry.toJSON()) - return errorEntryObjects + const errorObjects = errorEntries.map(entry => entry.toJSON()) + // 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) {