mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
feat(ui): add AWS onboarding quick prompt
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { BookOpen, FileCheck2, Network, ShieldAlert } from "lucide-react";
|
||||
import { Cloud, FileCheck2, Network, ShieldAlert } from "lucide-react";
|
||||
import { type ReactNode, type SubmitEvent } from "react";
|
||||
|
||||
import { LighthouseIcon } from "@/components/icons/Icons";
|
||||
@@ -26,9 +26,9 @@ const LIGHTHOUSE_V2_SUGGESTIONS = [
|
||||
icon: Network,
|
||||
},
|
||||
{
|
||||
label: "Docs",
|
||||
prompt: "Point me to the relevant Prowler documentation for this task.",
|
||||
icon: BookOpen,
|
||||
label: "How can I onboard to my AWS account?",
|
||||
prompt: "How can I onboard to my AWS account?",
|
||||
icon: Cloud,
|
||||
},
|
||||
] as const;
|
||||
|
||||
|
||||
@@ -206,6 +206,27 @@ describe("LighthouseV2ChatPage", () => {
|
||||
expect(within(currentModel).getByText("GPT-5.1")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("uses the AWS onboarding quick prompt instead of the docs prompt", async () => {
|
||||
// Given
|
||||
const user = userEvent.setup();
|
||||
renderPage();
|
||||
|
||||
// When
|
||||
await user.click(
|
||||
screen.getByRole("button", {
|
||||
name: "How can I onboard to my AWS account?",
|
||||
}),
|
||||
);
|
||||
|
||||
// Then
|
||||
expect(
|
||||
screen.queryByRole("button", { name: "Docs" }),
|
||||
).not.toBeInTheDocument();
|
||||
expect(screen.getByRole("textbox", { name: "Message" })).toHaveValue(
|
||||
"How can I onboard to my AWS account?",
|
||||
);
|
||||
});
|
||||
|
||||
it("shows model names in the selector while keeping model ids for persistence", async () => {
|
||||
// Given
|
||||
const user = userEvent.setup();
|
||||
|
||||
Reference in New Issue
Block a user