Feature: Script only package e2e followup (#34271)

Co-authored-by: Carlo DiCelico <carlo@fleetdm.com>
This commit is contained in:
RachelElysia
2025-10-17 10:54:00 -04:00
committed by GitHub
co-authored by Carlo DiCelico
parent 927fd1d240
commit 1ef91fe4e3
28 changed files with 160 additions and 49 deletions
@@ -131,7 +131,7 @@ describe("SoftwareScriptDetailsModal - ModalButtons component", () => {
expect(screen.getByRole("button", { name: "Cancel" })).toBeInTheDocument();
await user.click(screen.getByRole("button", { name: "Rerun" }));
expect(onRerun).toHaveBeenCalledWith(99);
expect(onRerun).toHaveBeenCalledWith(99, true);
expect(onCancel).toHaveBeenCalled();
await user.click(screen.getByRole("button", { name: "Cancel" }));
@@ -144,7 +144,7 @@ interface IModalButtonsProps {
deviceAuthToken?: string;
installResultStatus?: string;
hostSoftwareId?: number;
onRerun?: (id: number) => void;
onRerun?: (id: number, isScriptPackage: boolean) => void;
onCancel: () => void;
}
@@ -159,7 +159,7 @@ export const ModalButtons = ({
const onClickRerun = () => {
// on My Device Page, where this is relevant, both will be defined
if (onRerun && hostSoftwareId) {
onRerun(hostSoftwareId);
onRerun(hostSoftwareId, true); // isScriptPackage defined for copy changes
}
onCancel();
};
@@ -190,7 +190,7 @@ interface ISoftwareInstallDetailsProps {
hostSoftware?: IHostSoftware; // for software name when not Fleet installed (not present on activity feeds)
deviceAuthToken?: string; // My Device Page only
onCancel: () => void;
onRerun?: (id: number) => void; // My Device Page only
onRerun?: (id: number, isScriptPackage?: boolean) => void; // My Device Page only
contactUrl?: string; // My Device Page only
}