diff --git a/packages/app/tests/e2e/page-objects/DashboardPage.ts b/packages/app/tests/e2e/page-objects/DashboardPage.ts index 2c11f324a..f0bf4d576 100644 --- a/packages/app/tests/e2e/page-objects/DashboardPage.ts +++ b/packages/app/tests/e2e/page-objects/DashboardPage.ts @@ -246,6 +246,10 @@ export class DashboardPage { async createNewDashboard() { await this.createDashboardButton.click(); await this.page.waitForURL(/\/dashboards\/.+/); + // The URL changes before the temporary dashboard page is swapped for the + // saved one. A rename typed in between lands on the temporary dashboard + // and is lost. The save button only exists on the temporary page. + await expect(this.createDashboardButton).toBeHidden({ timeout: 15000 }); } async changeGranularity(granularity: string) { @@ -564,6 +568,10 @@ export class DashboardPage { async openNewTileEditor() { await this.createDashboardButton.click(); await this.page.waitForURL(/\/dashboards\/.+/); + // The URL changes before the temporary dashboard page is swapped for the + // saved one. A rename typed in between lands on the temporary dashboard + // and is lost. The save button only exists on the temporary page. + await expect(this.createDashboardButton).toBeHidden({ timeout: 15000 }); await this.addDropdownButton.click(); await this.addTileMenuItem.click(); await expect(this.chartEditor.nameInput).toBeVisible();