[Cloud Security] Fixing FTR test for agentless default remove Beta badge from CSPM Agentless (#208314)

This commit is contained in:
seanrathier 2025-01-28 17:09:13 -05:00 committed by GitHub
parent b266cafe59
commit 71566f38dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 18 additions and 59 deletions

View file

@ -14776,8 +14776,6 @@
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDescription": "Configurer l'intégration sans agent",
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay": "Sans agent",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay": "Sans agent",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.label": "Bêta",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.tooltip": "Cette fonctionnalité est en version d'évaluation technique et pourra être modifiée dans une future version. Nous vous remercions de bien vouloir nous aider en nous signalant tout bug.",
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyLabel": "Technologie de configuration",
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyPlaceholder": "Sélectionner la technologie de configuration",
"xpack.csp.flyout.moreActionsButton": "Plus d'actions",

View file

@ -14642,8 +14642,6 @@
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDescription": "エージェントなしで統合を設定",
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay": "エージェントレス",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay": "エージェントレス",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.label": "ベータ",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.tooltip": "この機能はテクニカルプレビュー中であり、将来のリリースでは変更される場合があります。不具合が発生したら報告してください。",
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyLabel": "セットアップ技術",
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyPlaceholder": "セットアップ技術を選択",
"xpack.csp.flyout.moreActionsButton": "さらにアクションを表示",

View file

@ -14375,8 +14375,6 @@
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDescription": "不使用代理设置集成",
"xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay": "无代理",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay": "无代理",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.label": "公测版",
"xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.tooltip": "此功能处于技术预览状态,在未来版本中可能会发生更改。请通过报告错误来帮助我们。",
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyLabel": "设置技术",
"xpack.csp.fleetIntegration.setupTechnology.setupTechnologyPlaceholder": "选择设置技术",
"xpack.csp.flyout.moreActionsButton": "更多操作",

View file

@ -9,9 +9,7 @@ import React from 'react';
import { SetupTechnology } from '@kbn/fleet-plugin/public';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import {
EuiBetaBadge,
EuiAccordion,
EuiFormRow,
EuiLink,
@ -19,9 +17,6 @@ import {
EuiSuperSelect,
EuiText,
useGeneratedHtmlId,
EuiFlexItem,
EuiFlexGroup,
useEuiTheme,
} from '@elastic/eui';
import {
SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ,
@ -37,47 +32,6 @@ export const SetupTechnologySelector = ({
setupTechnology: SetupTechnology;
onSetupTechnologyChange: (value: SetupTechnology) => void;
}) => {
const { euiTheme } = useEuiTheme();
const agentlessOptionBadge = (isDropDownDisplay: boolean) => {
const title = isDropDownDisplay ? (
<strong>
<FormattedMessage
id="xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay"
defaultMessage="Agentless"
/>
</strong>
) : (
<FormattedMessage
id="xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay"
defaultMessage="Agentless"
/>
);
return (
<EuiFlexGroup alignItems="center" responsive={false}>
<EuiFlexItem grow={false}>{title}</EuiFlexItem>
<EuiFlexItem css={{ paddingTop: !isDropDownDisplay ? euiTheme.size.xs : undefined }}>
<EuiBetaBadge
label={i18n.translate(
'xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.label',
{
defaultMessage: 'Beta',
}
)}
size="m"
color="hollow"
tooltipContent={i18n.translate(
'xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay.techPreviewBadge.tooltip',
{
defaultMessage:
'This functionality is in technical preview and may be changed in a future release. Please help us by reporting any bugs.',
}
)}
/>
</EuiFlexItem>
</EuiFlexGroup>
);
};
const options = [
{
value: SetupTechnology.AGENT_BASED,
@ -109,11 +63,21 @@ export const SetupTechnologySelector = ({
},
{
value: SetupTechnology.AGENTLESS,
inputDisplay: agentlessOptionBadge(false),
inputDisplay: (
<FormattedMessage
id="xpack.csp.fleetIntegration.setupTechnology.agentlessInputDisplay"
defaultMessage="Agentless"
/>
),
'data-test-subj': 'setup-technology-agentless-option',
dropdownDisplay: (
<>
{agentlessOptionBadge(true)}
<strong>
<FormattedMessage
id="xpack.csp.fleetIntegration.setupTechnology.agentlessDrowpownDisplay"
defaultMessage="Agentless"
/>
</strong>
<EuiText size="s" color="subdued">
<p>
<FormattedMessage

View file

@ -29,7 +29,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const AWS_SINGLE_ACCOUNT_TEST_ID = 'awsSingleTestId';
// Failing: See https://github.com/elastic/kibana/issues/208495
describe.skip('Agentless cloud', function () {
describe('Agentless cloud', function () {
let cisIntegration: typeof pageObjects.cisAddIntegration;
let cisIntegrationAws: typeof pageObjects.cisAddIntegration.cisAws;
let mockApiServer: http.Server;
@ -155,6 +155,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await cisIntegration.clickOptionButton(AWS_SINGLE_ACCOUNT_TEST_ID);
await cisIntegration.inputIntegrationName(integrationPolicyName);
await cisIntegration.selectSetupTechnology('agent-based');
await pageObjects.header.waitUntilLoadingHasFinished();
await cisIntegration.clickSaveButton();
await pageObjects.header.waitUntilLoadingHasFinished();

View file

@ -6,8 +6,8 @@
*/
import expect from '@kbn/expect';
import type { FtrProviderContext } from '../ftr_provider_context';
import { AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION } from '../constants';
import type { FtrProviderContext } from '../ftr_provider_context';
// eslint-disable-next-line import/no-default-export
export default function ({ getPageObjects, getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
@ -27,7 +27,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const SETUP_TECHNOLOGY_SELECTOR = 'setup-technology-selector-accordion';
// Failing: See https://github.com/elastic/kibana/issues/208533
describe.skip('Agentless Security Posture Integration Options', function () {
describe('Agentless Security Posture Integration Options', function () {
let cisIntegration: typeof pageObjects.cisAddIntegration;
before(async () => {
@ -70,7 +70,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});
it(`should show cspm with agentless option`, async () => {
// const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`;
await cisIntegration.navigateToAddIntegrationWithVersionPage(
AGENTLESS_SECURITY_POSTURE_PACKAGE_VERSION
);
@ -82,7 +81,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
const hasAgentBased = await testSubjects.exists(POLICY_NAME_FIELD);
expect(hasSetupTechnologySelector).to.be(true);
expect(hasAgentBased).to.be(true);
expect(hasAgentBased).to.be(false);
});
});
}