[APM][Cypress] Attempt to fix mobile transactions test (#217648)

## Summary

Closes #207040
This commit is contained in:
Sergi Romeu 2025-04-11 10:28:49 +02:00 committed by GitHub
parent f7e9b4c591
commit 429a9db67d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,46 +21,34 @@ const mobileTransactionsPageHref = url.format({
});
describe('Mobile transactions page', () => {
beforeEach(() => {
cy.loginAsViewerUser();
before(() => {
synthtrace.index(
generateMobileData({
from: new Date(start).getTime(),
to: new Date(end).getTime(),
})
);
});
describe('when data is loaded', () => {
before(() => {
synthtrace.index(
generateMobileData({
from: new Date(start).getTime(),
to: new Date(end).getTime(),
})
);
});
after(() => {
synthtrace.clean();
});
after(() => {
synthtrace.clean();
});
it('when click on tab it shows the correct table for each tab', () => {
cy.loginAsViewerUser();
cy.visitKibana(mobileTransactionsPageHref);
cy.waitUntilPageContentIsLoaded();
// FLAKY: https://github.com/elastic/kibana/issues/207040
describe.skip('when click on tab shows correct table', () => {
it('shows version tab', () => {
cy.visitKibana(mobileTransactionsPageHref);
cy.getByTestSubj('apmAppVersionTab').click();
cy.getByTestSubj('apmAppVersionTab').should('have.attr', 'aria-selected', 'true');
cy.url().should('include', 'mobileSelectedTab=app_version_tab');
});
cy.getByTestSubj('apmAppVersionTab').click();
cy.getByTestSubj('apmAppVersionTab').should('have.attr', 'aria-selected', 'true');
cy.url().should('include', 'mobileSelectedTab=app_version_tab');
it('shows OS version tab', () => {
cy.visitKibana(mobileTransactionsPageHref);
cy.getByTestSubj('apmOsVersionTab').click();
cy.getByTestSubj('apmOsVersionTab').should('have.attr', 'aria-selected', 'true');
cy.url().should('include', 'mobileSelectedTab=os_version_tab');
});
cy.getByTestSubj('apmOsVersionTab').click();
cy.getByTestSubj('apmOsVersionTab').should('have.attr', 'aria-selected', 'true');
cy.url().should('include', 'mobileSelectedTab=os_version_tab');
it('shows devices tab', () => {
cy.visitKibana(mobileTransactionsPageHref);
cy.getByTestSubj('apmDevicesTab').click();
cy.getByTestSubj('apmDevicesTab').should('have.attr', 'aria-selected', 'true');
cy.url().should('include', 'mobileSelectedTab=devices_tab');
});
});
cy.getByTestSubj('apmDevicesTab').click();
cy.getByTestSubj('apmDevicesTab').should('have.attr', 'aria-selected', 'true');
cy.url().should('include', 'mobileSelectedTab=devices_tab');
});
});