[User Experience app] fix e2e tests (#91423)

This commit is contained in:
Shahzad 2021-02-16 16:54:50 +01:00 committed by GitHub
parent e8fea280bc
commit 1c093c9760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -31,13 +31,13 @@ Then(`breakdown series should appear in chart`, () => {
cy.get('.euiLoadingChart').should('not.exist');
cy.get('[data-cy=pageLoadDist]').within(() => {
cy.get('div.echLegendItem__label[title=Chrome] ', DEFAULT_TIMEOUT)
cy.get('button.echLegendItem__label[title=Chrome] ', DEFAULT_TIMEOUT)
.invoke('text')
.should('eq', 'Chrome');
cy.get('div.echLegendItem__label', DEFAULT_TIMEOUT).should(
cy.get('button.echLegendItem__label', DEFAULT_TIMEOUT).should(
'have.text',
'OverallChromeChrome Mobile WebViewSafariFirefoxMobile SafariChrome MobileChrome Mobile iOS'
'ChromeChrome Mobile WebViewSafariFirefoxMobile SafariChrome MobileChrome Mobile iOSOverall'
);
});
});

View file

@ -52,12 +52,14 @@ Then(`should display percentile for page load chart`, () => {
});
Then(`should display chart legend`, () => {
const chartLegend = 'div.echLegendItem__label';
const chartLegend = 'button.echLegendItem__label';
waitForLoadingToFinish();
cy.get('.euiLoadingChart').should('not.exist');
cy.get(chartLegend, DEFAULT_TIMEOUT).eq(0).should('have.text', 'Overall');
cy.get('[data-cy=pageLoadDist]').within(() => {
cy.get(chartLegend, DEFAULT_TIMEOUT).eq(0).should('have.text', 'Overall');
});
});
Then(`should display tooltip on hover`, () => {