Skip to content

Commit 22ff0f4

Browse files
committed
e2e: fix for flakiness in PanelEditPage.refreshPanel
(cherry picked from commit 04798f6)
1 parent 5fe07ca commit 22ff0f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/plugin-e2e/src/models/pages/PanelEditPage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ export class PanelEditPage extends GrafanaPage {
181181
});
182182

183183
try {
184+
await expect(refreshPanelButton).toBeVisible();
185+
// if the refreshPanelButton has the text 'Cancel', then wait until it says Refresh otherwise we'll cancel all the ongoing requests
186+
await expect(refreshPanelButton).toHaveText(/refresh/i, { timeout: 2000 });
184187
await refreshPanelButton.click({ timeout: 2000 });
185188
} catch (error) {
186189
// refresh button may be hidden behind the visualization options

0 commit comments

Comments
 (0)