Skip to content

Commit

Permalink
test: add register offchain test case back
Browse files Browse the repository at this point in the history
  • Loading branch information
nattb8 committed Dec 2, 2024
1 parent 99481a8 commit 139db15
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions sample/Tests/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 139db15

Please sign in to comment.