diff --git a/extension/src/popup/views/__tests__/SignTransaction.test.tsx b/extension/src/popup/views/__tests__/SignTransaction.test.tsx index 7ac9ace9d8..3b1986ac86 100644 --- a/extension/src/popup/views/__tests__/SignTransaction.test.tsx +++ b/extension/src/popup/views/__tests__/SignTransaction.test.tsx @@ -213,21 +213,17 @@ describe("SignTransactions", () => { .getAllByTestId("OperationKeyVal") .map((node) => node.textContent); - expect(opDetails.includes(`Amount:${args?.amount.toString()}`)); expect( opDetails.includes( - `Contract ID:${Stellar.truncatedPublicKey(args?.contractId!)}`, + `Parameters${args?.from.toString()}${args?.to.toString()}${args?.amount.toString()}`, ), - ); + ).toBeTruthy(); expect( opDetails.includes( - `Destination:${Stellar.truncatedPublicKey(args?.to!)}`, + `Contract ID${Stellar.truncatedPublicKey(args?.contractId!)}`, ), - ); - expect( - opDetails.includes(`Source:${Stellar.truncatedPublicKey(args?.from!)}`), - ); - expect(opDetails.includes(`Function Name:${args?.fnName}`)); + ).toBeTruthy(); + expect(opDetails.includes(`Function Name${args?.fnName}`)).toBeTruthy(); }); it("displays mint parameters for Soroban mint operations", async () => { @@ -262,26 +258,23 @@ describe("SignTransactions", () => { ); userEvent.click(screen.getByTestId("Tab-Details")); + const args = getTokenInvocationArgs(op); const opDetails = screen .getAllByTestId("OperationKeyVal") .map((node) => node.textContent); - expect(opDetails.includes(`Amount:${args?.amount.toString()}`)); expect( opDetails.includes( - `Contract ID:${Stellar.truncatedPublicKey(args?.contractId!)}`, + `Parameters${args?.to.toString()}${args?.amount.toString()}`, ), - ); + ).toBeTruthy(); expect( opDetails.includes( - `Destination:${Stellar.truncatedPublicKey(args?.to!)}`, + `Contract ID${Stellar.truncatedPublicKey(args?.contractId!)}`, ), - ); - expect( - opDetails.includes(`Source:${Stellar.truncatedPublicKey(args?.from!)}`), - ); - expect(opDetails.includes(`Function Name:${args?.fnName}`)); + ).toBeTruthy(); + expect(opDetails.includes(`Function Name${args?.fnName}`)).toBeTruthy(); }); it("memo: doesn't render memo if there is no memo", async () => {