Fleet UI: Remove incorrect copy (#42586)

## Issue
Closes #40683 

## Description
- Removed from 2 modals that were rendering it

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually
This commit is contained in:
RachelElysia 2026-03-28 16:27:28 -04:00 committed by GitHub
parent f4a2e3aac8
commit 9bfef5dec3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 51 deletions

View file

@ -285,7 +285,7 @@ export const SoftwareInstallDetailsModal = ({
if (hostSoftware?.installed_versions?.length) {
return <InventoryVersions hostSoftware={hostSoftware} />;
}
return "If you uninstalled it outside of Fleet it will still show as installed.";
return null;
};
const renderInstallDetailsSection = () => {

View file

@ -391,7 +391,7 @@ export const SoftwareIpaInstallDetailsModal = ({
if (hostSoftware?.installed_versions?.length) {
return <InventoryVersions hostSoftware={hostSoftware} />;
}
return "If you uninstalled it outside of Fleet it will still show as installed.";
return null;
};
const renderInstallDetailsSection = () => {

View file

@ -562,53 +562,4 @@ describe("VPP Install Details Modal", () => {
)
).toBeInTheDocument();
});
it("does not render the stale uninstall sentence on My device", async () => {
mockServer.use(getDeviceVppCommandResultHandler);
const hostSoftware = createMockHostSoftware({
id: 123,
status: "installed",
name: "Keynote",
display_name: "Keynote",
installed_versions: [],
source: "apps",
app_store_app: createMockHostAppStoreApp({
platform: "darwin",
last_install: {
command_uuid: "acknowledged-uuid",
installed_at: "2025-08-10T12:00:00Z",
},
}),
});
renderWithBackend(
<VppInstallDetailsModal
details={{
fleetInstallStatus: "installed",
hostDisplayName: "Marko's MacBook Pro",
appName: "Keynote",
commandUuid: "acknowledged-uuid",
platform: "darwin",
}}
deviceAuthToken="device-token"
hostSoftware={hostSoftware}
onCancel={jest.fn()}
/>
);
// Wait for the success state to render
await waitFor(() => {
// Just assert on the actual text we render in this mode
expect(screen.getByText(/Keynote/i)).toBeInTheDocument();
expect(screen.getByText(/is installed\./i)).toBeInTheDocument();
});
// And still assert that the “stale uninstall” copy is omitted
expect(
screen.queryByText(
/If you uninstalled it outside of Fleet it will still show as installed/i
)
).not.toBeInTheDocument();
});
});