Skip to content

Commit

Permalink
fix tests - missing data-cy
Browse files Browse the repository at this point in the history
  • Loading branch information
himdel committed Oct 10, 2023
1 parent b8a37a1 commit 4cebeb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/patternfly-wrappers/stateful-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface IProps {
isPlain?: boolean;

ariaLabel?: string;
'data-cy'?: string;
}

export const StatefulDropdown = ({
Expand All @@ -37,6 +38,7 @@ export const StatefulDropdown = ({
defaultText,
isPlain = true,
ariaLabel,
'data-cy': dataCy,
}: IProps) => {
const [isOpen, setOpen] = useState<boolean>(false);
const [selected, setSelected] = useState<string>(undefined);
Expand All @@ -54,6 +56,7 @@ export const StatefulDropdown = ({
position={position || DropdownPosition.right}
autoFocus={false}
aria-label={ariaLabel}
data-cy={dataCy}
/>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/components/shared/language-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export function LanguageSwitcher(_props) {
return (
<StatefulDropdown
ariaLabel={t`Select language`}
data-cy='language-dropdown'
defaultText={currentLanguage}
toggleType='icon'
items={[
Expand Down

0 comments on commit 4cebeb6

Please sign in to comment.