Files
Steven Vachon 78febbbeef @grafana/e2e: screenshots and panel flow (#25203)
* Cleanup

* addPanel now supports (optional) custom dashboardUid

* addPanel now supports (optional) visualization name

* Added CLI option for updating screenshot fixtures

* Added support for console.* functions within tests

* Refactored screenshot command for greater simplicity

* addPanel now sets a unique title

* Updated lockfile
2020-06-01 08:48:23 -04:00

24 lines
838 B
JavaScript

const compareScreenshots = require('./compareScreenshots');
const extendConfig = require('./extendConfig');
const readProvisions = require('./readProvisions');
const typescriptPreprocessor = require('./typescriptPreprocessor');
const { install: installConsoleLogger } = require('cypress-log-to-output');
module.exports = (on, config) => {
on('file:preprocessor', typescriptPreprocessor);
on('task', { compareScreenshots, readProvisions });
on('task', {
// @todo remove
log({ message, optional }) {
optional ? console.log(message, optional) : console.log(message);
return null;
},
});
installConsoleLogger(on);
// Always extend with this library's config and return for diffing
// @todo remove this when possible: https://github.com/cypress-io/cypress/issues/5674
return extendConfig(config);
};