Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Data Usage] functional tests #203166

Merged
merged 9 commits into from
Dec 12, 2024

Conversation

neptunian
Copy link
Contributor

@neptunian neptunian commented Dec 5, 2024

Summary

Functional tests for data usage UI.

  • data_streams route is intercepted, due to filtering out zero size data streams which will happen because metering api needs time to aggregate data
  • autoops_api is using the mock server as there will be no data for it to return
  • tests will only run in local serverless and not MKI due to using the autoops mock server that won't return data for created data streams
  • adds interceptRequest functionality to FTR browser service

Tests

  • data stream filter dropdown renders with created data streams of data_streams response and are checked
  • data stream filter dropdown renders badge with correct number of selected data streams
  • charts render from data_streams route response
  • chart legends render with correct items
  • popover renders for legend items
  • links in popovers correctly navigate and update navigation between different data stream items

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7556

[✅] x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts: 25/25 tests passed.

see run history

@neptunian neptunian added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Dec 5, 2024
@neptunian neptunian force-pushed the functional-tests-data-usage branch from 70c97a0 to 3587b10 Compare December 6, 2024 20:15
@neptunian neptunian changed the title add functional tests for data streams dropdown [Data Usage] functional tests Dec 6, 2024
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7564

[✅] x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts: 25/25 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7567

[✅] x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts: 25/25 tests passed.

see run history

@neptunian neptunian marked this pull request as ready for review December 9, 2024 17:48
@neptunian neptunian requested review from a team as code owners December 9, 2024 17:48
Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

x-pack/test_serverless/functional/page_objects/index.ts changes LGTM. Left a question about interceptRequest

@neptunian neptunian requested a review from dmlemeshko December 10, 2024 21:17
Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for browser service update, I know other Teams were asking about requests interception.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #89 / Entity Manager _search API includes source and additional metadata fields

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/ftr-common-functional-ui-services 520 524 +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dataUsage 241.8KB 242.1KB +255.0B
Unknown metric groups

API count

id before after diff
@kbn/ftr-common-functional-ui-services 560 564 +4

History

@neptunian neptunian merged commit ba945c9 into elastic:main Dec 12, 2024
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12297060297

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 12, 2024
## Summary

Functional tests for data usage UI.

- `data_streams` route is intercepted, due to filtering out zero size
data streams which will happen because metering api needs time to
aggregate data
- `autoops_api` is using the mock server as there will be no data for it
to return
- tests will only run in local serverless and not MKI due to using the
autoops mock server that won't return data for created data streams
- adds `interceptRequest` functionality to FTR `browser` service

## Tests
- data stream filter dropdown renders with created data streams of
`data_streams` response and are checked
- data stream filter dropdown renders badge with correct number of
selected data streams
- charts render from `data_streams` route response
- chart legends render with correct items
- popover renders for legend items
- links in popovers correctly navigate and update navigation between
different data stream items

(cherry picked from commit ba945c9)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 12, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Data Usage] functional tests
(#203166)](#203166)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sandra
G","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-12T13:08:08Z","message":"[Data
Usage] functional tests (#203166)\n\n## Summary\r\n\r\nFunctional tests
for data usage UI.\r\n\r\n- `data_streams` route is intercepted, due to
filtering out zero size\r\ndata streams which will happen because
metering api needs time to\r\naggregate data\r\n- `autoops_api` is using
the mock server as there will be no data for it\r\nto return\r\n- tests
will only run in local serverless and not MKI due to using
the\r\nautoops mock server that won't return data for created data
streams\r\n- adds `interceptRequest` functionality to FTR `browser`
service\r\n\r\n## Tests\r\n- data stream filter dropdown renders with
created data streams of\r\n`data_streams` response and are checked\r\n-
data stream filter dropdown renders badge with correct number
of\r\nselected data streams\r\n- charts render from `data_streams` route
response\r\n- chart legends render with correct items\r\n- popover
renders for legend items\r\n- links in popovers correctly navigate and
update navigation between\r\ndifferent data stream
items","sha":"ba945c98510dc6de460b297beaa55e980456fc30","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor"],"title":"[Data
Usage] functional
tests","number":203166,"url":"https://github.com/elastic/kibana/pull/203166","mergeCommit":{"message":"[Data
Usage] functional tests (#203166)\n\n## Summary\r\n\r\nFunctional tests
for data usage UI.\r\n\r\n- `data_streams` route is intercepted, due to
filtering out zero size\r\ndata streams which will happen because
metering api needs time to\r\naggregate data\r\n- `autoops_api` is using
the mock server as there will be no data for it\r\nto return\r\n- tests
will only run in local serverless and not MKI due to using
the\r\nautoops mock server that won't return data for created data
streams\r\n- adds `interceptRequest` functionality to FTR `browser`
service\r\n\r\n## Tests\r\n- data stream filter dropdown renders with
created data streams of\r\n`data_streams` response and are checked\r\n-
data stream filter dropdown renders badge with correct number
of\r\nselected data streams\r\n- charts render from `data_streams` route
response\r\n- chart legends render with correct items\r\n- popover
renders for legend items\r\n- links in popovers correctly navigate and
update navigation between\r\ndifferent data stream
items","sha":"ba945c98510dc6de460b297beaa55e980456fc30"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203166","number":203166,"mergeCommit":{"message":"[Data
Usage] functional tests (#203166)\n\n## Summary\r\n\r\nFunctional tests
for data usage UI.\r\n\r\n- `data_streams` route is intercepted, due to
filtering out zero size\r\ndata streams which will happen because
metering api needs time to\r\naggregate data\r\n- `autoops_api` is using
the mock server as there will be no data for it\r\nto return\r\n- tests
will only run in local serverless and not MKI due to using
the\r\nautoops mock server that won't return data for created data
streams\r\n- adds `interceptRequest` functionality to FTR `browser`
service\r\n\r\n## Tests\r\n- data stream filter dropdown renders with
created data streams of\r\n`data_streams` response and are checked\r\n-
data stream filter dropdown renders badge with correct number
of\r\nselected data streams\r\n- charts render from `data_streams` route
response\r\n- chart legends render with correct items\r\n- popover
renders for legend items\r\n- links in popovers correctly navigate and
update navigation between\r\ndifferent data stream
items","sha":"ba945c98510dc6de460b297beaa55e980456fc30"}}]}] BACKPORT-->

Co-authored-by: Sandra G <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants