Skip to content

Commit 2f07981

Browse files
Jeesun KimJeesun Kim
Jeesun Kim
authored and
Jeesun Kim
committed
update simulateTx
1 parent e737ded commit 2f07981

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/app/(sidebar)/transaction/simulate/page.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ export default function SimulateTransaction() {
116116
/>
117117

118118
<Input
119-
data-testid="simulate-tx-instr-leeway"
120119
id="simulate-tx-instr-leeway"
121120
fieldSize="md"
122121
label="Instruction Leeway"

tests/simulateTransactionPage.test.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ test.describe("Simulate Transaction Page", () => {
1111

1212
test.describe("Instruction Leeway Input", () => {
1313
test("error when inputting a non whole number", async ({ page }) => {
14-
const instructionLeewayOn = page.getByTestId("simulate-tx-instr-leeway");
14+
const instructionLeewayOn = page.getByLabel("Instruction Leeway");
1515
await instructionLeewayOn.fill("aaa");
1616
await expect(page.getByText("Expected a whole number.")).toBeVisible();
1717
});
1818

1919
test("previous response should be removed when inputting a non whole number", async ({
2020
page,
2121
}) => {
22+
const instructionLeewayOn = page.getByLabel("Instruction Leeway");
23+
2224
// Getting a success response
2325
const xdrInput = page.getByLabel(
2426
"Input a base-64 encoded TransactionEnvelope",
@@ -60,7 +62,6 @@ test.describe("Simulate Transaction Page", () => {
6062
await expect(txResponseCard).toBeVisible();
6163

6264
// Typing in the wrong instruction leeway should remove the previous response
63-
const instructionLeewayOn = page.getByTestId("simulate-tx-instr-leeway");
6465
await instructionLeewayOn.fill("aaa");
6566
await expect(page.getByText("Expected a whole number.")).toBeVisible();
6667

@@ -79,7 +80,7 @@ test.describe("Simulate Transaction Page", () => {
7980

8081
await expect(simulateTxBtn).toBeDisabled();
8182

82-
const instructionLeewayOn = page.getByTestId("simulate-tx-instr-leeway");
83+
const instructionLeewayOn = page.getByLabel("Instruction Leeway");
8384
await instructionLeewayOn.fill("23423423");
8485

8586
// inputting the leeway alone isn't enough to enable the simulate tx button
@@ -233,9 +234,9 @@ test.describe("Simulate Transaction Page", () => {
233234
});
234235
});
235236

236-
// // =============================================================================
237-
// // Mock data
238-
// // =============================================================================
237+
// =============================================================================
238+
// Mock data
239+
// =============================================================================
239240
const MOCK_SC_VAL_XDR =
240241
"AAAAEQAAAAEAAAAGAAAADwAAAAZhbW91bnQAAAAAAAoAAAAAAAAAAAAACRhOcqAAAAAADwAAAAxib290c3RyYXBwZXIAAAASAAAAARssFqxD/prgmYc9vGkaqslWrGlPINzMYTLc4yqRfO3AAAAADwAAAAxjbG9zZV9sZWRnZXIAAAADAz6ilAAAAA8AAAAIcGFpcl9taW4AAAAKAAAAAAAAAAAAAAARdlkuAAAAAA8AAAAEcG9vbAAAABIAAAABX/a7xfliM8nFgGel6pbCM6fT/kqrHAITNtWZQXgDlIIAAAAPAAAAC3Rva2VuX2luZGV4AAAAAAMAAAAA";
241242

0 commit comments

Comments
 (0)