From eb34bd8703d899ea4d1476a88fb30323fc6833c9 Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Fri, 8 Oct 2021 14:01:48 +0530 Subject: [PATCH] added format() in place of address --- src/bitmessagekivy/tests/test_addressbook.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bitmessagekivy/tests/test_addressbook.py b/src/bitmessagekivy/tests/test_addressbook.py index a82a4858..342a5190 100644 --- a/src/bitmessagekivy/tests/test_addressbook.py +++ b/src/bitmessagekivy/tests/test_addressbook.py @@ -71,13 +71,14 @@ class AddressBook(TeleniumTestProcess): self.assertEqual( self.cli.getattr('//GrashofPopup/BoxLayout[0]/MDTextField[1][@text]', 'text'), test_address['autoresponder_address']) - # Click on Save Button to save the address in address book - self.cli.wait_click('//MDRaisedButton[@text=\"Save\"]', timeout=2) # Validating the Label field self.assertExists('//GrashofPopup/BoxLayout[0]/MDTextField[0][@text=\"Auto Responder\"]', timeout=3) # Validating the Valid Address is entered self.assertExists( - '//GrashofPopup/BoxLayout[0]/MDTextField[1][@text=\"BM-2cVWtdUzPwF7UNGDrZftWuHWiJ6xxBpiSP\"]', timeout=3) + '//GrashofPopup/BoxLayout[0]/MDTextField[1][@text=\"{}\"]'.format(test_address['autoresponder_address']), + timeout=3) + # Click on Save Button to save the address in address book + self.cli.wait_click('//MDRaisedButton[@text=\"Save\"]', timeout=2) # Check Current Screen (Address Book) self.assertExists("//ScreenManager[@current=\"addressbook\"]", timeout=5) # Checking new address should be added @@ -128,4 +129,5 @@ class AddressBook(TeleniumTestProcess): self.assertExists("//ScreenManager[@current=\"create\"]", timeout=5) # Checking the Address is populated to recipient field when we try to send message to saved address. self.assertExists( - '//DropDownWidget/ScrollView[0]//MyTextInput[@text="BM-2cVWtdUzPwF7UNGDrZftWuHWiJ6xxBpiSP"]', timeout=5) + '//DropDownWidget/ScrollView[0]//MyTextInput[@text="{}"]'.format(test_address['autoresponder_address']), + timeout=5)