From a9cf2a83052ddba6ad85e1ba5bb5ba788a434e1e Mon Sep 17 00:00:00 2001 From: animehart Date: Fri, 21 Jun 2024 11:02:49 -0700 Subject: [PATCH 1/8] update test version --- x-pack/plugins/cloud_security_posture/common/constants.ts | 2 +- .../security/config.cloud_security_posture.essentials.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/cloud_security_posture/common/constants.ts b/x-pack/plugins/cloud_security_posture/common/constants.ts index 31f36b8d57a7c..3644e65d22906 100644 --- a/x-pack/plugins/cloud_security_posture/common/constants.ts +++ b/x-pack/plugins/cloud_security_posture/common/constants.ts @@ -193,4 +193,4 @@ export const AZURE_CREDENTIALS_TYPE_TO_FIELDS_MAP = { manual: [], }; -export const CLOUD_SECURITY_PLUGIN_VERSION = '1.8.1'; +export const CLOUD_SECURITY_PLUGIN_VERSION = '1.9.0'; diff --git a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts index 320b130e63e91..673836d68be9a 100644 --- a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts +++ b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts @@ -14,7 +14,7 @@ export default createTestConfig({ }, kbnServerArgs: [ `--xpack.fleet.packages.0.name=cloud_security_posture`, - `--xpack.fleet.packages.0.version=1.5.2`, + `--xpack.fleet.packages.0.version=${CLOUD_SECURITY_PLUGIN_VERSION}`, `--xpack.securitySolutionServerless.productTypes=${JSON.stringify([ { product_line: 'security', product_tier: 'essentials' }, { product_line: 'endpoint', product_tier: 'essentials' }, From 6f71b08325168224dad5992d0730b0e417201fb8 Mon Sep 17 00:00:00 2001 From: animehart Date: Fri, 21 Jun 2024 11:22:37 -0700 Subject: [PATCH 2/8] forgot to import --- .../security/config.cloud_security_posture.essentials.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts index 673836d68be9a..11b4f056841f1 100644 --- a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts +++ b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { CLOUD_SECURITY_PLUGIN_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants'; import { createTestConfig } from '../../config.base'; export default createTestConfig({ From e22447519e2342b84ffe28677123a9dbb575260f Mon Sep 17 00:00:00 2001 From: animehart Date: Fri, 21 Jun 2024 16:18:16 -0700 Subject: [PATCH 3/8] trying fix --- .../cis_integrations/cspm/cis_integration_azure.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts index 6bd117c36a85d..6c319f51a6a27 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts @@ -111,11 +111,6 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); - expect( - (await cisIntegration.getValueInEditPage( - CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET - )) === clientSecret - ).to.be(true); }); }); @@ -227,11 +222,6 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); - expect( - (await cisIntegration.getValueInEditPage( - CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET - )) === clientSecret - ).to.be(true); }); }); From 7d68a2a33cddd93ac3383d4076f28d9e95cb9386 Mon Sep 17 00:00:00 2001 From: animehart Date: Fri, 21 Jun 2024 18:57:14 -0700 Subject: [PATCH 4/8] fix --- .../page_objects/add_cis_integration_form_page.ts | 8 ++++++++ .../pages/cis_integrations/cspm/cis_integration_azure.ts | 2 ++ 2 files changed, 10 insertions(+) diff --git a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts index 1a566a346ad4e..096f22dea0915 100644 --- a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts +++ b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts @@ -256,6 +256,13 @@ export function AddCisIntegrationFormPageProvider({ return await (await checkBox.findByCssSelector(`input[id='${id}']`)).getAttribute('checked'); }; + const doesStringExist = async (str: string) => { + const flyout = await testSubjects.find('editPackagePolicy_page'); + const codeBlock = await flyout.findByXpath(`//span[text()="${str}"]`); + + return codeBlock; + }; + return { cisAzure, cisAws, @@ -287,5 +294,6 @@ export function AddCisIntegrationFormPageProvider({ getValueInEditPage, isOptionChecked, checkIntegrationPliAuthBlockExists, + doesStringExist, }; } diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts index 6c319f51a6a27..2554087fc3b1d 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts @@ -111,6 +111,7 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); + expect(await cisIntegration.doesStringExist('Replace client secret')).to.not.be(null); }); }); @@ -222,6 +223,7 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); + expect(await cisIntegration.doesStringExist('Replace client secret')).to.not.be(null); }); }); From 12ceed30cfc2c1139424b3cdd2c16b31d5997785 Mon Sep 17 00:00:00 2001 From: animehart Date: Fri, 21 Jun 2024 20:42:59 -0700 Subject: [PATCH 5/8] improvement --- .../page_objects/add_cis_integration_form_page.ts | 6 +++--- .../pages/cis_integrations/cspm/cis_integration_aws.ts | 4 ++++ .../pages/cis_integrations/kspm/cis_integration_eks.ts | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts index 096f22dea0915..cbde9071e80e4 100644 --- a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts +++ b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts @@ -257,10 +257,10 @@ export function AddCisIntegrationFormPageProvider({ }; const doesStringExist = async (str: string) => { - const flyout = await testSubjects.find('editPackagePolicy_page'); - const codeBlock = await flyout.findByXpath(`//span[text()="${str}"]`); + const textBlock = await testSubjects.find('editPackagePolicy_page'); + const stringToFind = await textBlock.findByXpath(`//span[text()="${str}"]`); - return codeBlock; + return stringToFind; }; return { diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts index 2dd8f36af154d..54238e5da55e4 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts @@ -123,6 +123,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); + expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); }); }); @@ -158,6 +159,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); + expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); }); }); @@ -246,6 +248,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); + expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); }); }); @@ -282,6 +285,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); + expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); }); }); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts index db0778831964f..907967c6798b5 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts @@ -71,6 +71,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); + expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); }); }); @@ -104,6 +105,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); + expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); }); }); From c8983129941aaf2463b5d1f702e8a43de335ef51 Mon Sep 17 00:00:00 2001 From: animehart Date: Mon, 24 Jun 2024 12:08:35 -0700 Subject: [PATCH 6/8] pr comments --- .../steps/components/package_policy_input_var_field.tsx | 1 + .../page_objects/add_cis_integration_form_page.ts | 5 +++++ .../pages/cis_integrations/cspm/cis_integration_aws.ts | 8 ++++---- .../pages/cis_integrations/cspm/cis_integration_azure.ts | 4 ++-- .../pages/cis_integrations/kspm/cis_integration_eks.ts | 4 ++-- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx index 653986a7128de..6bd5a2e0b66c4 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx @@ -420,6 +420,7 @@ function SecretInputField({ iconType="refresh" iconSide="left" size="xs" + data-test-subj={`button-replace${lowercaseTitle}`} > { + return await testSubjects.find(`button-replace${secretField}`); + }; + return { cisAzure, cisAws, @@ -295,5 +299,6 @@ export function AddCisIntegrationFormPageProvider({ isOptionChecked, checkIntegrationPliAuthBlockExists, doesStringExist, + getReplaceSecretButton, }; } diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts index 04356a0ce0d57..cfba8bfba3979 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts @@ -124,7 +124,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); - expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); }); }); @@ -160,7 +160,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); - expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); }); }); @@ -249,7 +249,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); - expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); }); }); @@ -286,7 +286,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); - expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); }); }); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts index 2554087fc3b1d..56a4a9088aa82 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts @@ -111,7 +111,7 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); - expect(await cisIntegration.doesStringExist('Replace client secret')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('client secret')).to.not.be(null); }); }); @@ -223,7 +223,7 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); - expect(await cisIntegration.doesStringExist('Replace client secret')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('client secret')).to.not.be(null); }); }); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts index 9236f44a2ae03..564cef0d1b238 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts @@ -72,7 +72,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); - expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); }); }); @@ -107,7 +107,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); - expect(await cisIntegration.doesStringExist('Replace secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); }); }); From ba6b7ad0d82d6dc2669ec66deb72c730afe68eef Mon Sep 17 00:00:00 2001 From: Rickyanto Ang Date: Mon, 24 Jun 2024 16:55:57 -0700 Subject: [PATCH 7/8] Removed unused function --- .../page_objects/add_cis_integration_form_page.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts index 43dde51967520..109462d8ddc43 100644 --- a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts +++ b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts @@ -256,13 +256,6 @@ export function AddCisIntegrationFormPageProvider({ return await (await checkBox.findByCssSelector(`input[id='${id}']`)).getAttribute('checked'); }; - const doesStringExist = async (str: string) => { - const textBlock = await testSubjects.find('editPackagePolicy_page'); - const stringToFind = await textBlock.findByXpath(`//span[text()="${str}"]`); - - return stringToFind; - }; - const getReplaceSecretButton = async (secretField: string) => { return await testSubjects.find(`button-replace${secretField}`); }; @@ -298,7 +291,6 @@ export function AddCisIntegrationFormPageProvider({ getValueInEditPage, isOptionChecked, checkIntegrationPliAuthBlockExists, - doesStringExist, getReplaceSecretButton, }; } From f7f388f98cc6d6847e15032af0f680be9a7e95a0 Mon Sep 17 00:00:00 2001 From: animehart Date: Tue, 2 Jul 2024 08:59:57 -0700 Subject: [PATCH 8/8] pr comment --- .../steps/components/package_policy_input_var_field.tsx | 2 +- .../page_objects/add_cis_integration_form_page.ts | 2 +- .../pages/cis_integrations/cspm/cis_integration_aws.ts | 8 ++++---- .../pages/cis_integrations/cspm/cis_integration_azure.ts | 4 ++-- .../pages/cis_integrations/kspm/cis_integration_eks.ts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx index 6bd5a2e0b66c4..114d973f32541 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx @@ -420,7 +420,7 @@ function SecretInputField({ iconType="refresh" iconSide="left" size="xs" - data-test-subj={`button-replace${lowercaseTitle}`} + data-test-subj={`button-replace-${fieldTestSelector}`} > { - return await testSubjects.find(`button-replace${secretField}`); + return await testSubjects.find(`button-replace-${secretField}`); }; return { diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts index cfba8bfba3979..5523e05120912 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_aws.ts @@ -124,7 +124,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); - expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); @@ -160,7 +160,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); - expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); @@ -249,7 +249,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); - expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); @@ -286,7 +286,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); - expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts index 56a4a9088aa82..99cc57905d46e 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/cspm/cis_integration_azure.ts @@ -111,7 +111,7 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); - expect(await cisIntegration.getReplaceSecretButton('client secret')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('client-secret')).to.not.be(null); }); }); @@ -223,7 +223,7 @@ export default function (providerContext: FtrProviderContext) { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID )) === tenantId ).to.be(true); - expect(await cisIntegration.getReplaceSecretButton('client secret')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('client-secret')).to.not.be(null); }); }); diff --git a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts index dc6aa1b7d81f4..db567d335b0ff 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/cis_integrations/kspm/cis_integration_eks.ts @@ -73,7 +73,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getFieldValueInEditPage(DIRECT_ACCESS_KEY_ID_TEST_ID)) === directAccessKeyId ).to.be(true); - expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); }); @@ -108,7 +108,7 @@ export default function (providerContext: FtrProviderContext) { (await cisIntegration.getValueInEditPage(TEMP_ACCESS_SESSION_TOKEN_TEST_ID)) === tempAccessSessionToken ).to.be(true); - expect(await cisIntegration.getReplaceSecretButton('secret access key')).to.not.be(null); + expect(await cisIntegration.getReplaceSecretButton('secret-access-key')).to.not.be(null); }); });