This commit is contained in:
Alex Spencer
2025-11-25 15:50:08 -08:00
parent 21d9b0ddcf
commit b7aaf00c6c
2 changed files with 8 additions and 2 deletions
@@ -40,10 +40,13 @@ test.describe(
await expect(dashboardPage.getByGrafanaSelector(selectors.components.QueryEditorRows.rows)).toHaveCount(1);
// Duplicate refId B
// Open the actions menu
await dashboardPage
.getByGrafanaSelector(selectors.components.QueryEditorRow.actionButton('Duplicate query'))
.getByGrafanaSelector(selectors.components.QueryEditorRow.actionButton('Query actions menu'))
.first()
.click();
// Click duplicate query in the menu
await page.getByText('Duplicate query').click();
// We expect row with refId B and A to exist and be visible
await expect(dashboardPage.getByGrafanaSelector(selectors.components.QueryEditorRows.rows)).toHaveCount(2);
@@ -35,7 +35,10 @@ describe('Panel edit tests - queries', () => {
e2e.components.QueryEditorRows.rows({ timeout: flakyTimeout }).should('have.length', 1);
// Duplicate refId B
e2e.components.QueryEditorRow.actionButton('Duplicate query').eq(0).should('be.visible').click();
// Open the actions menu
e2e.components.QueryEditorRow.actionButton('Query actions menu').eq(0).should('be.visible').click();
// Click duplicate query in the menu
cy.contains('Duplicate query').should('be.visible').click();
// We expect row with refId Band and A to exist and be visible
e2e.components.QueryEditorRows.rows().should('have.length', 2);