Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dashboard test id #2271

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const CardHeader = ({
to={link}
unstyled
className="p-3 flex items-center text-text-text-and-icon hover:text-accent-accent border-b dark:border-df-gray-900 border-bg-grid-border"
data-testid={`${title}Id`}
>
<span className="flex-1 truncate flex items-center gap-2">{children}</span>
<div className="h-4 w-4 shrink-0 -rotate-90 justify-self-end">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,24 @@ const CountCard = ({
link: string;
}) => {
return (
<DFLink to={link} unstyled className="group flex flex-col gap-1 cursor-pointer">
<div className="text-p12 text-text-text-and-icon truncate">{title}</div>
<DFLink
to={link}
unstyled
className="group flex flex-col gap-1 cursor-pointer"
data-testid={`link${title}Id`}
>
<div
className="text-p12 text-text-text-and-icon truncate"
data-testid={`${title}Id`}
>
{title}
</div>
<div className="flex gap-3 items-center">
<div className="h-6 w-6 shrink-0 text-text-icon">{icon}</div>
<div className="text-h1 text-accent-accent group-hover:underline">
<div
className="text-h1 text-accent-accent group-hover:underline"
data-testid={`${title}CountId`}
>
{abbreviateNumber(count)}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const PostureCardItem = ({ provider }: { provider: ModelPostureProvider }) => {
'hover:ring-bg-hover-3 hover:ring-1 hover:shadow-[0px_0px_6px_2px_#044AFF]',
'focus:ring-bg-hover-3 focus:shadow-[0px_0px_6px_1px_#044AFF] focus:ring-1',
)}
data-testid={`${provider.name}Id`}
>
<div className="dark:bg-bg-side-panel bg-white flex" key={provider.name}>
<div className="flex items-center justify-center p-3">
Expand Down
Loading