Skip to content

[@kbn/dashboard-plugin] Migrate Dashboard's CRUD API tests from FTR to Scout#251163

Merged
steliosmavro merged 30 commits intoelastic:mainfrom
steliosmavro:scout-migration-dashboard-crud-api
Feb 7, 2026
Merged

[@kbn/dashboard-plugin] Migrate Dashboard's CRUD API tests from FTR to Scout#251163
steliosmavro merged 30 commits intoelastic:mainfrom
steliosmavro:scout-migration-dashboard-crud-api

Conversation

@steliosmavro
Copy link
Copy Markdown
Contributor

@steliosmavro steliosmavro commented Jan 31, 2026

Summary

Migrates the Dashboard plugin's CRUD API integration tests from FTR to the Scout framework. All 19 test cases have been successfully migrated with full coverage parity, using least-privileged roles (viewer for read operations, editor for write operations) and the new expect import from @kbn/scout/api.

  • Migrated tests for: create, get, update, delete, and search dashboard endpoints
  • Added OAS schema validation test (enabled server.oas.enabled=true in Scout base config)
  • Used appropriate roles: viewer for GET/search tests, editor for POST/PUT/DELETE tests
  • Organized test fixtures in dedicated fixtures/ directory with shared constants and archives
  • Removed FTR tests from src/platform/test/api_integration/apis/dashboards/
  • Added dashboard to .buildkite/scout_ci_config.yml
  • Updated .github/CODEOWNERS to remove old FTR test path
  • All 19 tests passing with ESLint and TypeScript checks clean

@steliosmavro steliosmavro self-assigned this Jan 31, 2026
@steliosmavro steliosmavro added the release_note:skip Skip the PR/issue when compiling release notes label Jan 31, 2026
@steliosmavro steliosmavro requested a review from a team as a code owner January 31, 2026 08:18
@steliosmavro steliosmavro added the backport:all-open Backport to all branches that could still receive a release label Jan 31, 2026
@steliosmavro steliosmavro requested a review from a team as a code owner January 31, 2026 08:18
@steliosmavro steliosmavro changed the title Scout migration dashboard crud api [@kbn/dashboard-plugin] Migrate Dashboard's CRUD API tests from FTR to Scout Jan 31, 2026
@csr csr self-requested a review February 2, 2026 08:19
Comment on lines +173 to +174
// Enable OpenAPI specification endpoint for schema validation tests
'--server.oas.enabled=true',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to check if the tests are working against ECH, and if not - move this argument to custom servers config and run only in local CI env. @steliosmavro could you create 9.4-snapshot deployment and run the new tests?

Comment on lines +135 to +136
expect(response).toHaveStatusCode(400);
expect(response.body.statusCode).toBe(400);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't it a duplicated check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried keeping it the same as it was to be secure, but I think you are right - we shouldn't check body.statusCode again if we've already checked response.

Unless @elastic/kibana-presentation has a good reason for this, I’ll proceed updating this and the other occurrences of the same pattern. 👍

Comment on lines +157 to +158
expect(response).toHaveStatusCode(400);
expect(response.body.statusCode).toBe(400);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't it a duplicated check?

Comment on lines +42 to +46
expect(response).toHaveStatusCode(404);
expect(response.body).toStrictEqual({
statusCode: 404,
error: 'Not Found',
message: 'A dashboard with ID non-existent-dashboard was not found.',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can drop one of status code checks?

Comment on lines +41 to +42
expect(response.body.dashboards[0].id).toBe('test-dashboard-00');
expect(response.body.dashboards).toHaveLength(20);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we probably want to change order of check to validate dashboards .length before unwrapping the first item

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, I'll update accordingly!

Comment on lines +67 to +69
expect(response).toHaveStatusCode(404);
expect(response.body).toStrictEqual({
statusCode: 404,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

identical check, one to drop?

Comment on lines +87 to +88
expect(response).toHaveStatusCode(400);
expect(response.body.statusCode).toBe(400);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here, one to drop?

Comment on lines +109 to +110
expect(response).toHaveStatusCode(400);
expect(response.body.statusCode).toBe(400);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

here as well

Comment on lines +19 to +27
apiTest.beforeAll(async ({ kbnClient, requestAuth }) => {
viewerCredentials = await requestAuth.getApiKey('viewer');
await kbnClient.importExport.load(KBN_ARCHIVES.BASIC);
await kbnClient.importExport.load(KBN_ARCHIVES.TAGS);
});

apiTest.afterAll(async ({ kbnClient }) => {
await kbnClient.savedObjects.cleanStandardList();
});
Copy link
Copy Markdown
Member

@csr csr Feb 2, 2026

Choose a reason for hiding this comment

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

I don't think ingesting the Kibana archives is useful for the purposes of this test, is it?

We can remove kbnClient.importExport.load and kbnClient.savedObjects.cleanStandardList() calls (as there will be nothing to clean up):

Suggested change
apiTest.beforeAll(async ({ kbnClient, requestAuth }) => {
viewerCredentials = await requestAuth.getApiKey('viewer');
await kbnClient.importExport.load(KBN_ARCHIVES.BASIC);
await kbnClient.importExport.load(KBN_ARCHIVES.TAGS);
});
apiTest.afterAll(async ({ kbnClient }) => {
await kbnClient.savedObjects.cleanStandardList();
});
apiTest.beforeAll(async ({ kbnClient, requestAuth }) => {
viewerCredentials = await requestAuth.getApiKey('viewer');
});

Copy link
Copy Markdown
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Changes LGTM! Seems like a direct port mostly. Looked through the code and made sure all the tests made it through the conversion. Thank you for tackling this!

@steliosmavro steliosmavro merged commit 17fdeed into elastic:main Feb 7, 2026
16 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.2 Backport failed because of merge conflicts
9.3 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.3:
- [FTR to Scout] Migrate x-pack dashboard group2 tests (#249233)
- [scout] discover tests with custom server configs (#251297)

Manual backport

To create the backport manually run:

node scripts/backport --pr 251163

Questions ?

Please refer to the Backport tool documentation

steliosmavro added a commit to steliosmavro/kibana that referenced this pull request Feb 7, 2026
…o Scout (elastic#251163)

## Summary

Migrates the Dashboard plugin's CRUD API integration tests from FTR to
the Scout framework. All 19 test cases have been successfully migrated
with full coverage parity, using least-privileged roles (`viewer` for
read operations, `editor` for write operations) and the new `expect`
import from `@kbn/scout/api`.

- Migrated tests for: create, get, update, delete, and search dashboard
endpoints
- Added OAS schema validation test (enabled `server.oas.enabled=true` in
Scout base config)
- Used appropriate roles: `viewer` for GET/search tests, `editor` for
POST/PUT/DELETE tests
- Organized test fixtures in dedicated `fixtures/` directory with shared
constants and archives
- Removed FTR tests from
`src/platform/test/api_integration/apis/dashboards/`
- Added `dashboard` to `.buildkite/scout_ci_config.yml`
- Updated `.github/CODEOWNERS` to remove old FTR test path
- All 19 tests passing with ESLint and TypeScript checks clean

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 17fdeed)

# Conflicts:
#	.buildkite/scout_ci_config.yml
#	src/platform/plugins/shared/dashboard/moon.yml
#	src/platform/plugins/shared/dashboard/tsconfig.json
steliosmavro added a commit to steliosmavro/kibana that referenced this pull request Feb 7, 2026
…o Scout (elastic#251163)

## Summary

Migrates the Dashboard plugin's CRUD API integration tests from FTR to
the Scout framework. All 19 test cases have been successfully migrated
with full coverage parity, using least-privileged roles (`viewer` for
read operations, `editor` for write operations) and the new `expect`
import from `@kbn/scout/api`.

- Migrated tests for: create, get, update, delete, and search dashboard
endpoints
- Added OAS schema validation test (enabled `server.oas.enabled=true` in
Scout base config)
- Used appropriate roles: `viewer` for GET/search tests, `editor` for
POST/PUT/DELETE tests
- Organized test fixtures in dedicated `fixtures/` directory with shared
constants and archives
- Removed FTR tests from
`src/platform/test/api_integration/apis/dashboards/`
- Added `dashboard` to `.buildkite/scout_ci_config.yml`
- Updated `.github/CODEOWNERS` to remove old FTR test path
- All 19 tests passing with ESLint and TypeScript checks clean

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 17fdeed)

# Conflicts:
#	.buildkite/scout_ci_config.yml
#	src/platform/plugins/shared/dashboard/moon.yml
#	src/platform/plugins/shared/dashboard/test/scout/api/fixtures/index.ts
#	src/platform/plugins/shared/dashboard/test/scout_oas_schema/api/fixtures/schema_snapshot.json
#	src/platform/plugins/shared/dashboard/tsconfig.json
#	src/platform/test/api_integration/apis/dashboards/create_dashboard/index.ts
#	src/platform/test/api_integration/apis/dashboards/create_dashboard/main.ts
#	src/platform/test/api_integration/apis/dashboards/create_dashboard/validation.ts
#	src/platform/test/api_integration/apis/dashboards/delete_dashboard/main.ts
#	src/platform/test/api_integration/apis/dashboards/get_dashboard/main.ts
#	src/platform/test/api_integration/apis/dashboards/list_dashboards/index.ts
#	src/platform/test/api_integration/apis/dashboards/list_dashboards/main.ts
#	src/platform/test/api_integration/apis/dashboards/update_dashboard/main.ts
#	src/platform/test/api_integration/apis/dashboards/update_dashboard/validation.ts
steliosmavro added a commit to steliosmavro/kibana that referenced this pull request Feb 7, 2026
…o Scout (elastic#251163)

## Summary

Migrates the Dashboard plugin's CRUD API integration tests from FTR to
the Scout framework. All 19 test cases have been successfully migrated
with full coverage parity, using least-privileged roles (`viewer` for
read operations, `editor` for write operations) and the new `expect`
import from `@kbn/scout/api`.

- Migrated tests for: create, get, update, delete, and search dashboard
endpoints
- Added OAS schema validation test (enabled `server.oas.enabled=true` in
Scout base config)
- Used appropriate roles: `viewer` for GET/search tests, `editor` for
POST/PUT/DELETE tests
- Organized test fixtures in dedicated `fixtures/` directory with shared
constants and archives
- Removed FTR tests from
`src/platform/test/api_integration/apis/dashboards/`
- Added `dashboard` to `.buildkite/scout_ci_config.yml`
- Updated `.github/CODEOWNERS` to remove old FTR test path
- All 19 tests passing with ESLint and TypeScript checks clean

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 17fdeed)

# Conflicts:
#	.buildkite/scout_ci_config.yml
#	.github/CODEOWNERS
#	src/platform/plugins/shared/dashboard/moon.yml
#	src/platform/plugins/shared/dashboard/test/scout/api/fixtures/index.ts
#	src/platform/plugins/shared/dashboard/test/scout_oas_schema/api/fixtures/schema_snapshot.json
#	src/platform/plugins/shared/dashboard/tsconfig.json
#	src/platform/test/api_integration/apis/dashboards/create_dashboard/index.ts
#	src/platform/test/api_integration/apis/dashboards/create_dashboard/main.ts
#	src/platform/test/api_integration/apis/dashboards/create_dashboard/validation.ts
#	src/platform/test/api_integration/apis/dashboards/delete_dashboard/index.ts
#	src/platform/test/api_integration/apis/dashboards/delete_dashboard/main.ts
#	src/platform/test/api_integration/apis/dashboards/get_dashboard/index.ts
#	src/platform/test/api_integration/apis/dashboards/get_dashboard/main.ts
#	src/platform/test/api_integration/apis/dashboards/list_dashboards/index.ts
#	src/platform/test/api_integration/apis/dashboards/list_dashboards/main.ts
#	src/platform/test/api_integration/apis/dashboards/update_dashboard/index.ts
#	src/platform/test/api_integration/apis/dashboards/update_dashboard/main.ts
#	src/platform/test/api_integration/apis/dashboards/update_dashboard/validation.ts
@steliosmavro
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.3
9.2
8.19

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

Questions ?

Please refer to the Backport tool documentation

steliosmavro added a commit that referenced this pull request Feb 9, 2026
…m FTR to Scout (#251163) (#252206)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[@kbn/dashboard-plugin] Migrate Dashboard's CRUD API tests from FTR
to Scout (#251163)](#251163)

<!--- Backport version: 10.2.0 -->

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

<!--BACKPORT [{"author":{"name":"Stelios
Mavro","email":"81311181+steliosmavro@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-02-07T17:25:57Z","message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to
Scout","number":251163,"url":"https://github.com/elastic/kibana/pull/251163","mergeCommit":{"message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251163","number":251163,"mergeCommit":{"message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324"}}]}]
BACKPORT-->
steliosmavro added a commit that referenced this pull request Feb 9, 2026
… FTR to Scout (#251163) (#252205)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[@kbn/dashboard-plugin] Migrate Dashboard's CRUD API tests from FTR
to Scout (#251163)](#251163)

<!--- Backport version: 10.2.0 -->

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

<!--BACKPORT [{"author":{"name":"Stelios
Mavro","email":"81311181+steliosmavro@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-02-07T17:25:57Z","message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to
Scout","number":251163,"url":"https://github.com/elastic/kibana/pull/251163","mergeCommit":{"message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251163","number":251163,"mergeCommit":{"message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324"}}]}]
BACKPORT-->
steliosmavro added a commit that referenced this pull request Feb 9, 2026
… FTR to Scout (#251163) (#252203)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[@kbn/dashboard-plugin] Migrate Dashboard's CRUD API tests from FTR
to Scout (#251163)](#251163)

<!--- Backport version: 10.2.0 -->

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

<!--BACKPORT [{"author":{"name":"Stelios
Mavro","email":"81311181+steliosmavro@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-02-07T17:25:57Z","message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to
Scout","number":251163,"url":"https://github.com/elastic/kibana/pull/251163","mergeCommit":{"message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251163","number":251163,"mergeCommit":{"message":"[@kbn/dashboard-plugin]
Migrate Dashboard's CRUD API tests from FTR to Scout (#251163)\n\n##
Summary\n\nMigrates the Dashboard plugin's CRUD API integration tests
from FTR to\nthe Scout framework. All 19 test cases have been
successfully migrated\nwith full coverage parity, using least-privileged
roles (`viewer` for\nread operations, `editor` for write operations) and
the new `expect`\nimport from `@kbn/scout/api`.\n\n- Migrated tests for:
create, get, update, delete, and search dashboard\nendpoints\n- Added
OAS schema validation test (enabled `server.oas.enabled=true` in\nScout
base config)\n- Used appropriate roles: `viewer` for GET/search tests,
`editor` for\nPOST/PUT/DELETE tests\n- Organized test fixtures in
dedicated `fixtures/` directory with shared\nconstants and archives\n-
Removed FTR tests
from\n`src/platform/test/api_integration/apis/dashboards/`\n- Added
`dashboard` to `.buildkite/scout_ci_config.yml`\n- Updated
`.github/CODEOWNERS` to remove old FTR test path\n- All 19 tests passing
with ESLint and TypeScript checks clean\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17fdeed1d2406dde0edfc3097658700a9a3ef324"}}]}]
BACKPORT-->
csr added a commit that referenced this pull request Feb 17, 2026
…nd deployment agnostic tags (#253413)

We introduced the `requestAuth.getApiKeyForPrivilegedUser()` API-key
based authentication method via
#252095. We now update some of the
test suites introduced via #251163
to use the new method. We update the tags so that these tests are marked
to run in more testing environments, not just stateful.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 17, 2026
…nd deployment agnostic tags (elastic#253413)

We introduced the `requestAuth.getApiKeyForPrivilegedUser()` API-key
based authentication method via
elastic#252095. We now update some of the
test suites introduced via elastic#251163
to use the new method. We update the tags so that these tests are marked
to run in more testing environments, not just stateful.

(cherry picked from commit 6636fb6)
csr added a commit to csr/kibana that referenced this pull request Feb 17, 2026
…nd deployment agnostic tags (elastic#253413)

We introduced the `requestAuth.getApiKeyForPrivilegedUser()` API-key
based authentication method via
elastic#252095. We now update some of the
test suites introduced via elastic#251163
to use the new method. We update the tags so that these tests are marked
to run in more testing environments, not just stateful.

(cherry picked from commit 6636fb6)

# Conflicts:
#	src/platform/plugins/shared/dashboard/test/scout/api/tests/update_dashboard.spec.ts
csr added a commit to csr/kibana that referenced this pull request Feb 17, 2026
…nd deployment agnostic tags (elastic#253413)

We introduced the `requestAuth.getApiKeyForPrivilegedUser()` API-key
based authentication method via
elastic#252095. We now update some of the
test suites introduced via elastic#251163
to use the new method. We update the tags so that these tests are marked
to run in more testing environments, not just stateful.

(cherry picked from commit 6636fb6)

# Conflicts:
#	src/platform/plugins/shared/dashboard/test/scout/api/tests/update_dashboard.spec.ts
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Feb 17, 2026
…nd deployment agnostic tags (elastic#253413)

We introduced the `requestAuth.getApiKeyForPrivilegedUser()` API-key
based authentication method via
elastic#252095. We now update some of the
test suites introduced via elastic#251163
to use the new method. We update the tags so that these tests are marked
to run in more testing environments, not just stateful.
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request Feb 19, 2026
…nd deployment agnostic tags (elastic#253413)

We introduced the `requestAuth.getApiKeyForPrivilegedUser()` API-key
based authentication method via
elastic#252095. We now update some of the
test suites introduced via elastic#251163
to use the new method. We update the tags so that these tests are marked
to run in more testing environments, not just stateful.
ersin-erdal pushed a commit to ersin-erdal/kibana that referenced this pull request Feb 19, 2026
…nd deployment agnostic tags (elastic#253413)

We introduced the `requestAuth.getApiKeyForPrivilegedUser()` API-key
based authentication method via
elastic#252095. We now update some of the
test suites introduced via elastic#251163
to use the new method. We update the tags so that these tests are marked
to run in more testing environments, not just stateful.
cqliu1 added a commit that referenced this pull request Feb 22, 2026
## Summary

Closes #250439.
Blocked by #251163

This removes `spaces` from the create request body which is already
passed in as part of the URL and removes the nesting under the `data`
property in the request body. This also moves the optional `id` from the
create request body to a URL param, e.g. `/api/dashboards/{id}`.

Examples:

Create request:
```
POST /api/dashboards
{
  "title": "my empty dashboard"
  "description": "this is my description"
  // other dashboard attributes
}
```

```
POST /api/dashboards/{id}
{
  "title": "my empty dashboard"
  "description": "this is my description"
  // other dashboard attributes
}
```

Update request:
```
PUT /api/dashboards/:id
{
  "title": "my updated dashboard"
  "description": "this is my updated description"
  // other dashboard attributes
}
```

Create in a non-default space request:
```
POST /s/my-space/api/dashboards/id?
{
  "title": "my empty dashboard"
  "description": "this is my description"
  // other dashboard attributes
}
```

Update in a non-default space request:
```
PUT /s/my-space/api/dashboards/:id
{
  "title": "my updated dashboard"
  "description": "this is my updated description"
  // other dashboard attributes
}
```

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release release_note:skip Skip the PR/issue when compiling release notes test:scout v8.19.12 v9.2.6 v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants