Fixed password in logcat verification and TestFairy warning text

Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
yevh-berdnyk 2018-08-13 15:09:53 +03:00
parent d292184aa8
commit c5fc619eff
No known key found for this signature in database
GPG Key ID: E9B425FDFC4DEA9C
4 changed files with 17 additions and 7 deletions

View File

@ -26,7 +26,7 @@ def info(text: str):
def debug(text: str): def debug(text: str):
logging.debug(text) logging.debug(text)
test_suite_data = TestSuiteData() 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." "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 " \ connection_is_secure_text = "Connection is secure. Make sure you really trust this site " \
"before signing transactions or entering personal data." "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."

View File

@ -1,4 +1,5 @@
import pytest import pytest
import random
from tests import marks, common_password, get_current_time from tests import marks, common_password, get_current_time
from tests.base_test_case import SingleDeviceTestCase from tests.base_test_case import SingleDeviceTestCase
@ -85,5 +86,6 @@ class TestCreateAccount(SingleDeviceTestCase):
@marks.testrail_id(3767) @marks.testrail_id(3767)
def test_password_in_logcat_creating_account(self): def test_password_in_logcat_creating_account(self):
sign_in = SignInView(self.driver) sign_in = SignInView(self.driver)
sign_in.create_user() password = random.randint(100000, 1000000)
sign_in.check_no_values_in_logcat(password=common_password) sign_in.create_user(password=password)
sign_in.check_no_values_in_logcat(password=password)

View File

@ -1,3 +1,5 @@
import random
from tests import marks, common_password from tests import marks, common_password
from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase from tests.base_test_case import MultipleDeviceTestCase, SingleDeviceTestCase
from views.sign_in_view import SignInView from views.sign_in_view import SignInView
@ -43,11 +45,12 @@ class TestSignIn(SingleDeviceTestCase):
@marks.testrail_id(3768) @marks.testrail_id(3768)
def test_password_in_logcat_sign_in(self): def test_password_in_logcat_sign_in(self):
sign_in = SignInView(self.driver) 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 = sign_in.profile_button.click()
profile.logout() profile.logout()
sign_in.sign_in() 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 @marks.all

View File

@ -5,7 +5,7 @@ import base64
import pytest import pytest
import re import re
import zbarlight import zbarlight
from tests import info, common_password from tests import info, common_password, test_fairy_warning_text
from eth_keys import datatypes from eth_keys import datatypes
from selenium.common.exceptions import NoSuchElementException, TimeoutException, StaleElementReferenceException from selenium.common.exceptions import NoSuchElementException, TimeoutException, StaleElementReferenceException
from PIL import Image from PIL import Image
@ -192,7 +192,7 @@ class ConnectionStatusText(BaseText):
class TestFairyWarning(BaseText): class TestFairyWarning(BaseText):
def __init__(self, driver): def __init__(self, driver):
super(TestFairyWarning, self).__init__(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() self.is_shown = bool()