class test_main(GaiaTestCase): def __init__(self, *args, **kwargs): kwargs['restart'] = True super(test_main, self).__init__(*args, **kwargs) def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.settings = Settings(self) def tearDown(self): self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): # Open the Settings application. self.settings.launch() # Tap hotspot. self.settings.hotspot() hotspot_settings = self.UTILS.element.getElement(DOM.Settings.hotspot_settings, "Hotspot settings") self.UTILS.test.test(hotspot_settings.is_enabled(), "Hotspot settings are enabled by default (<b>meaning that 'hotspot' is off</b>).")
class test_main(GaiaTestCase): def __init__(self, *args, **kwargs): kwargs['restart'] = True super(test_main, self).__init__(*args, **kwargs) def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.settings = Settings(self) def tearDown(self): self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): # Open the Settings application. self.settings.launch() # Tap hotspot. self.settings.hotspot() hotspot_settings = self.UTILS.element.getElement( DOM.Settings.hotspot_settings, "Hotspot settings") self.UTILS.test.test( hotspot_settings.is_enabled(), "Hotspot settings are enabled by default (<b>meaning that 'hotspot' is off</b>)." )
class test_main(GaiaTestCase): def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.settings = Settings(self) def tearDown(self): self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): self.data_layer.connect_to_wifi() self.settings.launch() # Tap hotspot. self.settings.hotspot() self.UTILS.reporting.logResult("info", "<b>Check hotspot with WIFI on.</b>") self.settings.enable_hotspot() time.sleep(3) self.settings.disable_hotspot() self.UTILS.network.disableAllNetworkSettings() self.apps.kill_all() time.sleep(2) self.data_layer.connect_to_cell_data() self.settings.launch() self.UTILS.reporting.logResult( "info", "<b>Check hotspot with DataConn on.</b>") time.sleep(2) self.settings.hotspot() self.settings.enable_hotspot() time.sleep(3) self.settings.disable_hotspot()
class test_main(GaiaTestCase): def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.settings = Settings(self) def tearDown(self): self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): self.data_layer.connect_to_cell_data() self.settings.launch() self.settings.hotspot() hotspot_settings_btn = self.UTILS.element.getElement( DOM.Settings.hotspot_settings, "Hotspot settings button", timeout=20) self.UTILS.test.test(hotspot_settings_btn.get_attribute("disabled"), "Hotspot button is disabled.") time.sleep(5)
class test_main(GaiaTestCase): def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.settings = Settings(self) def tearDown(self): self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): self.data_layer.connect_to_wifi() self.settings.launch() # Tap hotspot. self.settings.hotspot() self.UTILS.reporting.logResult("info", "<b>Check hotspot with WIFI on.</b>") self.settings.enable_hotspot() time.sleep(3) self.settings.disable_hotspot() self.UTILS.network.disableAllNetworkSettings() self.apps.kill_all() time.sleep(2) self.data_layer.connect_to_cell_data() self.settings.launch() self.UTILS.reporting.logResult("info", "<b>Check hotspot with DataConn on.</b>") time.sleep(2) self.settings.hotspot() self.settings.enable_hotspot() time.sleep(3) self.settings.disable_hotspot()