michael-s-molina commented on code in PR #24872:
URL: https://github.com/apache/superset/pull/24872#discussion_r1285030393
##########
superset-frontend/cypress-base/cypress/support/index.d.ts:
##########
@@ -41,6 +41,7 @@ declare namespace Cypress {
cleanDashboards(): cy;
loadChartFixtures(): cy;
loadDashboardFixtures(): cy;
+ setConsoleMessages(consoleMessages: (string | RegExp)[]): cy;
Review Comment:
Maybe `allowConsoleMessages` would be a better name?
##########
superset-frontend/cypress-base/cypress/support/e2e.ts:
##########
@@ -18,9 +18,32 @@
*/
import '@cypress/code-coverage/support';
import '@applitools/eyes-cypress/commands';
+import failOnConsoleError, { Config } from 'cypress-fail-on-console-error';
require('cy-verify-downloads').addCustomCommand();
+// fail on console error, allow config to override individual tests
+// these exceptions are a little pile of tech debt
+const { getConfig, setConfig } = failOnConsoleError({
+ consoleMessages: [
+ /\[webpack-dev-server\]/,
+ 'The pseudo class ":first-child" is potentially unsafe when doing
server-side rendering. Try changing it to ":first-of-type".',
+ 'The pseudo class ":nth-child" is potentially unsafe when doing
server-side rendering. Try changing it to ":nth-of-type".',
+ /Warning: /,
Review Comment:
Is it possible to make this regex more restrictive and add specific warning
types? My concern is that any new warning will be ignored.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]