mirror of
https://github.com/grafana/grafana.git
synced 2025-09-26 03:14:23 +08:00
E2E: Fix path for importDashboards (#40111)
* Small e2e fix for importDashboards
This commit is contained in:
@ -26,7 +26,8 @@ Cypress.Commands.add('readProvisions', (filePaths: string[]) => {
|
|||||||
|
|
||||||
Cypress.Commands.add('getJSONFilesFromDir', (dirPath: string) => {
|
Cypress.Commands.add('getJSONFilesFromDir', (dirPath: string) => {
|
||||||
return cy.task('getJSONFilesFromDir', {
|
return cy.task('getJSONFilesFromDir', {
|
||||||
projectPath: Cypress.config().parentTestsFolder,
|
// CWD is set for plugins in the cli but not for the main grafana repo: https://github.com/grafana/grafana/blob/main/packages/grafana-e2e/cli.js#L12
|
||||||
|
projectPath: Cypress.env('CWD') || Cypress.config().parentTestsFolder,
|
||||||
relativePath: dirPath,
|
relativePath: dirPath,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user