Skip to content

Commit

Permalink
test: test-id 2
Browse files Browse the repository at this point in the history
  • Loading branch information
tormoseng committed Jan 17, 2025
1 parent 37cb201 commit c9f632b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export default function Search({
index,
item,
})}
data-testid={`list-item-${index}`}
>
<div className={style.itemIcon} aria-hidden>
<VenueIcon categories={item.category} />
Expand Down
10 changes: 8 additions & 2 deletions src/page-modules/departures/stop-place/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export type StopPlaceProps = {
};
export function StopPlace({ departures }: StopPlaceProps) {
const { t } = useTranslation();
const { color: {interactive}} = useTheme();
const {
color: { interactive },
} = useTheme();
const router = useRouter();
const [isHoveringRefreshButton, setIsHoveringRefreshButton] = useState(false);

Expand Down Expand Up @@ -167,11 +169,12 @@ export function EstimatedCallList({ quay }: EstimatedCallListProps) {
))}
{departures.length > 0 ? (
<>
{departures.map((departure) => (
{departures.map((departure, index) => (
<EstimatedCallItem
key={departure.id}
departure={departure}
quayId={quay.id}
testID={`departure-${quay.publicCode}-${index}`}
/>
))}
</>
Expand Down Expand Up @@ -204,11 +207,13 @@ export function EstimatedCallList({ quay }: EstimatedCallListProps) {
type EstimatedCallItemProps = {
quayId: string;
departure: Departure;
testID?: string;
};

export function EstimatedCallItem({
quayId,
departure,
testID,
}: EstimatedCallItemProps) {
const { t } = useTranslation();
const lineName = formatDestinationDisplay(t, departure.destinationDisplay);
Expand All @@ -217,6 +222,7 @@ export function EstimatedCallItem({
<Link
className={style.listItem}
href={`details/${departure.id}?date=${departure.date}&fromQuayId=${quayId}`}
data-testid={testID}
>
<div className={style.transportInfo}>
{(departure.transportMode || departure.publicCode) && (
Expand Down

0 comments on commit c9f632b

Please sign in to comment.