Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Feb 14, 2022
1 parent ad1541c commit 1190616
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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]')
Expand Down

0 comments on commit 1190616

Please sign in to comment.