Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@
"@elastic/ems-client": "8.7.0",
"@elastic/esql": "4.34.0",
"@elastic/esql-definitions": "4.34.0",
"@elastic/eui": "123.2.0",
"@elastic/eui-illustrations": "1.1.0",
"@elastic/eui-theme-borealis": "8.1.0",
"@elastic/eui": "123.3.0-snapshot.1793285361796",
"@elastic/eui-illustrations": "1.1.0-snapshot.1793285361796",
"@elastic/eui-theme-borealis": "8.1.0-snapshot.1793285361796",
"@elastic/filesaver": "1.1.2",
"@elastic/isomer-runtime": "0.4.0",
"@elastic/isomer-sdk": "0.4.0",
Expand Down Expand Up @@ -1731,9 +1731,9 @@
"@babel/types": "7.29.8",
"@cypress/grep": "5.1.0",
"@cypress/webpack-preprocessor": "6.0.2",
"@elastic/eslint-plugin-eui": "3.2.0",
"@elastic/eui-test-helpers": "2.1.0",
"@elastic/eui-theme-common": "10.1.0",
"@elastic/eslint-plugin-eui": "3.3.0-snapshot.1793285361796",
"@elastic/eui-test-helpers": "2.2.0-snapshot.1793285361796",
"@elastic/eui-theme-common": "10.1.0-snapshot.1793285361796",
"@elastic/makelogs": "6.1.1",
"@emotion/babel-preset-css-prop": "11.11.0",
"@emotion/jest": "11.11.0",
Expand Down
68 changes: 34 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ export function createWaterfall(page: ScoutPage): Waterfall {
return {
container,
sizeWarning: page.testSubj.locator('waterfallSizeWarning'),
sizeWarningDiscoverLink: page
.locator('.euiCallOutHeader__title')
.locator('[data-test-subj="waterfallSizeWarningDiscoverLink"]'),
// The call out announces on mount, which renders an off-screen copy of its content under a
// `role="status"` live region. Exclude that copy so the link resolves to one element.
sizeWarningDiscoverLink: page.locator(
'[data-test-subj="waterfallSizeWarningDiscoverLink"]:not([role="status"] *)'
),
getItem(name: string): WaterfallItem {
return getWaterfallItem(container, name);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export class FileDataVisualizer {

constructor(private readonly page: ScoutPage) {
this.fileLoadingIndicator = this.page.testSubj.locator('dataVisualizerPageFileLoading');
// Scope to `.euiCallOut` so the locator does not also match EUI's
// `…__content` child that reuses the same data-test-subj token.
// The subj is compound (`… fileTooLarge`), so match the token and exclude the
// `…__message`, `…__content` and `…__actions` children EUI derives from it.
this.fileUploadErrorCallout = this.page.locator(
'.euiCallOut[data-test-subj~="dataVisualizerFileUploadErrorCallout"]'
'[data-test-subj~="dataVisualizerFileUploadErrorCallout"]:not([data-test-subj$="__message"]):not([data-test-subj$="__content"]):not([data-test-subj$="__actions"])'
);
this.fileInput = this.page.locator('input[type="file"]');
this.importButton = this.page.testSubj.locator('fileUploadImportButton');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ const openEditFlowByTitle = async (
) => {
await page.goto(kbnUrl.get(MAINTENANCE_WINDOWS_APP_PATH));
await page.locator(TABLE_LOADED_CSS).waitFor();
const searchBox = page.locator('.euiFieldSearch:not(.euiSelectableTemplateSitewide__search)');
const searchBox = page.locator(
'input[type="search"]:not(.euiSelectableTemplateSitewide__search)'
);
await searchBox.fill(name);
// The pre-search table is already loaded, so wait for the search request itself: acting on the
// stale table lets the re-render close the actions popover.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ const assertValidationCalloutCount = async (
page: ScoutPage,
expectedCount: number
): Promise<void> => {
const validationCallouts = page.locator('.euiCallOut[data-test-subj~="mlValidationCallout"]');
// The subj is compound (`mlValidationCallout <status>`), so match the token and exclude
// the `…__message`, `…__content` and `…__actions` children EUI derives from it.
const validationCallouts = page.locator(
'[data-test-subj~="mlValidationCallout"]:not([data-test-subj$="__message"]):not([data-test-subj$="__content"]):not([data-test-subj$="__actions"])'
);
await expect(validationCallouts).not.toHaveCount(0);
await expect(validationCallouts).toHaveCount(expectedCount);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ test.describe('Webhook connector', { tag: tags.stateful.classic }, () => {
await authSSL.waitFor({ state: 'visible' });
await authSSL.click();

const tabs = page.testSubj.locator('webhookCertTypeTabs').locator('.euiTab');
const tabs = page.testSubj.locator('webhookCertTypeTabs').getByRole('tab');
await expect(tabs).toHaveCount(2);
await expect(page.testSubj.locator('webhookCertTypeCRTab')).toBeVisible();
await expect(page.testSubj.locator('webhookCertTypePFXTab')).toBeVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ const openEditFlow = async (

// The MW page renders a single search field; the unrelated
// sitewide-search input is excluded by the CSS selector.
const searchBox = page.locator('.euiFieldSearch:not(.euiSelectableTemplateSitewide__search)');
const searchBox = page.locator(
'input[type="search"]:not(.euiSelectableTemplateSitewide__search)'
);
await searchBox.fill(name);
// The pre-search table is already loaded, so wait for the search request itself: acting on the
// stale table lets the re-render close the actions popover.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ export class DiagnosticsPage {
const root = containerTestSubj
? this.page.getByTestId(containerTestSubj)
: this.page.getByTestId('apmDiagnosticsTemplate');
await expect(root.locator('.euiTable')).toBeVisible({ timeout: EXTENDED_TIMEOUT });
await expect(root.getByRole('table')).toBeVisible({ timeout: EXTENDED_TIMEOUT });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ test.describe(
await browserAuth.loginAsViewer();
await diagnosticsPage.goto();

const tabs = page.getByTestId('apmDiagnosticsTemplate').locator('.euiTabs .euiTab');
const tabs = page.getByTestId('apmDiagnosticsTemplate').getByRole('tab');
await expect(tabs).toHaveText(['Summary', 'Documents', 'Import/Export'], {
timeout: EXTENDED_TIMEOUT,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ test.describe('GettingStarted', { tag: tags.stateful.classic }, () => {
});

await test.step('shows validation error on submit', async () => {
await page.locator('.euiSideNavItem').locator('text=Synthetics').click();
await page
.getByRole('navigation')
.getByRole('link', { name: 'Synthetics', exact: true })
.click();
await page.click('text=Create monitor');
await expect(page.getByText('URL is required')).toBeVisible();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test.describe('ProjectMonitorReadOnly', { tag: tags.stateful.classic }, () => {
await test.step('verify read-only state', async () => {
await pageObjects.syntheticsApp.navigateToEditMonitor(monitorName);
await expect(
page.locator('.euiCallOutHeader__title').filter({ hasText: 'read-only' })
page.getByText('This configuration is read-only', { exact: true })
).toBeVisible();
monitorId = new URL(page.url()).pathname.split('/').at(-1) || '';
originalConfig = (await syntheticsServices.getMonitor(monitorId)) as Record<string, unknown>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ test.describe('Uptime feature controls - security', { tag: ['@local-stateful-cla
await page.gotoApp('uptime');

await test.step('shows Uptime navlink', async () => {
await expect(page.locator('.euiSideNavItemButton__label[title="Uptime"]')).toBeVisible({
await expect(
page.getByRole('navigation').getByRole('link', { name: 'Uptime Monitors', exact: true })
).toBeVisible({
timeout: 10_000,
});
});
Expand Down Expand Up @@ -66,7 +68,9 @@ test.describe('Uptime feature controls - security', { tag: ['@local-stateful-cla
await page.testSubj.waitForSelector('uptimeApp', { timeout: 10_000 });

await test.step('shows Uptime navlink', async () => {
await expect(page.locator('.euiSideNavItemButton__label[title="Uptime"]')).toBeVisible({
await expect(
page.getByRole('navigation').getByRole('link', { name: 'Uptime Monitors', exact: true })
).toBeVisible({
timeout: 10_000,
});
});
Expand Down Expand Up @@ -98,7 +102,9 @@ test.describe('Uptime feature controls - security', { tag: ['@local-stateful-cla
await page.gotoApp('uptime');

await test.step('does not show Uptime navlink', async () => {
await expect(page.locator('.euiSideNavItemButton__label[title="Uptime"]')).toBeHidden({
await expect(
page.getByRole('navigation').getByRole('link', { name: 'Uptime Monitors', exact: true })
).toBeHidden({
timeout: 10_000,
});
});
Expand Down
Loading