mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-20 02:14:18 +00:00
fix(ui): show Registry subscription and setup prompts (#13038)
This commit is contained in:
1 parent
286ae6c7cf
commit
64c19b3db6
23 files changed
+571
-73
No files matched your search
@@ -51,6 +51,23 @@ vi.mock("@/components/shadcn/modal", async (importOriginal) => {
|
||||
});
|
||||
|
||||
describe("CloudUpgradeModal", () => {
|
||||
it("links the Registry paid plan upgrade to billing", async () => {
|
||||
// Given
|
||||
vi.stubEnv("UI_CLOUD_ENABLED", "true");
|
||||
useCloudUpgradeStore.getState().openCloudUpgrade("registry");
|
||||
|
||||
// When
|
||||
render(<CloudUpgradeModal />);
|
||||
|
||||
// Then
|
||||
expect(
|
||||
await screen.findByRole("dialog", { name: "Unlock Prowler Registry" }),
|
||||
).toBeVisible();
|
||||
expect(
|
||||
screen.getByRole("link", { name: "Upgrade to Unlock Registry" }),
|
||||
).toHaveAttribute("href", "/billing?feature=registry");
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
cleanup();
|
||||
modalTestState.keepContentMounted = false;
|
||||
|
||||
Reference in new issue
Block a user