Skip to content

Commit

Permalink
Test adjustments 5
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Dec 1, 2023
1 parent b5e9d4d commit faea62e
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions superset-frontend/cypress-base/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,30 @@
*/
import '@cypress/code-coverage/support';
import '@applitools/eyes-cypress/commands';
import failOnConsoleError, { Config } from 'cypress-fail-on-console-error';
import failOnConsoleError 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".',
// 'Error: Unknown Error',
// /Unable to infer path to ace from script src/,
// ],
// });
// 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".',
'Error: Unknown Error',
/Unable to infer path to ace from script src/,
],
});

// // Set infividual tests to allow certain console erros to NOT fail, e.g
// // cy.allowConsoleErrors(['foo', /^some bar-regex.*/]);
// // This will be reset between tests.
// Cypress.Commands.addAll({
// getConsoleMessages: () => cy.wrap(getConfig()?.consoleMessages),
// allowConsoleErrors: (consoleMessages: (string | RegExp)[]) =>
// setConfig({ ...getConfig(), consoleMessages }),
// });
// Set infividual tests to allow certain console erros to NOT fail, e.g
// cy.allowConsoleErrors(['foo', /^some bar-regex.*/]);
// This will be reset between tests.
Cypress.Commands.addAll({
getConsoleMessages: () => cy.wrap(getConfig()?.consoleMessages),
allowConsoleErrors: (consoleMessages: (string | RegExp)[]) =>
setConfig({ ...getConfig(), consoleMessages }),
});

const BASE_EXPLORE_URL = '/explore/?form_data=';
let DASHBOARD_FIXTURES: Record<string, any>[] = [];

Check warning on line 47 in superset-frontend/cypress-base/cypress/support/e2e.ts

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected any. Specify a different type
Expand Down

0 comments on commit faea62e

Please sign in to comment.