Skip to content

[Flyout System] Automated functional tests using Scout framework#252171

Merged
tsullivan merged 19 commits intoelastic:mainfrom
tsullivan:scout-testing/flyout-system
Apr 2, 2026
Merged

[Flyout System] Automated functional tests using Scout framework#252171
tsullivan merged 19 commits intoelastic:mainfrom
tsullivan:scout-testing/flyout-system

Conversation

@tsullivan
Copy link
Copy Markdown
Member

@tsullivan tsullivan commented Feb 6, 2026

Summary

Changes

data-test-subj attributes — Added to flyout buttons, switches, and close controls in both the EuiFlyout component and Overlays API implementations to enable reliable test selectors.

Scout UI tests — Two tests covering:

  • Open a main flyout and a child flyout, verify cascade close behavior
  • Open a push flyout, open a second overlay flyout, verify Back button navigation

Minor Flyout System Examples plugin app refactoring

To run locally

node scripts/scout.js start-server \
  --arch stateful \
  --domain classic \
  --serverConfigSet examples

# terminal two: run the tests
npx playwright test --config examples/flyout_system/test/scout_examples/ui/playwright.config.ts \
  --project local \
  --grep @local-stateful-classic \
  --headed

@tsullivan tsullivan requested review from a team as code owners February 6, 2026 19:39
@tsullivan tsullivan added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Feb 6, 2026
@tsullivan tsullivan marked this pull request as draft February 7, 2026 17:17
@tsullivan
Copy link
Copy Markdown
Member Author

changed to draft since the new tests are not running in CI

@dmlemeshko
Copy link
Copy Markdown
Contributor

dmlemeshko commented Feb 9, 2026

@tsullivan We currently don't have automatic discovery for scout tests under examples/ directory, but it is a trivial change. Without discovery tests won't be run automatically in CI, you need to explicitly add a buildkite step in pipeline.

The question is how you would like to run those tests in CI, together with other functional tests or is there any specific goals?

@Dosant
Copy link
Copy Markdown
Contributor

Dosant commented Feb 9, 2026

@tsullivan We currently don't have automatic discovery for scout tests under examples/ directory, but it is a trivial change. Without discovery tests won't be run automatically in CI, you need to explicitly add a buildkite step in pipeline.

The question is how you would like to run those tests in CI, together with other functional tests or is there any specific goals?

@dmlemeshko, similar to the existing example plugin tests, we would like to run these tests as part of the regular CI run. With these tests, we want to make sure that our core and Chrome APIs are stable without relying on testing specific user concerns of the apps that we don't own.

@tsullivan
Copy link
Copy Markdown
Member Author

@dmlemeshko would you be able to help with ensuring this test can run in CI? Would that work have to be separate or can a change be made in this PR that would enable it?

@dmlemeshko
Copy link
Copy Markdown
Contributor

@dmlemeshko would you be able to help with ensuring this test can run in CI? Would that work have to be separate or can a change be made in this PR that would enable it?

We would have to do it in the separate PR, checking details with the Team

@tsullivan tsullivan force-pushed the scout-testing/flyout-system branch from cf72006 to abe3625 Compare February 12, 2026 18:28
@tsullivan
Copy link
Copy Markdown
Member Author

Blocked on https://github.com/elastic/appex-qa-team/issues/708

@tsullivan tsullivan force-pushed the scout-testing/flyout-system branch from abe3625 to 6373eff Compare March 26, 2026 21:32

test.afterAll(() => {
throw new Error(`Test error to verify CI run`);
});
Copy link
Copy Markdown
Member Author

@tsullivan tsullivan Mar 26, 2026

Choose a reason for hiding this comment

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

This will ensure that CI is running Scout tests for example plugins, and is to prove useful after #259170

@tsullivan tsullivan force-pushed the scout-testing/flyout-system branch from bf0379c to c978c85 Compare March 27, 2026 16:57
@tsullivan tsullivan marked this pull request as ready for review March 30, 2026 14:45
@tsullivan tsullivan added the Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// label Mar 30, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@tsullivan tsullivan requested a review from a team as a code owner March 30, 2026 22:27
@tsullivan
Copy link
Copy Markdown
Member Author

I used flyout_system_examples as the plugin name for the Scout config and CI failed with:


Discover Playwright Configs and upload to Buildkite artifacts (selective testing)
--
.peggy require hook already registered, skipping
info Selective testing: 1 affected module(s), 49 rest, 0 unmapped
ERROR The following plugin(s)/package(s) are not registered in Scout CI config '.buildkite/scout_ci_config.yml':
- flyoutSystemExamples (plugin)
Read more: src/platform/packages/shared/kbn-scout/README.md
🚨 Error: The command exited with status 1

Switched to camelCase name (taking from plugin.id) in 31b2cf3

@tsullivan
Copy link
Copy Markdown
Member Author

I wish to wait to merge this until after #259497, because the "scoped history" changes coming in will affect the test flow (we will need to add historyKey to the test flyouts)

@tsullivan
Copy link
Copy Markdown
Member Author

This brings in #260557, to add support for history groups, which functionally changed after Kibana upgraded to EUI 114.

Description from that PR:

Summary

EUI v114 brought changes to the way that flyouts can have a shared history: each flyout needs to share a historyKey object with the flyouts that it wants to share history with.

Screenshots

This PR also cleans up the example page code by putting the "Non-Session" flyouts in their own section, and removing the unnecessary filler text at the bottom.

Before

flyout example update - 01 before

After

flyout example update - 02 after

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout: [ platform / workflows_management ] plugin / local-serverless-security_complete - Workflow execution - Alert triggers - should trigger workflow from alert
  • [job] [logs] FTR Configs #34 / serverless search UI Rule details Edit rule with deleted connector should show and update deleted connectors when there are existing connectors of the same type

Metrics [docs]

✅ unchanged

History

@tsullivan tsullivan merged commit 2d8ebee into elastic:main Apr 2, 2026
20 checks passed
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
…stic#252171)

## Summary

- Closes elastic/kibana-team#2566
- Includes elastic#260557 (for history
group support in the example plugin app)
- [x] Hold until after elastic#259497

### Changes

**`data-test-subj` attributes** — Added to flyout buttons, switches, and
close controls in both the EuiFlyout component and Overlays API
implementations to enable reliable test selectors.

**Scout UI tests** — Two tests covering:
- Open a main flyout and a child flyout, verify cascade close behavior
- Open a push flyout, open a second overlay flyout, verify Back button
navigation

**Minor Flyout System Examples plugin app refactoring**
- See
elastic#252171 (comment)

### To run locally

```bash
node scripts/scout.js start-server \
  --arch stateful \
  --domain classic \
  --serverConfigSet examples

# terminal two: run the tests
npx playwright test --config examples/flyout_system/test/scout_examples/ui/playwright.config.ts \
  --project local \
  --grep @local-stateful-classic \
  --headed
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting blocked release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants