From 76c4c106f2467bff56f6b0ae9058f5b8c78c7f5a Mon Sep 17 00:00:00 2001 From: Mohammed-Mamoun98 Date: Mon, 2 Dec 2024 17:52:16 +0200 Subject: [PATCH] adding some test-ids --- .../credential-filtering-by-country.tsx | 11 +++++++---- .../src/routes/dashboard/index.tsx | 2 +- .../dashboard/wallets/components/wallet-card.tsx | 12 ++++++++++-- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/apps/idos-data-dashboard/src/routes/dashboard/e2e/credential-filtering/credential-filtering-by-country.tsx b/apps/idos-data-dashboard/src/routes/dashboard/e2e/credential-filtering/credential-filtering-by-country.tsx index 96a953aa3..98a294422 100644 --- a/apps/idos-data-dashboard/src/routes/dashboard/e2e/credential-filtering/credential-filtering-by-country.tsx +++ b/apps/idos-data-dashboard/src/routes/dashboard/e2e/credential-filtering/credential-filtering-by-country.tsx @@ -6,17 +6,20 @@ import { DataLoading } from "@/components/data-loading"; import { NoData } from "@/components/no-data"; import { useIdOS } from "@/core/idos"; -const useFetchFilteredCredentials = () => { +const useFetchFilteredCredentials = (country: string) => { const { sdk } = useIdOS(); return useQuery({ queryKey: ["e2e-credential-filtering-by-country"], - queryFn: () => sdk.data.listCredentialsFilteredByCountries(["DE"]), + queryFn: () => sdk.data.listCredentialsFilteredByCountries([country]), }); }; export function Component() { - const credentialIds = useFetchFilteredCredentials(); + const searchParams = new URLSearchParams(document.location.search); + const country = searchParams.get("country") || "DE"; + + const credentialIds = useFetchFilteredCredentials(country); return ( @@ -37,7 +40,7 @@ export function Component() { lg: "xx-large", }} > - Credentials filtered by country (DE) + Credentials filtered by country {country} diff --git a/apps/idos-data-dashboard/src/routes/dashboard/index.tsx b/apps/idos-data-dashboard/src/routes/dashboard/index.tsx index 9cbf65684..7f712a234 100644 --- a/apps/idos-data-dashboard/src/routes/dashboard/index.tsx +++ b/apps/idos-data-dashboard/src/routes/dashboard/index.tsx @@ -176,7 +176,7 @@ export function Component() { - + Wallets diff --git a/apps/idos-data-dashboard/src/routes/dashboard/wallets/components/wallet-card.tsx b/apps/idos-data-dashboard/src/routes/dashboard/wallets/components/wallet-card.tsx index 323ee8f36..8d9a352e3 100644 --- a/apps/idos-data-dashboard/src/routes/dashboard/wallets/components/wallet-card.tsx +++ b/apps/idos-data-dashboard/src/routes/dashboard/wallets/components/wallet-card.tsx @@ -9,12 +9,20 @@ type WalletCardProps = { export const WalletCard = ({ address, isDisabled, onDelete }: WalletCardProps) => { return ( - + Wallet image Address - + {address}