mirror of
https://github.com/grafana/grafana.git
synced 2025-09-21 07:44:29 +08:00

* 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
24 lines
838 B
JavaScript
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);
|
|
};
|