Skip to content

Commit

Permalink
test(card): fix card test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jerensl committed Oct 29, 2023
1 parent 2b2d97a commit 1e54865
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ThemeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const ThemeToggle: React.FC = () => {
onClick={() => setTheme('light')}
variant="outlined"
isSelected={false}
data-testid="theme-dark"
dataTestID="theme-dark"
>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -48,7 +48,7 @@ const ThemeToggle: React.FC = () => {
onClick={() => setTheme('dark')}
variant="outlined"
isSelected={false}
data-testid="theme-light"
dataTestID="theme-light"
>
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
3 changes: 3 additions & 0 deletions src/components/buttons/IconToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type IconToggleProps = {
isSelected: boolean
dataCy?: string
disabled?: boolean
dataTestID?: string
ariaLabel?: string
}

Expand All @@ -20,6 +21,7 @@ export const IconToggle = ({
isSelected = false,
disabled,
dataCy,
dataTestID,
ariaLabel,
}: IconToggleProps) => {
return (
Expand All @@ -29,6 +31,7 @@ export const IconToggle = ({
data-cy={dataCy}
onClick={onClick}
disabled={disabled}
data-testid={dataTestID}
className={clsx(
'm-auto rounded-full text-sm font-medium w-10 h-10 disabled:text-on-surface/12 disabled:bg-on-surface-variant/12 hover:brightness-108 active:brightness-110',
{
Expand Down

0 comments on commit 1e54865

Please sign in to comment.