mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06: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
25 lines
604 B
TypeScript
25 lines
604 B
TypeScript
interface CompareSceenshotsConfig {
|
|
name: string;
|
|
threshold?: number;
|
|
}
|
|
|
|
Cypress.Commands.add('compareSceenshots', (config: CompareSceenshotsConfig | string) => {
|
|
cy.task('compareSceenshots', {
|
|
config,
|
|
screenshotsFolder: Cypress.config('screenshotsFolder'),
|
|
specName: Cypress.spec.name,
|
|
});
|
|
});
|
|
|
|
// @todo remove
|
|
Cypress.Commands.add('logToConsole', (message: string, optional?: any) => {
|
|
cy.task('log', { message, optional });
|
|
});
|
|
|
|
Cypress.Commands.add('readProvisions', (filePaths: string[]) => {
|
|
cy.task('readProvisions', {
|
|
CWD: Cypress.env('CWD'),
|
|
filePaths,
|
|
});
|
|
});
|