Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0ba2ae3
Migrate transactions overview tests to scout
sbelastic Dec 11, 2025
7f6d520
Make tests less flaky and add option to waitForLoadingIndicatorHidden
sbelastic Dec 11, 2025
3a8a150
Merge remote-tracking branch 'upstream/main' into 238515-migrate-tran…
sbelastic Dec 12, 2025
cf669c1
Merge branch 'main' into 238515-migrate-transaction-overview-tests
sbelastic Dec 12, 2025
fd3c496
Revert QA changes and removed use of waitForLoadingIndicatorHidden
sbelastic Dec 15, 2025
f5e99cc
Merge branch 'main' into 238515-migrate-transaction-overview-tests
sbelastic Dec 15, 2025
cfd5c9d
Did code suggestions
sbelastic Dec 16, 2025
10d515b
Merge remote-tracking branch 'upstream/main' into 238515-migrate-tran…
sbelastic Dec 16, 2025
16bc509
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Dec 16, 2025
bbdb53b
Remove wait for request in transation overview tests
sbelastic Dec 16, 2025
456cbb0
Merge remote-tracking branch 'upstream/main' into 238515-migrate-tran…
sbelastic Dec 16, 2025
2daef1e
More code cleanup and move test from e2e to integration
sbelastic Dec 16, 2025
1b63667
Merge branch 'main' into 238515-migrate-transaction-overview-tests
sbelastic Dec 16, 2025
e04c51e
Merge branch 'main' into 238515-migrate-transaction-overview-tests
sbelastic Dec 16, 2025
2ad25df
Small changes and optimizations
sbelastic Dec 16, 2025
2bbff6a
Merge branch 'main' into 238515-migrate-transaction-overview-tests
sbelastic Dec 16, 2025
3fff6ae
Merge branch 'main' into 238515-migrate-transaction-overview-tests
sbelastic Dec 16, 2025
845fb9e
Fix FTR test with new data-test-subj
sbelastic Dec 17, 2025
e370442
Merge branch 'main' into 238515-migrate-transaction-overview-tests
sbelastic Dec 17, 2025
b130b74
Revert Id changes
sbelastic Dec 17, 2025
ffebbd4
Merge branch 'main' into 238515-migrate-transaction-overview-tests
sbelastic Dec 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { generateLongIdWithSeed } from '@kbn/synthtrace-client/src/lib/utils/gen

export const OPBEANS_START_DATE = '2021-10-10T00:00:00.000Z';
export const OPBEANS_END_DATE = '2021-10-10T00:15:00.000Z';
export const BIGGER_TIMEOUT = 45000;

export const PRODUCT_TRANSACTION_NAME = 'GET /api/product';
// Error constants - based on opbeans synthtrace data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { AgentExplorerPage } from './page_objects/agent_explorer';
import { AgentKeysPage } from './page_objects/agent_keys';
import { AnomalyDetectionPage } from './page_objects/anomaly_detection';
import { ErrorsPage } from './page_objects/errors';
import { TransactionsOverviewPage } from './page_objects/transactions_overview';
import { APM_ROLES } from './constants';
import { TransactionDetailsPage } from './page_objects/transaction_details';

Expand All @@ -48,6 +49,7 @@ export interface ExtendedScoutTestFixtures extends ObltTestFixtures {
agentKeysPage: AgentKeysPage;
anomalyDetectionPage: AnomalyDetectionPage;
errorsPage: ErrorsPage;
transactionsOverviewPage: TransactionsOverviewPage;
transactionDetailsPage: TransactionDetailsPage;
};
browserAuth: ApmBrowserAuthFixture;
Expand Down Expand Up @@ -80,6 +82,7 @@ export const test = base.extend<ExtendedScoutTestFixtures, ObltWorkerFixtures>({
agentKeysPage: createLazyPageObject(AgentKeysPage, page, kbnUrl),
anomalyDetectionPage: createLazyPageObject(AnomalyDetectionPage, page, kbnUrl),
errorsPage: createLazyPageObject(ErrorsPage, page, kbnUrl),
transactionsOverviewPage: createLazyPageObject(TransactionsOverviewPage, page, kbnUrl),
transactionDetailsPage: createLazyPageObject(TransactionDetailsPage, page, kbnUrl),
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { ScoutPage } from '@kbn/scout-oblt';
import { BIGGER_TIMEOUT } from './constants';

/**
* Waits for the APM settings header link to be visible.
* This is commonly used to ensure the APM page has fully loaded.
*/
export async function waitForApmSettingsHeaderLink(page: ScoutPage): Promise<void> {
await page
.getByTestId('apmSettingsHeaderLink')
.waitFor({ state: 'visible', timeout: BIGGER_TIMEOUT });
}

/**
* Waits for the APM main container to be visible.
* This is commonly used to ensure the APM page has fully loaded.
*/
export async function waitForApmMainContainer(page: ScoutPage): Promise<void> {
await page.testSubj.waitForSelector('apmMainContainer', { timeout: BIGGER_TIMEOUT });
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@

import type { KibanaUrl, ScoutPage } from '@kbn/scout-oblt';
import { EuiComboBoxWrapper, EuiFieldTextWrapper } from '@kbn/scout-oblt';
import { waitForApmMainContainer } from '../page_helpers';

export class AgentConfigurationsPage {
constructor(private readonly page: ScoutPage, private readonly kbnUrl: KibanaUrl) {}

async goto() {
await this.page.goto(`${this.kbnUrl.app('apm')}/settings/agent-configuration`);
await this.page.testSubj.waitForSelector('apmMainContainer');
await waitForApmMainContainer(this.page);

// Wait for the page content to load
await this.page.getByRole('heading', { name: 'Settings', level: 1 }).waitFor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import type { KibanaUrl, ScoutPage } from '@kbn/scout-oblt';
import { waitForApmMainContainer } from '../page_helpers';

export class AgentExplorerPage {
constructor(private readonly page: ScoutPage, private readonly kbnUrl: KibanaUrl) {}
Expand All @@ -16,7 +17,7 @@ export class AgentExplorerPage {
'apm'
)}/settings/agent-explorer?kuery=&agentLanguage=&serviceName=&comparisonEnabled=true&environment=ENVIRONMENT_ALL`
);
await this.page.testSubj.waitForSelector('apmMainContainer');
await waitForApmMainContainer(this.page);

// Wait for the page content to load
await this.page.getByRole('heading', { name: 'Settings', level: 1 }).waitFor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
*/

import type { KibanaUrl, ScoutPage } from '@kbn/scout-oblt';
import { waitForApmSettingsHeaderLink } from '../page_helpers';

export class AgentKeysPage {
constructor(private readonly page: ScoutPage, private readonly kbnUrl: KibanaUrl) {}

async goto() {
await this.page.goto(`${this.kbnUrl.app('apm')}/settings/agent-keys`);
await this.page.waitForLoadingIndicatorHidden();
await waitForApmSettingsHeaderLink(this.page);
this.page.getByRole('heading', { name: 'Settings', level: 1 });

return this.page;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
import { expect } from '@kbn/scout-oblt';
import type { KibanaUrl, ScoutPage } from '@kbn/scout-oblt';
import { EuiComboBoxWrapper } from '@kbn/scout-oblt';
import { BIGGER_TIMEOUT } from '../constants';
import { waitForApmMainContainer } from '../page_helpers';

export class AnomalyDetectionPage {
constructor(private readonly page: ScoutPage, private readonly kbnUrl: KibanaUrl) {}

async goto() {
await this.page.goto(`${this.kbnUrl.app('apm')}/settings/anomaly-detection`);
await this.page.testSubj.waitForSelector('apmMainContainer');
await waitForApmMainContainer(this.page);

// Wait for the page content to load
await this.page.getByRole('heading', { name: 'Settings', level: 1 }).waitFor();
Expand All @@ -40,6 +42,7 @@ export class AnomalyDetectionPage {
async selectEnvironment(environmentName: string) {
const environmentComboBox = new EuiComboBoxWrapper(this.page, { locator: '.euiComboBox' });
await environmentComboBox.setCustomMultiOption(environmentName);
await this.page.keyboard.press('Escape');
}

async clickCreateJobsButton() {
Expand All @@ -57,6 +60,7 @@ export class AnomalyDetectionPage {

async deleteMlJob() {
const manageJobsButton = this.page.testSubj.locator('apmMLManageJobsTextLink');
await manageJobsButton.waitFor({ state: 'visible', timeout: BIGGER_TIMEOUT });
await manageJobsButton.click();
const allActionsButton = this.page.getByLabel('All actions, row 1');
await allActionsButton.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import type { KibanaUrl, Locator, ScoutPage } from '@kbn/scout-oblt';
import { expect } from '@kbn/scout-oblt';
import { waitForApmSettingsHeaderLink } from '../page_helpers';

export class CustomLinksPage {
public saveButton: Locator;
Expand All @@ -16,7 +17,7 @@ export class CustomLinksPage {

async goto() {
await this.page.goto(`${this.kbnUrl.app('apm')}/settings/custom-links`);
return this.page.waitForLoadingIndicatorHidden();
return await waitForApmSettingsHeaderLink(this.page);
}

async getCreateCustomLinkButton() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
*/

import type { KibanaUrl, ScoutPage } from '@kbn/scout-oblt';
import { waitForApmSettingsHeaderLink } from '../page_helpers';

export class GeneralSettingsPage {
constructor(private readonly page: ScoutPage, private readonly kbnUrl: KibanaUrl) {}

async goto() {
await this.page.goto(`${this.kbnUrl.app('apm')}/settings/general-settings`);
return this.page.waitForLoadingIndicatorHidden();
return await waitForApmSettingsHeaderLink(this.page);
}

async getInspectEsQueriesButton() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
*/

import type { KibanaUrl, ScoutPage } from '@kbn/scout-oblt';
import { waitForApmSettingsHeaderLink } from '../page_helpers';

export class IndicesPage {
constructor(private readonly page: ScoutPage, private readonly kbnUrl: KibanaUrl) {}

async goto() {
await this.page.goto(`${this.kbnUrl.app('apm')}/settings/apm-indices`);
return this.page.waitForLoadingIndicatorHidden();
return await waitForApmSettingsHeaderLink(this.page);
}

async getErrorIndexInput() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import type { KibanaUrl, ScoutPage } from '@kbn/scout-oblt';
import { expect } from '@kbn/scout-oblt';
import { waitForApmSettingsHeaderLink } from '../page_helpers';

export class ServiceGroupsPage {
constructor(private readonly page: ScoutPage, private readonly kbnUrl: KibanaUrl) {}
Expand All @@ -15,7 +16,7 @@ export class ServiceGroupsPage {
await this.page.goto(
`${this.kbnUrl.app('apm')}/service-groups?&rangeFrom=${start}&rangeTo=${end}`
);
return this.page.waitForLoadingIndicatorHidden();
return await waitForApmSettingsHeaderLink(this.page);
}

async typeInTheSearchBar(text: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
*/

import type { KibanaUrl, ScoutPage } from '@kbn/scout-oblt';
import { BIGGER_TIMEOUT } from '../constants';

export class ServiceInventoryPage {
constructor(private readonly page: ScoutPage, private readonly kbnUrl: KibanaUrl) {}

async gotoDetailedServiceInventoryWithDateSelected(start: string, end: string) {
await this.page.goto(`${this.kbnUrl.app('apm')}/services?&rangeFrom=${start}&rangeTo=${end}`);
await this.page.testSubj.waitForSelector('apmUnifiedSearchBar');
await this.page.testSubj.waitForSelector('apmUnifiedSearchBar', { timeout: BIGGER_TIMEOUT });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import type { KibanaUrl, Locator, ScoutPage } from '@kbn/scout-oblt';
import { expect } from '@kbn/scout-oblt';
import { waitForApmSettingsHeaderLink } from '../page_helpers';

export class ServiceMapPage {
public serviceMap: Locator;
Expand All @@ -27,7 +28,7 @@ export class ServiceMapPage {
await this.page.goto(
`${this.kbnUrl.app('apm')}/service-map?&rangeFrom=${start}&rangeTo=${end}`
);
return this.page.waitForLoadingIndicatorHidden();
return await waitForApmSettingsHeaderLink(this.page);
}

async gotoDetailedServiceMapWithDateSelected(start: string, end: string) {
Expand All @@ -36,7 +37,7 @@ export class ServiceMapPage {
'apm'
)}/services/opbeans-java/service-map?&rangeFrom=${start}&rangeTo=${end}`
);
return this.page.waitForLoadingIndicatorHidden();
return await waitForApmSettingsHeaderLink(this.page);
}

async getSearchBar() {
Expand Down
Loading