Mobile popup

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2019-09-25 14:04:40 +02:00
parent 0a5acfb0f7
commit 4239ae5686
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
2 changed files with 25 additions and 3 deletions

View File

@ -26,6 +26,16 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
if not profile_view.profile_picture.is_element_image_equals_template('sauce_logo_profile.png'):
self.driver.fail('Profile picture was not updated')
@marks.testrail_id(5741)
@marks.high
def test_mobile_data_usage_popup(self):
sign_in_view = SignInView(self.driver)
sign_in_view.create_user()
sign_in_view.toggle_mobile_data()
if not sign_in_view.find_text_part("Sync using Mobile data"):
self.driver.fail('No popup about Mobile data is shown')
# TODO: add steps after 8973 fix
@marks.testrail_id(5454)
@marks.critical
def test_user_can_remove_profile_picture(self):

View File

@ -609,12 +609,24 @@ class BaseView(object):
network_and_internet = self.element_by_text('Network & Internet')
network_and_internet.wait_for_visibility_of_element()
network_and_internet.click()
airplane_toggle = self.element_by_xpath('//*[@resource-id="android:id/switch_widget"]')
airplane_toggle.wait_for_visibility_of_element()
airplane_toggle.click()
airplane_mode = self.element_by_xpath('//*[@resource-id="android:id/switch_widget"]')
airplane_mode.wait_for_visibility_of_element()
airplane_mode.click()
# opening Status app
self.driver.launch_app()
def toggle_mobile_data(self):
self.driver.start_activity(app_package='com.android.settings', app_activity='.Settings')
network_and_internet = self.element_by_text('Network & Internet')
network_and_internet.wait_for_visibility_of_element()
network_and_internet.click()
toggle = self.element_by_accessibility_id('WiFi')
toggle.wait_for_visibility_of_element()
toggle.click()
self.driver.back()
self.driver.back()
def open_universal_web_link(self, deep_link):
start_web_browser(self.driver)
self.send_as_keyevent(deep_link)