E2E: Fix path for importDashboards (#40111)

* Small e2e fix for importDashboards
This commit is contained in:
Sarah Zinger 2021-10-12 15:48:36 -04:00 committed by GitHub
parent 24fa93bd58
commit 47f09fca8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,8 @@ Cypress.Commands.add('readProvisions', (filePaths: string[]) => {
Cypress.Commands.add('getJSONFilesFromDir', (dirPath: string) => {
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,
});
});