Skip to content

Commit

Permalink
Merge pull request #74 from tw-mosip/injiweb-576-add-missing-testids
Browse files Browse the repository at this point in the history
[INJIWEB-576]: add missing testids for the components
  • Loading branch information
vijay151096 authored May 29, 2024
2 parents bb1821e + c368ac6 commit d20ae67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inji-web/src/components/Common/ItemBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {ItemBoxProps} from "../../types/components";
export const ItemBox: React.FC<ItemBoxProps> = (props) => {
return <React.Fragment>
<div key={props.index}
data-testid="ItemBox-Outer-Container"
data-testid={`ItemBox-Outer-Container-${props.index}`}
className="bg-iw-tileBackground shadow flex flex-row shadow-iw-shadow p-4 rounded-md cursor-pointer items-center"
onClick={props.onClick}>
<img data-testid="ItemBox-Logo" src={props.url} alt="Issuer Logo"
Expand Down
4 changes: 3 additions & 1 deletion inji-web/src/components/Common/LanguageSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export const LanguageSelector: React.FC = () => {
<button
type="button"
className="inline-flex items-center"
data-testid={"Language-Selector-Button"}
onMouseDown={() => setIsOpen(open => !isOpen)}>
<p>{LanguagesSupported.find(lang => lang.value === language)?.label}</p>
<p data-testid={`Language-Selector-Selected-DropDown-${language}`}>{LanguagesSupported.find(lang => lang.value === language)?.label}</p>
{isOpen ? <RiArrowUpSFill size={20} color={'var(--iw-color-languageArrowIcon)'} /> : <RiArrowDownSFill size={20} color={'var(--iw-color-languageArrowIcon)'}/> }
</button>

Expand All @@ -44,6 +45,7 @@ export const LanguageSelector: React.FC = () => {
<ul className="py-1 divide-y divide-gray-200">
{LanguagesSupported.map((item) => (
<li key={item.value}
data-testid={`Language-Selector-DropDown-Item-${item.value}`}
className={language === item.value ? "text-iw-primary" : ""}>
<button
type="button"
Expand Down

0 comments on commit d20ae67

Please sign in to comment.