def setUp(self): GaiaEnduranceTestCase.setUp(self) # launch the FM Radio app self.fm_radio = FmRadio(self.marionette) self.fm_radio.launch() # check the headphone is plugged-in or not self.assertTrue(self.data_layer.is_antenna_available, 'Antenna (headphones) not plugged in') # wait for the radio start-up self.wait_for_condition(lambda m: self.data_layer.is_fm_radio_enabled) # stay on initial station for a few seconds time.sleep(5)
def test_radio_airplane_mode(self): """ Set airplane mode then turn on the radio https://moztrap.mozilla.org/manage/case/8464/ """ self.fm_radio = FmRadio(self.marionette) self.fm_radio.launch( self.data_layer.get_setting('airplaneMode.enabled')) self.assertFalse(self.data_layer.is_fm_radio_enabled, 'Radio is still enabled in Airplane mode') # check the headphone is plugged-in or not self.assertTrue(self.data_layer.is_antenna_available, 'Antenna (headphones) not plugged in') Wait(self.marionette).until( lambda m: self.fm_radio.airplane_warning_title == 'Airplane mode is on') self.assertEqual(self.fm_radio.airplane_warning_text, 'Turn off Airplane mode to use FM Radio.')
def setUp(self): GaiaTestCase.setUp(self) # launch the FM Radio app self.fm_radio = FmRadio(self.marionette) self.fm_radio.launch()