tests updated in order to reflect changes in back button behavior

This commit is contained in:
Anton Danchenko 2017-11-15 15:44:21 +02:00 committed by Roman Volosovskyi
parent 6a1dfb7ba4
commit af97424146
4 changed files with 13 additions and 7 deletions

View File

@ -79,6 +79,7 @@ class AbstractTestCase:
desired_caps['appiumVersion'] = '1.7.1'
desired_caps['platformVersion'] = '6.0'
desired_caps['newCommandTimeout'] = 600
desired_caps['fullReset'] = True
return desired_caps
@abstractmethod

View File

@ -31,8 +31,8 @@ class TestMultiplyDevices(MultiplyDeviceTestCase):
new_chat_d2 = chats_d2.element_by_text('test123', 'button')
new_chat_d2.click()
chats_d1.back_button.click()
chats_d1.back_button.click()
for _ in range(3):
chats_d1.back_button.click()
chats_d2.add_to_contacts.click()
chats_d2.back_button.click()
chats_d1.profile_button.click()
@ -116,7 +116,8 @@ class TestMultiplyDevices(MultiplyDeviceTestCase):
chats_d2.confirm_public_key_button.click()
user_name_d1 = chats_d2.user_name_text.text
device_2.back_button.click()
for _ in range(2):
device_2.back_button.click()
chats_d2.new_group_chat_button.click()
user_contact = chats_d2.element_by_text(user_name_d1, 'button')

View File

@ -14,7 +14,9 @@ class TestTransactions(SingleDeviceTestCase):
@pytest.mark.parametrize("test, recipient, sender", [('group_chat', 'A_USER', 'B_USER'),
('one_to_one_chat', 'B_USER', 'A_USER'),
('wrong_password', 'A_USER', 'B_USER')],
ids=['group_chat', 'one_to_one_chat', 'wrong_password'])
ids=['group_chat',
'one_to_one_chat',
'wrong_password'])
def test_send_transaction(self, test, recipient, sender):
home = HomeView(self.driver)
recover_access(home,
@ -37,7 +39,8 @@ class TestTransactions(SingleDeviceTestCase):
if test == 'group_chat':
user_name = chats.user_name_text.text
chats.back_button.click()
for _ in range(2):
chats.back_button.click()
chats.new_group_chat_button.click()
user_contact = chats.element_by_text(user_name, 'button')
user_contact.scroll_to_element()

View File

@ -28,7 +28,8 @@ class TestWallet(SingleDeviceTestCase):
@pytest.mark.wallet
@pytest.mark.parametrize("test, recipient, sender", [('sign_now', 'A_USER', 'B_USER'),
('sign_later', 'B_USER', 'A_USER')],
ids=['sign_now', 'sign_later'])
ids=['sign_now',
'sign_later'])
def test_send_transaction_from_wallet(self, test, recipient, sender):
home = HomeView(self.driver)
recover_access(home,
@ -48,7 +49,7 @@ class TestWallet(SingleDeviceTestCase):
chats.confirm()
chats.confirm_public_key_button.click()
for _ in range(2):
for _ in range(3):
chats.back_button.click()
wallet = chats.wallet_button.click()
wallet.send_button.click()