Skip to content

Commit

Permalink
✨feat(llm): add integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWerey committed Aug 6, 2024
1 parent ba9af29 commit 3380503
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const FallbackCameraBody: React.FC<Props> = ({
const { colors } = useTheme();

return (
<Flex flex={1} bg={hasNoBackground ? null : "background.main"} px={6}>
<Flex flex={1} bg={hasNoBackground ? "transparent" : "background.main"} px={6}>
<Flex flex={1} alignItems="center" justifyContent="center">
<FallbackCamera color={colors.constant.white} />
<Text variant="paragraph" mt={9} mb={3} fontSize={6}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const StepFlow = ({

// That means the url as be stored in the store
const onQrCodeScanned = (data: string) => {
// eslint-disable-next-line no-console
console.log(data);
// setCurrentStep(Steps.PinCodeInput);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ describe("WalletSyncSettings", () => {
await user.press(await screen.findByText(/ledger sync/i));
await user.press(await screen.findByText(/already created a key?/i));
await user.press(await screen.findByText(/scan a qr code/i));
await expect(await screen.findByText(/show qr/i)).toBeVisible();
await expect(screen.queryAllByText(/scan qr code/i)).toHaveLength(2);
await expect(screen.getByTestId("scan-ws-camera")).toBeVisible();
});

it("Should display the QR code when 'show qr' toggle is pressed", async () => {
Expand All @@ -62,7 +63,7 @@ describe("WalletSyncSettings", () => {
await user.press(await screen.findByText(/ledger sync/i));
await user.press(await screen.findByText(/already created a key?/i));
await user.press(await screen.findByText(/scan a qr code/i));
await user.press(await screen.findByText(/show qr/i));
await user.press(await screen.queryAllByText(/show qr/i)[0]);
await expect(await screen.getByTestId("ws-show-qr-code")).toBeVisible();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ const ScanQrCode = ({ onQrCodeScanned }: Props) => {
];

return (
<Flex minHeight={400} justifyContent={"center"} alignItems={"center"} rowGap={24}>
<Flex
minHeight={400}
justifyContent={"center"}
alignItems={"center"}
rowGap={24}
testID={"scan-ws-camera"}
>
<RequiresCameraPermissions optimisticallyMountChildren fallBackHasNoBackground>
<Flex>
<Camera
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const useActivationDrawerModel = ({ isOpen, startingStep, handleClose }: Props)

// That means the url as be stored in the store
const onQrCodeScanned = (data: string) => {
// eslint-disable-next-line no-console
console.log(data);
//setCurrentStep(Steps.PinCodeInput);
};
Expand Down

0 comments on commit 3380503

Please sign in to comment.