From 139db1564be2c87e8d8df8d46f062b6ac105d0f6 Mon Sep 17 00:00:00 2001 From: Natalie Bunduwongse Date: Mon, 2 Dec 2024 20:00:19 +1300 Subject: [PATCH] test: add register offchain test case back --- sample/Tests/test/test.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sample/Tests/test/test.py b/sample/Tests/test/test.py index c4659a9b..284c6498 100644 --- a/sample/Tests/test/test.py +++ b/sample/Tests/test/test.py @@ -79,20 +79,20 @@ def test_2_imx_functions(self): # Register off-chain # Wait up to 3 times for "Passport account already registered" to appear -# attempts = 0 -# while attempts < 3: -# self.altdriver.find_object(By.NAME, "RegisterOffchainBtn").tap() -# self.assertEqual("Registering off-chain...", output.get_text()) -# time.sleep(20) -# if "Passport account already registered" in output.get_text(): -# break -# attempts += 1 -# -# # Assert that the desired text is found after waiting -# self.assertTrue( -# "Passport account already registered" in output.get_text(), -# f"Expected 'Passport account already registered' not found. Actual output: '{output.get_text()}'" -# ) + attempts = 0 + while attempts < 3: + self.altdriver.find_object(By.NAME, "RegisterOffchainBtn").tap() + self.assertEqual("Registering off-chain...", output.get_text()) + time.sleep(20) + if "Passport account already registered" in output.get_text(): + break + attempts += 1 + + # Assert that the desired text is found after waiting + self.assertTrue( + "Passport account already registered" in output.get_text(), + f"Expected 'Passport account already registered' not found. Actual output: '{output.get_text()}'" + ) # Get address self.altdriver.find_object(By.NAME, "GetAddressBtn").tap()