Skip to content

[9.2] [APM] Migrate the Transaction Overview tests to Scout/Playwright/Component/API tests (#245972)#252497

Merged
sbelastic merged 1 commit intoelastic:9.2from
sbelastic:backport/9.2/pr-245972
Feb 10, 2026
Merged

[9.2] [APM] Migrate the Transaction Overview tests to Scout/Playwright/Component/API tests (#245972)#252497
sbelastic merged 1 commit intoelastic:9.2from
sbelastic:backport/9.2/pr-245972

Conversation

@sbelastic
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

…onent/API tests (elastic#245972)

Closes elastic#238515

Migrating transactions overview tests from Cypress to Scout

Run server (first terminal):

`node scripts/scout.js start-server --stateful`

Run tests (second terminal):

`
npx playwright test --project local --ui --config
x-pack/solutions/observability/plugins/apm/test/scout/ui/parallel.playwright.config.ts
`

Run server (first terminal):

`node scripts/functional_tests_server --config
x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts`

Run tests (second terminal):

`node scripts/functional_test_runner --config
x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts
--include=x-pack/solutions/observability/test/api_integration_deployment_agnostic/apis/apm/transactions/transactions_groups_order.spec.ts`

<img width="1919" height="1122" alt="image"
src="https://github.com/user-attachments/assets/7167375c-879d-410a-912a-ab6581011fdf"
/>

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 23c0e3c)
@sbelastic sbelastic added the backport This PR is a backport of another PR label Feb 10, 2026
@sbelastic sbelastic enabled auto-merge (squash) February 10, 2026 11:07
@botelastic botelastic bot added the Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation label Feb 10, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

@sbelastic sbelastic self-assigned this Feb 10, 2026
Copy link
Copy Markdown
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, I added some questions/suggestions ⬇️


// Verify detailed statistics contains data for all expected transaction names
const detailedStats = detailedStatisticsResponse.body;
if (detailedStats.currentPeriod) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid conditional tests?


const serviceName = 'service-go';
const start = new Date('2021-10-10T00:00:00.000Z').getTime();
const end = new Date('2021-10-10T00:15:00.000Z').getTime() - 1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a constant will make sense for the dates as they could be reused. Wdyt?

await page.getByTestId('serviceGroupCard').click();
await serviceGroupsPage.expectByText(['go services', 'synth-go-1', 'synth-go-2']);
await expect(page.getByTestId('apmEditButtonEditGroupButton')).toBeVisible();
await serviceGroupsPage.expectByText(['synth-go-1', 'synth-go-2']);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that we had before: ['go services', 'synth-go-1', 'synth-go-2'] should we include GO_SERVICE_GROUP_NAME as well ?

await test.step('opens service list when clicking on service group card', async () => {
await page.getByTestId('serviceGroupCard').click();
await serviceGroupsPage.expectByText(['go services', 'synth-go-1', 'synth-go-2']);
await expect(page.getByTestId('apmEditButtonEditGroupButton')).toBeVisible();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: We can remove the Edit/Button duplication by changing it to apmEditGroupButton, wdyt?

testData.OPBEANS_END_DATE
);

// Verify Transactions tab is selected (same as original Cypress check)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q do we need the comments here? I mean we are migrating the tests, IMO it's obvious that it's the same as original Cypress check 🤔

Copy link
Copy Markdown
Member

@jennypavlova jennypavlova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the comments are good-to-have things so not a mandatory requirement for a backport (feel free to skip or address in a follow up)

@sbelastic sbelastic merged commit 530d85a into elastic:9.2 Feb 10, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants