From c5fc619eff7832c7013eea7407cd0afa2936dc26 Mon Sep 17 00:00:00 2001 From: yevh-berdnyk Date: Mon, 13 Aug 2018 15:09:53 +0300 Subject: [PATCH] Fixed password in logcat verification and TestFairy warning text Signed-off-by: yevh-berdnyk --- test/appium/tests/__init__.py | 7 ++++++- .../tests/atomic/account_management/test_create_account.py | 6 ++++-- .../appium/tests/atomic/account_management/test_sign_in.py | 7 +++++-- test/appium/views/base_view.py | 4 ++-- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/test/appium/tests/__init__.py b/test/appium/tests/__init__.py index da29420ed9..8d86ad622e 100644 --- a/test/appium/tests/__init__.py +++ b/test/appium/tests/__init__.py @@ -26,7 +26,7 @@ def info(text: str): def debug(text: str): - logging.debug(text) + logging.debug(text) test_suite_data = TestSuiteData() @@ -174,3 +174,8 @@ connection_not_secure_text = "Connection is not secure! " \ "Do not sign transactions or send personal data on this site." connection_is_secure_text = "Connection is secure. Make sure you really trust this site " \ "before signing transactions or entering personal data." +test_fairy_warning_text = "You are using an app installed from a nightly build. If you're connected to WiFi, " \ + "your interactions with the app will be saved as video and logs. " \ + "These recordings do not save your passwords. They are used by our development team " \ + "to investigate possible issues and only occur if the app is install from a nightly build. " \ + "Nothing is recorded if the app is installed from PlayStore or TestFlight." diff --git a/test/appium/tests/atomic/account_management/test_create_account.py b/test/appium/tests/atomic/account_management/test_create_account.py index 3c1031412f..277821bcf0 100644 --- a/test/appium/tests/atomic/account_management/test_create_account.py +++ b/test/appium/tests/atomic/account_management/test_create_account.py @@ -1,4 +1,5 @@ import pytest +import random from tests import marks, common_password, get_current_time from tests.base_test_case import SingleDeviceTestCase @@ -85,5 +86,6 @@ class TestCreateAccount(SingleDeviceTestCase): @marks.testrail_id(3767) def test_password_in_logcat_creating_account(self): sign_in = SignInView(self.driver) - sign_in.create_user() - sign_in.check_no_values_in_logcat(password=common_password) + password = random.randint(100000, 1000000) + sign_in.create_user(password=password) + sign_in.check_no_values_in_logcat(password=password) diff --git a/test/appium/tests/atomic/account_management/test_sign_in.py b/test/appium/tests/atomic/account_management/test_sign_in.py index 9a1cbd81e3..1ac4bba6cc 100644 --- a/test/appium/tests/atomic/account_management/test_sign_in.py +++ b/test/appium/tests/atomic/account_management/test_sign_in.py @@ -1,3 +1,5 @@ +import random + from tests import marks, common_password from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase from views.sign_in_view import SignInView @@ -43,11 +45,12 @@ class TestSignIn(SingleDeviceTestCase): @marks.testrail_id(3768) def test_password_in_logcat_sign_in(self): sign_in = SignInView(self.driver) - sign_in.create_user() + password = random.randint(100000, 1000000) + sign_in.create_user(password=password) profile = sign_in.profile_button.click() profile.logout() sign_in.sign_in() - sign_in.check_no_values_in_logcat(password=common_password) + sign_in.check_no_values_in_logcat(password=password) @marks.all diff --git a/test/appium/views/base_view.py b/test/appium/views/base_view.py index bc954b1070..67ada27c5b 100644 --- a/test/appium/views/base_view.py +++ b/test/appium/views/base_view.py @@ -5,7 +5,7 @@ import base64 import pytest import re import zbarlight -from tests import info, common_password +from tests import info, common_password, test_fairy_warning_text from eth_keys import datatypes from selenium.common.exceptions import NoSuchElementException, TimeoutException, StaleElementReferenceException from PIL import Image @@ -192,7 +192,7 @@ class ConnectionStatusText(BaseText): class TestFairyWarning(BaseText): def __init__(self, driver): super(TestFairyWarning, self).__init__(driver) - self.locator = self.Locator.text_part_selector('session recording') + self.locator = self.Locator.text_selector(test_fairy_warning_text) self.is_shown = bool()