From 9b2df4dc0282ced1ec619fbd8d270a8b6c1efffa Mon Sep 17 00:00:00 2001 From: Sam Feifer Date: Tue, 26 Mar 2024 12:38:30 -0400 Subject: [PATCH] update ci for grafana 10 --- .github/workflows/ci.yml | 2 +- cypress/e2e/datasources/redis.cy.ts | 11 ++++++++++- cypress/e2e/datasources/vector.cy.ts | 11 ++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a034e9f2..93c2c51e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: strategy: fail-fast: false matrix: - grafana_image: ['grafana:latest', 'grafana:9.0.9'] + grafana_image: ['grafana:latest', 'grafana:10.2.5', 'grafana:9.0.9'] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/cypress/e2e/datasources/redis.cy.ts b/cypress/e2e/datasources/redis.cy.ts index 22e688cc..76791296 100644 --- a/cypress/e2e/datasources/redis.cy.ts +++ b/cypress/e2e/datasources/redis.cy.ts @@ -20,7 +20,16 @@ describe('PCP Redis data source', () => { it('should auto-complete metric names', () => { cy.visit('/dashboard/new'); - cy.contains('Add a new panel').click(); + + //tests for grafana 10 UI + cy.get('body').then(($body) => { + if ($body.text().search('Add a new panel') > 0) { + cy.contains('Add a new panel').click(); + } else { + cy.contains('Add visualization').click(); + cy.get('div.scrollbar-view').contains('PCP Redis').click(); + } + }); // start typing cy.get('.monaco-editor textarea').type('disk.dev.by', { force: true }); diff --git a/cypress/e2e/datasources/vector.cy.ts b/cypress/e2e/datasources/vector.cy.ts index e6c41b77..9ebf7198 100644 --- a/cypress/e2e/datasources/vector.cy.ts +++ b/cypress/e2e/datasources/vector.cy.ts @@ -20,7 +20,16 @@ describe('PCP Vector data source', () => { it('should auto-complete metric names', () => { cy.visit('/dashboard/new'); - cy.contains('Add a new panel').click(); + + //test for Grafana 10 UI + cy.get('body').then(($body) => { + if ($body.text().search('Add a new panel') > 0) { + cy.contains('Add a new panel').click(); + } else { + cy.contains('Add visualization').click(); + cy.contains('PCP Vector').click();; + } + }); // start typing cy.get('.monaco-editor').type('disk.dev.write_b');