From d7816f1179d9f904f9a437d2049df4e3a989dca8 Mon Sep 17 00:00:00 2001 From: Josema Camacho Date: Wed, 5 Aug 2026 14:41:59 +0200 Subject: [PATCH] feat(ui): show sign-in methods in the Cloud users table (#12268) --- .../user-sign-in-method-indicators.added.md | 1 + .../users/table/column-users.test.tsx | 151 ++++++++++++++++++ ui/components/users/table/column-users.tsx | 66 +++++++- .../users/table/skeleton-table-user.test.tsx | 45 ++++++ .../users/table/skeleton-table-user.tsx | 20 ++- ui/types/components.ts | 2 + ui/types/users.ts | 26 +++ 7 files changed, 308 insertions(+), 3 deletions(-) create mode 100644 ui/changelog.d/user-sign-in-method-indicators.added.md create mode 100644 ui/components/users/table/column-users.test.tsx create mode 100644 ui/components/users/table/skeleton-table-user.test.tsx diff --git a/ui/changelog.d/user-sign-in-method-indicators.added.md b/ui/changelog.d/user-sign-in-method-indicators.added.md new file mode 100644 index 0000000000..0b1bd856e1 --- /dev/null +++ b/ui/changelog.d/user-sign-in-method-indicators.added.md @@ -0,0 +1 @@ +Sign-in method indicators in the Prowler Cloud Users table, including linked SAML domains diff --git a/ui/components/users/table/column-users.test.tsx b/ui/components/users/table/column-users.test.tsx new file mode 100644 index 0000000000..b8a9725445 --- /dev/null +++ b/ui/components/users/table/column-users.test.tsx @@ -0,0 +1,151 @@ +import type { CellContext } from "@tanstack/react-table"; +import { render, screen } from "@testing-library/react"; +import type { ReactElement, ReactNode } from "react"; +import { describe, expect, expectTypeOf, it, vi } from "vitest"; + +import type { UserProps } from "@/types"; +import type { UserSignInMethod } from "@/types/users"; + +vi.mock("@/components/shadcn", () => ({ + Badge: ({ children, variant }: { children: ReactNode; variant?: string }) => ( + {children} + ), +})); + +vi.mock("@/components/shadcn/entities", () => ({ + DateWithTime: () =>