Skip to content

Commit 738e94b

Browse files
test(ui): wait for zkEVM receipt to finalize
The tx receipt can return an intermediate 'Still processing' status on CI. Poll Output until it becomes Success (or a terminal failure) before asserting.
1 parent fb5d9c8 commit 738e94b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

sample/Tests/test/test.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,15 @@ def test_3_zkevm_functions(self):
373373
hash = self.altdriver.wait_for_object(By.NAME, "HashInput")
374374
hash.set_text(transactionHash)
375375
self.altdriver.find_object(By.NAME, "GetReceiptButton").tap()
376-
time.sleep(2)
377376
output = self.altdriver.find_object(By.NAME, "Output")
378-
text = output.get_text()
377+
text = self.wait_for_output(
378+
output,
379+
lambda t: t == "Status: Success"
380+
or t == "Status: Failed"
381+
or t.startswith("Error")
382+
or t.startswith("Failed"),
383+
timeout_seconds=90,
384+
)
379385
print(f"Get transaction receipt output: {text}")
380386
self.assertEqual("Status: Success", text)
381387

0 commit comments

Comments
 (0)