@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
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
const compareSnapshotsPlugin = require('./compareSnapshots');
|
||||
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) => {
|
||||
// yarn build fails with:
|
||||
// >> /Users/hugo/go/src/github.com/grafana/grafana/node_modules/stringmap/stringmap.js:99
|
||||
// >> throw new Error("StringMap expected string key");
|
||||
// on('task', {
|
||||
// failed: require('cypress-failed-log/src/failed')(),
|
||||
// });
|
||||
on('file:preprocessor', typescriptPreprocessor);
|
||||
on('task', { compareSnapshotsPlugin, readProvisions });
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user