From 2383eba09017b19cf80e3fcf7f7a11c305640c2f Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:43:25 +0200 Subject: [PATCH] [8.15] [DOCS][Cases] Automate more screenshots for cases (#188697) (#188982) # Backport This will backport the following commits from `main` to `8.15`: - [[DOCS][Cases] Automate more screenshots for cases (#188697)](https://github.com/elastic/kibana/pull/188697) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Lisa Cawley --- .../observability_cases/custom_fields.ts | 8 +------- .../response_ops_docs/observability_cases/list_view.ts | 6 ------ .../response_ops_docs/cases/settings.ts | 9 +++++++++ .../response_ops_docs/cases/settings.ts | 9 +++++++++ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/custom_fields.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/custom_fields.ts index ca49737909fe9..e5ed68d8da64a 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/custom_fields.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/custom_fields.ts @@ -19,7 +19,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await cases.navigation.navigateToApp('observability/cases', 'cases-all-title'); await pageObjects.header.waitUntilLoadingHasFinished(); await testSubjects.click('configure-case-button'); - await commonScreenshots.takeScreenshot('cases-settings', screenshotDirectories); await testSubjects.click('add-custom-field'); await commonScreenshots.takeScreenshot( 'cases-add-custom-field', @@ -29,12 +28,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { ); await testSubjects.setValue('custom-field-label-input', 'my-field'); await testSubjects.click('common-flyout-save'); - await commonScreenshots.takeScreenshot( - 'cases-custom-field-settings', - screenshotDirectories, - 1400, - 1024 - ); + await commonScreenshots.takeScreenshot('cases-settings', screenshotDirectories, 1400, 1024); }); }); } diff --git a/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/list_view.ts b/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/list_view.ts index e156ef4fbfa30..309c17f6ee498 100644 --- a/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/list_view.ts +++ b/x-pack/test/screenshot_creation/apps/response_ops_docs/observability_cases/list_view.ts @@ -96,11 +96,5 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { 1024 ); }); - - it('case settings screenshot', async () => { - await cases.navigation.navigateToApp('observability/cases', 'cases-all-title'); - await testSubjects.click('configure-case-button'); - await commonScreenshots.takeScreenshot('add-case-connector', screenshotDirectories); - }); }); } diff --git a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/settings.ts b/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/settings.ts index 2a29ecc84d41d..03145cba04eaf 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/settings.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs/cases/settings.ts @@ -24,6 +24,15 @@ export default function ({ getPageObject, getPageObjects, getService }: FtrProvi it('case settings screenshots', async () => { await navigateToCasesApp(getPageObject, getService, owner); await testSubjects.click('configure-case-button'); + await testSubjects.click('add-custom-field'); + await svlCommonScreenshots.takeScreenshot( + 'observability-cases-custom-fields', + screenshotDirectories, + 1400, + 700 + ); + await testSubjects.setValue('custom-field-label-input', 'my-field'); + await testSubjects.click('common-flyout-save'); await svlCommonScreenshots.takeScreenshot( 'observability-cases-settings', screenshotDirectories diff --git a/x-pack/test_serverless/functional/test_suites/security/screenshot_creation/response_ops_docs/cases/settings.ts b/x-pack/test_serverless/functional/test_suites/security/screenshot_creation/response_ops_docs/cases/settings.ts index e6bf2b9b4d4e4..a64fcb0045272 100644 --- a/x-pack/test_serverless/functional/test_suites/security/screenshot_creation/response_ops_docs/cases/settings.ts +++ b/x-pack/test_serverless/functional/test_suites/security/screenshot_creation/response_ops_docs/cases/settings.ts @@ -30,6 +30,15 @@ export default function ({ getPageObject, getPageObjects, getService }: FtrProvi await navigateToCasesApp(getPageObject, getService, owner); await testSubjects.click('configure-case-button'); await pageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.click('add-custom-field'); + await svlCommonScreenshots.takeScreenshot( + 'security-cases-custom-fields', + screenshotDirectories, + 1400, + 700 + ); + await testSubjects.setValue('custom-field-label-input', 'my-field'); + await testSubjects.click('common-flyout-save'); await svlCommonScreenshots.takeScreenshot('security-cases-settings', screenshotDirectories); await testSubjects.click('add-template'); await svlCommonScreenshots.takeScreenshot(