From 11906164795b679684931f713603018707b9763f Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Mon, 14 Feb 2022 14:49:24 +0100 Subject: [PATCH] Fix tests --- .../cypress/integration/explore/chart.test.js | 4 +++- .../integration/explore/visualizations/line.test.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/superset-frontend/cypress-base/cypress/integration/explore/chart.test.js b/superset-frontend/cypress-base/cypress/integration/explore/chart.test.js index acb83264f7a81..c9f4a1c9f58bf 100644 --- a/superset-frontend/cypress-base/cypress/integration/explore/chart.test.js +++ b/superset-frontend/cypress-base/cypress/integration/explore/chart.test.js @@ -43,6 +43,8 @@ describe('No Results', () => { cy.visitChartByParams(JSON.stringify(formData)); cy.wait('@getJson').its('response.statusCode').should('eq', 200); - cy.get('div.chart-container').contains('No Results'); + cy.get('div.chart-container').contains( + 'No results were returned for this query', + ); }); }); diff --git a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/line.test.ts b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/line.test.ts index 63473a1b99cf8..5dda1abb99dc9 100644 --- a/superset-frontend/cypress-base/cypress/integration/explore/visualizations/line.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/explore/visualizations/line.test.ts @@ -29,13 +29,17 @@ describe('Visualization > Line', () => { it('should show validator error when no metric', () => { const formData = { ...LINE_CHART_DEFAULTS, metrics: [] }; cy.visitChartByParams(JSON.stringify(formData)); - cy.get('.ant-alert-warning').contains(`Metrics: cannot be empty`); + cy.get('.panel-body').contains( + `Add required control values to preview chart`, + ); }); it('should not show validator error when metric added', () => { const formData = { ...LINE_CHART_DEFAULTS, metrics: [] }; cy.visitChartByParams(JSON.stringify(formData)); - cy.get('.ant-alert-warning').contains(`Metrics: cannot be empty`); + cy.get('.panel-body').contains( + `Add required control values to preview chart`, + ); cy.get('.text-danger').contains('Metrics'); cy.get('[data-test=metrics]')