2020-04-21 08:39:45 +00:00
|
|
|
from tests import marks
|
2019-01-15 14:53:05 +00:00
|
|
|
from tests.base_test_case import SingleDeviceTestCase
|
|
|
|
from views.sign_in_view import SignInView
|
|
|
|
|
2020-04-21 08:39:45 +00:00
|
|
|
@marks.all
|
|
|
|
@marks.upgrade
|
2019-01-15 14:53:05 +00:00
|
|
|
class TestUpgradeApplication(SingleDeviceTestCase):
|
|
|
|
|
2020-04-21 08:39:45 +00:00
|
|
|
@marks.testrail_id(6284)
|
2019-01-15 14:53:05 +00:00
|
|
|
def test_apk_upgrade(self):
|
|
|
|
sign_in = SignInView(self.driver)
|
|
|
|
home = sign_in.create_user()
|
|
|
|
profile = home.profile_button.click()
|
2020-04-21 08:39:45 +00:00
|
|
|
profile.about_button.click()
|
|
|
|
old_version = profile.app_version_text.text
|
|
|
|
profile.upgrade_app()
|
2019-01-15 14:53:05 +00:00
|
|
|
|
|
|
|
sign_in.driver.launch_app()
|
|
|
|
home = sign_in.sign_in()
|
|
|
|
|
|
|
|
profile = home.profile_button.click()
|
2020-04-21 08:39:45 +00:00
|
|
|
profile.about_button.click()
|
|
|
|
new_version = profile.app_version_text.text
|
|
|
|
print('Upgraded app version is %s vs base version is %s ' % (new_version, old_version))
|
2019-01-15 14:53:05 +00:00
|
|
|
assert new_version != old_version
|