[8.x] [APM][Cypress] Attempt to fix mobile transactions test (#217648) (#217953)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM][Cypress] Attempt to fix mobile transactions test
(#217648)](https://github.com/elastic/kibana/pull/217648)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-04-11T08:28:49Z","message":"[APM][Cypress]
Attempt to fix mobile transactions test (#217648)\n\n##
Summary\n\nCloses
#207040","sha":"429a9db67d361b25f191a67c16775354a0c2d631","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","apm:mobile","backport:all-open","Team:obs-ux-infra_services","v9.1.0"],"title":"[APM][Cypress]
Attempt to fix mobile transactions
test","number":217648,"url":"https://github.com/elastic/kibana/pull/217648","mergeCommit":{"message":"[APM][Cypress]
Attempt to fix mobile transactions test (#217648)\n\n##
Summary\n\nCloses
#207040","sha":"429a9db67d361b25f191a67c16775354a0c2d631"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217648","number":217648,"mergeCommit":{"message":"[APM][Cypress]
Attempt to fix mobile transactions test (#217648)\n\n##
Summary\n\nCloses
#207040","sha":"429a9db67d361b25f191a67c16775354a0c2d631"}}]}]
BACKPORT-->
This commit is contained in:
Sergi Romeu 2025-04-11 13:03:02 +02:00 committed by GitHub
parent 7e4cb92b65
commit 53a6091a05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,47 +20,35 @@ const mobileTransactionsPageHref = url.format({
},
});
// Failing: See https://github.com/elastic/kibana/issues/207040
describe.skip('Mobile transactions page', () => {
beforeEach(() => {
cy.loginAsViewerUser();
describe('Mobile transactions page', () => {
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();
describe('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');
});
});