diff --git a/tests/buildTransaction.test.ts b/tests/buildTransaction.test.ts index 7d2a145c..09e4a79c 100644 --- a/tests/buildTransaction.test.ts +++ b/tests/buildTransaction.test.ts @@ -1365,7 +1365,8 @@ test.describe("Build Transaction Page", () => { isSorobanOp: true, label: "Contract ID", value: "aaa", - errorMessage: "The string must start with 'C'.", + errorMessage: + "Invalid contract ID. Please enter a valid contract ID.", }); await testInputError({ @@ -1374,7 +1375,7 @@ test.describe("Build Transaction Page", () => { label: "Contract ID", value: "CAQP53Z2GMZ6WVOKJWXMCVDL", errorMessage: - "The string length should be at least 52 characters long.", + "Invalid contract ID. Please enter a valid contract ID.", }); await testInputError({ diff --git a/tests/mock/smartContracts.ts b/tests/mock/smartContracts.ts index ab52de75..28dff5ea 100644 --- a/tests/mock/smartContracts.ts +++ b/tests/mock/smartContracts.ts @@ -1,7 +1,7 @@ import { SAVED_ACCOUNT_1 } from "./localStorage"; export const MOCK_CONTRACT_ID = - "C000NO6F7FRDHSOFQBT2L2UWYIZ2PU76JKVRYAQTG3KZSQLYAOKIF2WB"; + "CAQP53Z2GMZ6WVOKJWXMCVDLZYJ7GYVMWPAMWACPLEZRF2UEZW3B636S"; export const MOCK_CONTRACT_INFO_RESPONSE_SUCCESS = { contract: MOCK_CONTRACT_ID, account: MOCK_CONTRACT_ID, diff --git a/tests/smartContractsContractInfo.test.ts b/tests/smartContractsContractInfo.test.ts index 67d79fea..3aaa3a33 100644 --- a/tests/smartContractsContractInfo.test.ts +++ b/tests/smartContractsContractInfo.test.ts @@ -37,13 +37,13 @@ test.describe("Smart Contracts: Contract Info", () => { // Input validation await contractIdInput.fill("aaa"); await expect( - page.getByText("The string must start with 'C'."), + page.getByText("Invalid contract ID. Please enter a valid contract ID."), ).toBeVisible(); // Valid input await contractIdInput.fill(MOCK_CONTRACT_ID); await expect( - page.getByText("The string must start with 'C'."), + page.getByText("Invalid contract ID. Please enter a valid contract ID."), ).toBeHidden(); // Fetch info diff --git a/tests/submitTransactionPage.test.ts b/tests/submitTransactionPage.test.ts index 2405a082..9defb141 100644 --- a/tests/submitTransactionPage.test.ts +++ b/tests/submitTransactionPage.test.ts @@ -416,24 +416,25 @@ test.describe("Submit Transaction Page", () => { // Omitting the API end result because the test gives inconsistenet results }); }); -}); -test.describe("Update default submit method to RPC when it is a Soroban XDR", () => { - test("Submit Soroban", async ({ page }) => { - const xdrInput = page.getByLabel( - "Input a base-64 encoded TransactionEnvelope", - ); - const submitMethodsBtn = page - .locator(".SubmitTx__buttons") - .getByRole("button", { name: /via/i }); + test.describe("Update default submit method to RPC when it is a Soroban XDR", () => { + test("Submit Soroban", async ({ page }) => { + const xdrInput = page.getByLabel( + "Input a base-64 encoded TransactionEnvelope", + ); + + // Input the Soroban XDR + await xdrInput.fill(MOCK_VALID_SOROBAN_TX_XDR.XDR); - await expect(submitMethodsBtn).toBeVisible(); + const submitMethodsBtn = page + .locator(".SubmitTx__buttons") + .getByRole("button", { name: /via/i }); - // Input the Soroban XDR - await xdrInput.fill(MOCK_VALID_SOROBAN_TX_XDR.XDR); + await expect(submitMethodsBtn).toBeVisible(); - // Check if the submit method button shows RPC as default - await expect(submitMethodsBtn).toHaveText("via RPC"); + // Check if the submit method button shows RPC as default + await expect(submitMethodsBtn).toHaveText("via RPC"); + }); }); });