Add tests for new "auto update" front-end (#37877)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** For #35459 # Details This PR adds front-end tests for: * `<SoftwareSummaryCard>` * Smoke-test of basic functionality (showing the software title and type, showing an icon) * Action dropdown options for various kinds of software * `<EditAutoUpdateConfigModal>` * Options for auto-updates (enable button, maintenance window validation) * Targets ("All hosts" and "Custom" values and validation) * Form submission (ensuring the API receives the expected payload for various permutations of the form) The `<TargetLabelSelector>` component has its own tests so we don't go through it thoroughly here, just integration tests with the new component. Conversely the `<SoftwareDetailsSummary>` component _doesn't_ have its own tests, and could use some, but in this instance we're just concerned with how it integrates with the software summary card (that is, how the passed-in software title affects the Actions dropdown). ## Testing - [X] Added/updated automated tests --------- Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com> Co-authored-by: Nico <32375741+nulmete@users.noreply.github.com>
This commit is contained in:
co-authored by
Gabriel Hernandez
Nico
parent
df36372a44
commit
0603346065
@@ -42,7 +42,7 @@ const CustomOption = (props: CustomOptionProps) => {
|
||||
const { data, ...rest } = props;
|
||||
|
||||
const optionContent = (
|
||||
<div className={`${baseClass}__option`}>
|
||||
<div className={`${baseClass}__option`} data-testid="dropdown-option">
|
||||
{data.label}
|
||||
{data.helpText && (
|
||||
<span className={`${baseClass}__help-text`}>{data.helpText}</span>
|
||||
|
||||
Reference in New Issue
Block a user