Skip to content

Commit 79153a0

Browse files
test(ui): wait for zkEVM connect and accounts output
Poll the Output text after ConnectEvm and RequestAccounts to reduce flakiness from async UI updates in CI.
1 parent 0a232f0 commit 79153a0

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

sample/Tests/test/test.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,21 @@ def test_3_zkevm_functions(self):
255255

256256
# Connect to zkEVM
257257
self.altdriver.find_object(By.NAME, "ConnectEvmBtn").tap()
258-
text = output.get_text()
258+
text = self.wait_for_output(
259+
output,
260+
lambda t: t == "Connected to EVM",
261+
timeout_seconds=30,
262+
)
259263
print(f"ConnectEvmBtn output: {text}")
260264
self.assertEqual("Connected to EVM", text)
261265

262266
# Initiliase wallet and get address
263267
self.altdriver.wait_for_object(By.NAME, "RequestAccountsBtn").tap()
264-
time.sleep(5)
265-
text = output.get_text()
268+
text = self.wait_for_output(
269+
output,
270+
lambda t: t == TestConfig.WALLET_ADDRESS,
271+
timeout_seconds=30,
272+
)
266273
print(f"RequestAccountsBtn output: {text}")
267274
self.assertEqual(TestConfig.WALLET_ADDRESS, text)
268275

0 commit comments

Comments
 (0)