mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
For #[26070](https://github.com/fleetdm/fleet/issues/26070) This adds the UI for enabling a manual agent install for a bootstrap package. This includes: **The new form option for enabling manual agent install of a bootstrap package**  **disabling adding install software and run script options when user has enabled manual agent install**   **improvements to the setup experience content styling. I've created a `SetupExperienceContentContainer` component to centralise the styles for the content of these sub sections.** **updates to the preview sections copy and replacing the gifs with videos** - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. - [ ] Added/updated automated tests - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import React from "react";
|
|
import { screen } from "@testing-library/react";
|
|
|
|
import mockServer from "test/mock-server";
|
|
import { createCustomRenderer } from "test/test-utils";
|
|
import {
|
|
defaultSetupExperienceScriptHandler,
|
|
errorNoSetupExperienceScript,
|
|
} from "test/handlers/setup-experience-handlers";
|
|
|
|
import RunScript from "./RunScript";
|
|
|
|
describe("RunScript", () => {
|
|
it("should render the script uploader when no script has been uploaded", async () => {
|
|
mockServer.use(errorNoSetupExperienceScript);
|
|
const render = createCustomRenderer({ withBackendMock: true });
|
|
|
|
render(<RunScript currentTeamId={1} />);
|
|
|
|
expect(await screen.findByRole("button", { name: "Upload" })).toBeVisible();
|
|
});
|
|
|
|
it("should render the uploaded script uploader when a script has been uploaded", async () => {
|
|
mockServer.use(defaultSetupExperienceScriptHandler);
|
|
const render = createCustomRenderer({ withBackendMock: true });
|
|
|
|
render(<RunScript currentTeamId={1} />);
|
|
|
|
expect(
|
|
await screen.findByText("Script will run during setup:")
|
|
).toBeVisible();
|
|
expect(await screen.findByText("Test Script.sh")).toBeVisible();
|
|
});
|
|
});
|