Wizard: edit tests related to Compliance step

This commit is contained in:
Katarina Sieklova 2025-05-20 14:18:20 +02:00 committed by Klara Simickova
parent 0cfe3dde30
commit 564c5461d4
7 changed files with 15 additions and 25 deletions

View file

@ -48,6 +48,7 @@ type ComplianceSelectOptionPropType = {
type ComplianceSelectOptionValueType = {
policyID: string;
profileID: string;
title: string;
toString: () => string;
};
@ -59,6 +60,7 @@ const ComplianceSelectOption = ({ policy }: ComplianceSelectOptionPropType) => {
): ComplianceSelectOptionValueType => ({
policyID,
profileID,
title,
toString: () => title || 'None',
});
@ -234,7 +236,7 @@ const PolicySelector = () => {
changeCompliance({
profileID: selection.profileID,
policyID: selection.policyID,
policyTitle: selection.toString(),
policyTitle: selection.title,
})
);
});
@ -287,7 +289,7 @@ const PolicySelector = () => {
} as React.CSSProperties
}
>
{policyID === undefined ? 'None' : policyTitle || 'Select a policy'}
{policyTitle || 'None'}
</MenuToggle>
);

View file

@ -329,11 +329,11 @@ const ProfileSelector = () => {
>
<TextInputGroup isPlain>
<TextInputGroupMain
value={profileID ? profileID : inputValue || 'None'}
value={profileID ? profileID : inputValue}
onClick={onInputClick}
onChange={onTextInputChange}
autoComplete="off"
placeholder="Select a profile"
placeholder="None"
isExpanded={isOpen}
/>