Skip to content

Commit

Permalink
update UT
Browse files Browse the repository at this point in the history
  • Loading branch information
themooneer committed Jan 8, 2025
1 parent 71bfddd commit ec68485
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import type { BleDevicePairingProps } from "./BleDevicePairing";
import { track } from "~/analytics";
import { NavigationHeaderBackButton } from "../NavigationHeaderBackButton";
import { NavigationHeaderCloseButton } from "../NavigationHeaderCloseButton";
import { Text } from "@ledgerhq/native-ui";

const TIMEOUT_AFTER_PAIRED_MS = 2000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ describe("Device Selection feature integration test", () => {
const screenTitle = screen.getByText(/Connect device/i);
const listHeader = screen.getByText(/Devices/i);
const stepIndicator = screen.getByText(/Step 2 of 3/i);
const addDevuceCTA = screen.getByText(/Add a Ledger/i);
const addDeviceCTA = screen.getByText(/Add a Ledger/i);
const bottomText = screen.getByText(/Need a new Ledger?/i);
const buyNowCTA = screen.getByText(/Buy now?/i);

[listHeader, screenTitle, stepIndicator, addDevuceCTA, bottomText, buyNowCTA].forEach(
[listHeader, screenTitle, stepIndicator, addDeviceCTA, bottomText, buyNowCTA].forEach(
element => {
expect(element).toBeOnTheScreen();
},
Expand All @@ -79,13 +79,12 @@ describe("Device Selection feature integration test", () => {
render(<DeviceSelectionNavigator />);
const deviceCTA = screen.getByTestId("device-item-usb|1");
const notConnectedText = screen.getByText(/connected/i);
const addDevuceCTA = screen.queryByText(/Add a Ledger/i);
const addNewCTA = screen.queryByText(/Add new/i);
const bottomText = screen.getByText(/Need a new Ledger?/i);
const buyNowCTA = screen.getByText(/Buy now?/i);

[deviceCTA, notConnectedText, bottomText, buyNowCTA].forEach(element => {
[deviceCTA, notConnectedText, bottomText, buyNowCTA, addNewCTA].forEach(element => {
expect(element).toBeOnTheScreen();
});
expect(addDevuceCTA).not.toBeOnTheScreen();
});
});

0 comments on commit ec68485

Please sign in to comment.