Skip to content

[8.19] [@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API expect (#250772)#250881

Merged
steliosmavro merged 6 commits intoelastic:8.19from
steliosmavro:backport/8.19/pr-250772
Jan 30, 2026
Merged

[8.19] [@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API expect (#250772)#250881
steliosmavro merged 6 commits intoelastic:8.19from
steliosmavro:backport/8.19/pr-250772

Conversation

@steliosmavro
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

… API `expect` (elastic#250772)

## Summary

Updates Solutions API tests to use the dedicated API `expect` from
`@kbn/scout/api` and adds an ESLint rule to enforce correct import
paths.

### Changes

- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and
`@kbn/scout-security` packages
- Updated solutions API tests to import `expect` from
`@kbn/scout-oblt/api`
- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit
`toBe(true)`/`toBe(false)`
- Refactored stack trace handling to use native
`Error.captureStackTrace` instead of manually filtering stack lines
- Added ESLint rule `scout_expect_import` to validate `expect` imports
based on test type (api/ui)

(cherry picked from commit 96d91d8)

# Conflicts:
#	.eslintrc.js
#	x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_no_setup.spec.ts
#	x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_apm_not_installed.spec.ts
#	x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_with_data.spec.ts
#	x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_with_integrations.spec.ts
@steliosmavro steliosmavro self-assigned this Jan 30, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 3.7MB 3.7MB -129.0B

History

cc @steliosmavro

@steliosmavro steliosmavro merged commit 51e5f7d into elastic:8.19 Jan 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants