[9.2] [APM] Migrate the Transaction Overview tests to Scout/Playwright/Component/API tests (#245972)#252497
Conversation
…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)
|
Pinging @elastic/obs-presentation-team (Team:obs-presentation) |
jennypavlova
left a comment
There was a problem hiding this comment.
Well done, I added some questions/suggestions ⬇️
|
|
||
| // Verify detailed statistics contains data for all expected transaction names | ||
| const detailedStats = detailedStatisticsResponse.body; | ||
| if (detailedStats.currentPeriod) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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']); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 🤔
Backport
This will backport the following commits from
mainto9.2:Questions ?
Please refer to the Backport tool documentation