chore: change trial expired banner when launching scans (#11689)

This commit is contained in:
Pepe Fagoaga
2026-06-25 12:12:50 +02:00
committed by GitHub
parent 7785829969
commit fbddeea254
6 changed files with 34 additions and 10 deletions
@@ -429,7 +429,7 @@ describe("OrgLaunchScan", () => {
});
// Then
expect(screen.getByText(/reached your scan limit/i)).toBeInTheDocument();
expect(screen.getByText(/exceeded the usage limit/i)).toBeInTheDocument();
expect(updateSchedulesBulkMock).not.toHaveBeenCalled();
expect(launchOrganizationScansMock).not.toHaveBeenCalled();
});
@@ -363,8 +363,16 @@ export function OrgLaunchScan({
{isBlocked ? (
<p className="text-text-error-primary text-sm">
You have reached your scan limit, so additional scans are not
available right now.
You have exceeded the usage limit of one provider. You can add
more providers and run unlimited scans by adding a subscription.{" "}
<Link
href="https://cloud.prowler.com/billing"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
Manage Billing
</Link>
</p>
) : isAdvanced ? (
<ScanScheduleFields
@@ -473,7 +473,7 @@ describe("LaunchStep", () => {
);
// Then
expect(screen.getByText(/reached your scan limit/i)).toBeInTheDocument();
expect(screen.getByText(/exceeded the usage limit/i)).toBeInTheDocument();
await waitFor(() => expect(onFooterChange).toHaveBeenCalled());
expect(lastFooterConfig(onFooterChange)?.actionDisabled).toBe(true);
});
@@ -352,8 +352,16 @@ export function LaunchStep({
{(isLimitBlocked || isBlocked) && (
<p className="text-text-error-primary text-sm">
You have reached your scan limit, so additional scans are not
available right now.
You have exceeded the usage limit of one provider. You can add more
providers and run unlimited scans by adding a subscription.{" "}
<Link
href="https://cloud.prowler.com/billing"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
Manage Billing
</Link>
</p>
)}
@@ -591,7 +591,7 @@ describe("LaunchScanModal", () => {
);
expect(screen.queryByRole("radio")).not.toBeInTheDocument();
expect(screen.getByText(/reached your scan limit/i)).toBeInTheDocument();
expect(screen.getByText(/exceeded the usage limit/i)).toBeInTheDocument();
expect(
screen.getByRole("button", { name: /launch scan/i }),
).toBeDisabled();
@@ -610,7 +610,7 @@ describe("LaunchScanModal", () => {
);
expect(screen.queryByRole("radio")).not.toBeInTheDocument();
expect(screen.getByText(/reached your scan limit/i)).toBeInTheDocument();
expect(screen.getByText(/exceeded the usage limit/i)).toBeInTheDocument();
await user.selectOptions(screen.getByLabelText("Providers"), provider.id);
await user.click(screen.getByRole("button", { name: /launch scan/i }));
+10 -2
View File
@@ -330,8 +330,16 @@ function LaunchScanForm({
{isBlocked && (
<p className="text-text-error-primary text-sm">
You have reached your scan limit, so additional scans are not
available right now.
You have exceeded the usage limit of one provider. You can add more
providers and run unlimited scans by adding a subscription.{" "}
<Link
href="https://cloud.prowler.com/billing"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
Manage Billing
</Link>
</p>
)}