Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
228 changes: 112 additions & 116 deletions src/components/ConnectWalletModal.tsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,10 @@ describe("ConnectWalletModal — network_mismatch", () => {
renderModal({ actualNetworkLabel: "Mainnet" });
fireEvent.click(screen.getByLabelText("Connect with Freighter"));
await screen.findByTestId("error-state-network-mismatch");
// "Testnet" appears in both the description paragraph and the instructions list.
// Confirm at least one instance is present, and check for the actual label too.
expect(screen.getAllByText("Testnet").length).toBeGreaterThan(0);
expect(screen.getByText("Mainnet")).toBeInTheDocument();
// "Testnet" appears in the description paragraph and the instructions list.
// Use exact: false because the description is now a single interpolated text node.
expect(screen.getAllByText("Testnet", { exact: false }).length).toBeGreaterThan(0);
expect(screen.getByText("Mainnet", { exact: false })).toBeInTheDocument();
});

it("RETRY re-checks network and succeeds when fixed", async () => {
Expand Down
Loading