[scout] add 'apiServices' fixture to group Kibana API helpers#214470
[scout] add 'apiServices' fixture to group Kibana API helpers#214470dmlemeshko merged 9 commits intoelastic:mainfrom
Conversation
| #### Adding Fixtures | ||
| #### Adding API service | ||
|
|
||
| 1. **Create a New API serivce:** Add your service to the `src/playwright/fixtures/worker/apis` directory. For instance: |
There was a problem hiding this comment.
Typo: I think we meant to say service here.
x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/fixtures/index.ts
Show resolved
Hide resolved
mykolaharmash
left a comment
There was a problem hiding this comment.
Onboarding changes LGTM ✨
|
Starting backport for target branches: 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13922203847 |
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Public APIs missing exports
Unknown metric groupsAPI count
History
cc @dmlemeshko |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Starting backport for target branches: 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13944285199 |
…c#214470) ## Summary We decided to group `Kibana API helpers` under a single fixture: `apiServices` instead of individual fixtures. It should simplify the search of existing helpers and reduce a risk for Teams to create the same helper like we see today with FTR. Adding just `apiServices` in test context and adding dot will expand a list of all available API helpers + it can be extended for individual solution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no chance to re-use it in other plugins) <img width="699" alt="image" src="https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206" /> Before: ``` test('should create something', async ({ fleetApi, onboardingApi, alertingApi, }) => { await fleetApi.integration.install(integrationName); await onboardingApi.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await alertingApi.waitForAlert(alertId); ``` After: ``` test('should create something', async ({ apiServices, }) => { await apiServices.fleet.integration.install(integrationName); await apiServices.onboarding.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await apiServices.alerting.waitForAlert(alertId); ``` (cherry picked from commit 48cd207)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…214470) (#215123) # Backport This will backport the following commits from `main` to `9.0`: - [[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)](#214470) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-03-18T11:34:25Z","message":"[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)\n\n## Summary\n\nWe decided to group `Kibana API helpers` under a single fixture:\n`apiServices` instead of individual fixtures. It should simplify the\nsearch of existing helpers and reduce a risk for Teams to create the\nsame helper like we see today with FTR.\nAdding just `apiServices` in test context and adding dot will expand a\nlist of all available API helpers + it can be extended for individual\nsolution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no\nchance to re-use it in other plugins)\n\n<img width=\"699\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206\"\n/>\n\n\nBefore:\n\n```\ntest('should create something', async ({\n fleetApi,\n onboardingApi,\n alertingApi,\n }) => {\n await fleetApi.integration.install(integrationName);\n await onboardingApi.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await alertingApi.waitForAlert(alertId);\n```\n\nAfter:\n\n```\ntest('should create something', async ({\n apiServices,\n }) => {\n await apiServices.fleet.integration.install(integrationName);\n await apiServices.onboarding.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await apiServices.alerting.waitForAlert(alertId);\n```","sha":"48cd2075f75386b515e19567095c03a8ca73fe20","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout] add 'apiServices' fixture to group Kibana API helpers","number":214470,"url":"https://github.com/elastic/kibana/pull/214470","mergeCommit":{"message":"[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)\n\n## Summary\n\nWe decided to group `Kibana API helpers` under a single fixture:\n`apiServices` instead of individual fixtures. It should simplify the\nsearch of existing helpers and reduce a risk for Teams to create the\nsame helper like we see today with FTR.\nAdding just `apiServices` in test context and adding dot will expand a\nlist of all available API helpers + it can be extended for individual\nsolution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no\nchance to re-use it in other plugins)\n\n<img width=\"699\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206\"\n/>\n\n\nBefore:\n\n```\ntest('should create something', async ({\n fleetApi,\n onboardingApi,\n alertingApi,\n }) => {\n await fleetApi.integration.install(integrationName);\n await onboardingApi.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await alertingApi.waitForAlert(alertId);\n```\n\nAfter:\n\n```\ntest('should create something', async ({\n apiServices,\n }) => {\n await apiServices.fleet.integration.install(integrationName);\n await apiServices.onboarding.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await apiServices.alerting.waitForAlert(alertId);\n```","sha":"48cd2075f75386b515e19567095c03a8ca73fe20"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214470","number":214470,"mergeCommit":{"message":"[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)\n\n## Summary\n\nWe decided to group `Kibana API helpers` under a single fixture:\n`apiServices` instead of individual fixtures. It should simplify the\nsearch of existing helpers and reduce a risk for Teams to create the\nsame helper like we see today with FTR.\nAdding just `apiServices` in test context and adding dot will expand a\nlist of all available API helpers + it can be extended for individual\nsolution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no\nchance to re-use it in other plugins)\n\n<img width=\"699\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206\"\n/>\n\n\nBefore:\n\n```\ntest('should create something', async ({\n fleetApi,\n onboardingApi,\n alertingApi,\n }) => {\n await fleetApi.integration.install(integrationName);\n await onboardingApi.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await alertingApi.waitForAlert(alertId);\n```\n\nAfter:\n\n```\ntest('should create something', async ({\n apiServices,\n }) => {\n await apiServices.fleet.integration.install(integrationName);\n await apiServices.onboarding.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await apiServices.alerting.waitForAlert(alertId);\n```","sha":"48cd2075f75386b515e19567095c03a8ca73fe20"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
|
Starting backport for target branches: 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/13956834155 |
…c#214470) ## Summary We decided to group `Kibana API helpers` under a single fixture: `apiServices` instead of individual fixtures. It should simplify the search of existing helpers and reduce a risk for Teams to create the same helper like we see today with FTR. Adding just `apiServices` in test context and adding dot will expand a list of all available API helpers + it can be extended for individual solution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no chance to re-use it in other plugins) <img width="699" alt="image" src="https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206" /> Before: ``` test('should create something', async ({ fleetApi, onboardingApi, alertingApi, }) => { await fleetApi.integration.install(integrationName); await onboardingApi.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await alertingApi.waitForAlert(alertId); ``` After: ``` test('should create something', async ({ apiServices, }) => { await apiServices.fleet.integration.install(integrationName); await apiServices.onboarding.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await apiServices.alerting.waitForAlert(alertId); ``` (cherry picked from commit 48cd207)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…214470) (#215249) # Backport This will backport the following commits from `main` to `8.x`: - [[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)](#214470) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-03-18T11:34:25Z","message":"[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)\n\n## Summary\n\nWe decided to group `Kibana API helpers` under a single fixture:\n`apiServices` instead of individual fixtures. It should simplify the\nsearch of existing helpers and reduce a risk for Teams to create the\nsame helper like we see today with FTR.\nAdding just `apiServices` in test context and adding dot will expand a\nlist of all available API helpers + it can be extended for individual\nsolution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no\nchance to re-use it in other plugins)\n\n<img width=\"699\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206\"\n/>\n\n\nBefore:\n\n```\ntest('should create something', async ({\n fleetApi,\n onboardingApi,\n alertingApi,\n }) => {\n await fleetApi.integration.install(integrationName);\n await onboardingApi.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await alertingApi.waitForAlert(alertId);\n```\n\nAfter:\n\n```\ntest('should create something', async ({\n apiServices,\n }) => {\n await apiServices.fleet.integration.install(integrationName);\n await apiServices.onboarding.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await apiServices.alerting.waitForAlert(alertId);\n```","sha":"48cd2075f75386b515e19567095c03a8ca73fe20","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout] add 'apiServices' fixture to group Kibana API helpers","number":214470,"url":"https://github.com/elastic/kibana/pull/214470","mergeCommit":{"message":"[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)\n\n## Summary\n\nWe decided to group `Kibana API helpers` under a single fixture:\n`apiServices` instead of individual fixtures. It should simplify the\nsearch of existing helpers and reduce a risk for Teams to create the\nsame helper like we see today with FTR.\nAdding just `apiServices` in test context and adding dot will expand a\nlist of all available API helpers + it can be extended for individual\nsolution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no\nchance to re-use it in other plugins)\n\n<img width=\"699\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206\"\n/>\n\n\nBefore:\n\n```\ntest('should create something', async ({\n fleetApi,\n onboardingApi,\n alertingApi,\n }) => {\n await fleetApi.integration.install(integrationName);\n await onboardingApi.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await alertingApi.waitForAlert(alertId);\n```\n\nAfter:\n\n```\ntest('should create something', async ({\n apiServices,\n }) => {\n await apiServices.fleet.integration.install(integrationName);\n await apiServices.onboarding.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await apiServices.alerting.waitForAlert(alertId);\n```","sha":"48cd2075f75386b515e19567095c03a8ca73fe20"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/215123","number":215123,"state":"MERGED","mergeCommit":{"sha":"35100fdb73cab45d355a79a9b04605371397eb7a","message":"[9.0] [scout] add 'apiServices' fixture to group Kibana API helpers (#214470) (#215123)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[scout] add 'apiServices' fixture to group Kibana API helpers\n(#214470)](https://github.com/elastic/kibana/pull/214470)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/214470","number":214470,"mergeCommit":{"message":"[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)\n\n## Summary\n\nWe decided to group `Kibana API helpers` under a single fixture:\n`apiServices` instead of individual fixtures. It should simplify the\nsearch of existing helpers and reduce a risk for Teams to create the\nsame helper like we see today with FTR.\nAdding just `apiServices` in test context and adding dot will expand a\nlist of all available API helpers + it can be extended for individual\nsolution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no\nchance to re-use it in other plugins)\n\n<img width=\"699\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206\"\n/>\n\n\nBefore:\n\n```\ntest('should create something', async ({\n fleetApi,\n onboardingApi,\n alertingApi,\n }) => {\n await fleetApi.integration.install(integrationName);\n await onboardingApi.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await alertingApi.waitForAlert(alertId);\n```\n\nAfter:\n\n```\ntest('should create something', async ({\n apiServices,\n }) => {\n await apiServices.fleet.integration.install(integrationName);\n await apiServices.onboarding.updateInstallationStepStatus(\n onboardingId,\n 'ea-download',\n 'complete'\n );\n await apiServices.alerting.waitForAlert(alertId);\n```","sha":"48cd2075f75386b515e19567095c03a8ca73fe20"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
…c#214470) ## Summary We decided to group `Kibana API helpers` under a single fixture: `apiServices` instead of individual fixtures. It should simplify the search of existing helpers and reduce a risk for Teams to create the same helper like we see today with FTR. Adding just `apiServices` in test context and adding dot will expand a list of all available API helpers + it can be extended for individual solution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no chance to re-use it in other plugins) <img width="699" alt="image" src="https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206" /> Before: ``` test('should create something', async ({ fleetApi, onboardingApi, alertingApi, }) => { await fleetApi.integration.install(integrationName); await onboardingApi.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await alertingApi.waitForAlert(alertId); ``` After: ``` test('should create something', async ({ apiServices, }) => { await apiServices.fleet.integration.install(integrationName); await apiServices.onboarding.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await apiServices.alerting.waitForAlert(alertId); ```
…c#214470) ## Summary We decided to group `Kibana API helpers` under a single fixture: `apiServices` instead of individual fixtures. It should simplify the search of existing helpers and reduce a risk for Teams to create the same helper like we see today with FTR. Adding just `apiServices` in test context and adding dot will expand a list of all available API helpers + it can be extended for individual solution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no chance to re-use it in other plugins) <img width="699" alt="image" src="https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206" /> Before: ``` test('should create something', async ({ fleetApi, onboardingApi, alertingApi, }) => { await fleetApi.integration.install(integrationName); await onboardingApi.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await alertingApi.waitForAlert(alertId); ``` After: ``` test('should create something', async ({ apiServices, }) => { await apiServices.fleet.integration.install(integrationName); await apiServices.onboarding.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await apiServices.alerting.waitForAlert(alertId); ```
…c#214470) ## Summary We decided to group `Kibana API helpers` under a single fixture: `apiServices` instead of individual fixtures. It should simplify the search of existing helpers and reduce a risk for Teams to create the same helper like we see today with FTR. Adding just `apiServices` in test context and adding dot will expand a list of all available API helpers + it can be extended for individual solution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no chance to re-use it in other plugins) <img width="699" alt="image" src="https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206" /> Before: ``` test('should create something', async ({ fleetApi, onboardingApi, alertingApi, }) => { await fleetApi.integration.install(integrationName); await onboardingApi.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await alertingApi.waitForAlert(alertId); ``` After: ``` test('should create something', async ({ apiServices, }) => { await apiServices.fleet.integration.install(integrationName); await apiServices.onboarding.updateInstallationStepStatus( onboardingId, 'ea-download', 'complete' ); await apiServices.alerting.waitForAlert(alertId); ```
Summary
We decided to group
Kibana API helpersunder a single fixture:apiServicesinstead of individual fixtures. It should simplify the search of existing helpers and reduce a risk for Teams to create the same helper like we see today with FTR.Adding just
apiServicesin test context and adding dot will expand a list of all available API helpers + it can be extended for individual solution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no chance to re-use it in other plugins)Before:
After: