diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index af9de8aaa17bf..4d87b0286e483 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -468,7 +468,7 @@ const getPipeline = (filename: string, removeSteps = true) => { /^x-pack\/solutions\/observability\/plugins\/apm/, /^x-pack\/solutions\/observability\/plugins\/observability_onboarding/, /^x-pack\/solutions\/security\/packages\/kbn-scout-security/, - /^x-pack\/solutions\/security\/plugins\/security_solution/, + /^x-pack\/solutions\/security\/plugins\/security_solution\/public\/flyout/, ])) || GITHUB_PR_LABELS.includes('ci:scout-ui-tests') ) { diff --git a/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/test/page_objects/alerts_table.ts b/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/test/page_objects/alerts_table.ts index cb3cf8323cd6b..c8aa96f5d9ca6 100644 --- a/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/test/page_objects/alerts_table.ts +++ b/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/test/page_objects/alerts_table.ts @@ -10,21 +10,24 @@ import { ScoutPage, Locator, expect } from '@kbn/scout'; const PAGE_URL = 'security/alerts'; export class AlertsTablePage { + public detectionsAlertsContainer: Locator; public alertRow: Locator; - public alertsTable: Locator; + public alertsTableBody: Locator; constructor(private readonly page: ScoutPage) { + this.detectionsAlertsContainer = this.page.testSubj.locator('detectionsAlertsPage'); this.alertRow = this.page.locator('div.euiDataGridRow'); - this.alertsTable = this.page.testSubj.locator('alertsTable'); + this.alertsTableBody = this.page.testSubj + .locator('alertsTable') + .locator(`[data-test-subj='euiDataGridBody']`); } async navigate() { - return this.page.gotoApp(PAGE_URL); + await this.page.gotoApp(PAGE_URL); } async expandAlertDetailsFlyout(ruleName: string) { - await this.page.waitForLoadingIndicatorHidden(); - await this.alertsTable.waitFor({ state: 'visible' }); + await this.alertsTableBody.waitFor({ state: 'visible' }); // Filter alert by unique rule name const row = this.alertRow.filter({ hasText: ruleName }); await expect( diff --git a/x-pack/solutions/security/plugins/security_solution/ui_tests/parallel_tests/flyout/alert_details_url_sync.spec.ts b/x-pack/solutions/security/plugins/security_solution/ui_tests/parallel_tests/flyout/alert_details_url_sync.spec.ts index eefaaab2c246b..7a819bd1b6b06 100644 --- a/x-pack/solutions/security/plugins/security_solution/ui_tests/parallel_tests/flyout/alert_details_url_sync.spec.ts +++ b/x-pack/solutions/security/plugins/security_solution/ui_tests/parallel_tests/flyout/alert_details_url_sync.spec.ts @@ -10,7 +10,7 @@ import { CUSTOM_QUERY_RULE } from '@kbn/scout-security/src/playwright/constants/ const RIGHT = 'right'; -spaceTest.describe('Expandable flyout state sync', { tag: ['@ess', '@svlSecurity '] }, () => { +spaceTest.describe('Expandable flyout state sync', { tag: ['@ess', '@svlSecurity'] }, () => { let ruleName: string; spaceTest.beforeEach(async ({ browserAuth, apiServices, scoutSpace }) => { ruleName = `${CUSTOM_QUERY_RULE.name}_${scoutSpace.id}_${Date.now()}`; @@ -28,6 +28,7 @@ spaceTest.describe('Expandable flyout state sync', { tag: ['@ess', '@svlSecurity const urlBeforeAlertDetails = page.url(); expect(urlBeforeAlertDetails).not.toContain(RIGHT); + await pageObjects.alertsTablePage.detectionsAlertsContainer.waitFor({ state: 'visible' }); await pageObjects.alertsTablePage.expandAlertDetailsFlyout(ruleName); const urlAfterAlertDetails = page.url(); @@ -37,7 +38,7 @@ spaceTest.describe('Expandable flyout state sync', { tag: ['@ess', '@svlSecurity await expect(headerTitle).toHaveText(ruleName); await page.reload(); - await page.waitForLoadingIndicatorHidden(); + await pageObjects.alertsTablePage.detectionsAlertsContainer.waitFor({ state: 'visible' }); const urlAfterReload = page.url(); expect(urlAfterReload).toContain(RIGHT);