Skip to content

Commit

Permalink
fix(test): fix e2e test for cardano passphrase
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-sanderson committed Feb 26, 2024
1 parent 27b30b0 commit e43684a
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type PageProps = {
row: ResultRow;
isFirstPage: boolean;
isLastPage: boolean;
'data-test'?: string;
};

const Page = styled.div``;
Expand All @@ -48,7 +47,6 @@ const Row = ({
isPixelType,
isPrevPageIconOnDevice,
row,
'data-test': dataTest,
}: PageProps) => {
const iconNextName = isPixelType ? 'ADDRESS_PIXEL_NEXT' : 'ADDRESS_NEXT';
const iconContinuesName = isPixelType ? 'ADDRESS_PIXEL_CONTINUES' : 'ADDRESS_CONTINUES';
Expand All @@ -69,12 +67,7 @@ const Row = ({
icon={iconContinuesName}
/>
)}
<DeviceDisplayText
isPixelType={isPixelType}
data-test={isFirstPage ? dataTest : undefined}
>
{row.text}
</DeviceDisplayText>
<DeviceDisplayText isPixelType={isPixelType}>{row.text}</DeviceDisplayText>
{showNextPageArrow && (
<StyledNextIcon {...iconConfig} isPixelType={isPixelType} icon={iconNextName} />
)}
Expand All @@ -100,7 +93,7 @@ export const DisplayPaginatedText = ({
const isLastPage = pageIndex === pages.length - 1;

return (
<Page key={`page-${pageIndex}`}>
<Page key={`page-${pageIndex}`} data-test={isFirstPage ? dataTest : undefined}>
{page.rows.map((row, index) => (
<Row
isPrevPageIconOnDevice={isPrevPageIconOnDevice}
Expand All @@ -111,7 +104,6 @@ export const DisplayPaginatedText = ({
key={`row-${index}`}
isFirstPage={isFirstPage}
isLastPage={isLastPage}
data-test={dataTest}
/>
))}
{!isLastPage && <DisplayPageSeparator key={`separator-${pageIndex}`} />}
Expand Down

0 comments on commit e43684a

Please sign in to comment.