def test_select_album_play(self): # https://moztrap.mozilla.org/manage/case/4031/ music_app = Music(self.marionette) music_app.launch() # switch to albums view list_view = music_app.tap_albums_tab() # check that albums (at least one) are available albums = list_view.albums self.assertGreater(len(albums), 0, 'The mp3 file could not be found') # select an album sublist_view = albums[0].tap() # select play # This wait is timing out because of bug 862156 player_view = sublist_view.tap_play() # play for a short duration self.wait_for_condition(lambda m: player_view.player_elapsed_time == '00:05', message='Mp3 sample did not start playing') # validate playback self.assertTrue(player_view.is_player_playing(), 'The player is not playing') # select stop player_view.tap_play() # validate stopped playback self.assertFalse(player_view.is_player_playing(), 'The player did not stop playing')
def test_select_album_play(self): # https://moztrap.mozilla.org/manage/case/4031/ music_app = Music(self.marionette) music_app.launch() # switch to albums view list_view = music_app.tap_albums_tab() # check that albums (at least one) are available albums = list_view.albums self.assertGreater(len(albums), 0, 'no albums found') # select an album sublist_view = albums[0].tap() # select play # This wait is timing out because of bug 862156 player_view = sublist_view.tap_play() # play for a short duration self.wait_for_condition(lambda m: player_view.player_elapsed_time == '00:05') self.assertNotEqual( player_view.player_current_timestamp, player_view.player_playback_duration) # validate playback self.assertTrue(player_view.is_player_playing()) # select stop player_view.tap_play() # validate stopped playback self.assertFalse(player_view.is_player_playing())
def test_select_album_play(self): """https://moztrap.mozilla.org/manage/case/4031/""" music_app = Music(self.marionette) music_app.launch() music_app.wait_for_music_tiles_displayed() # switch to albums view list_view = music_app.tap_albums_tab() # check that albums (at least one) are available albums = list_view.media self.assertGreater(len(albums), 0, 'The mp3 file could not be found') # select an album sublist_view = albums[0].tap_first_album() # select play # This wait is timing out because of bug 862156 player_view = sublist_view.tap_play() # play for a short duration self.wait_for_condition( lambda m: player_view.player_elapsed_time == '00:05', message='Mp3 sample did not start playing') # validate playback self.assertTrue(player_view.is_player_playing(), 'The player is not playing') # select stop player_view.tap_play() # validate stopped playback self.assertFalse(player_view.is_player_playing(), 'The player did not stop playing')
def test_music_album_mp3(self): """ https://moztrap.mozilla.org/manage/case/4031/ """ music_app = Music(self.marionette) music_app.launch() music_app.wait_for_music_tiles_displayed() self.take_screenshot() # switch to albums view list_view = music_app.tap_albums_tab() # check that albums (at least one) are available albums = list_view.media self.assertGreater(len(albums), 0, 'The mp3 file could not be found') self.take_screenshot() # select an album sublist_view = albums[0].tap_first_album() self.take_screenshot() # select play # This wait is timing out because of bug 862156 player_view = sublist_view.tap_first_song() # play for a short duration play_time = time.strptime('00:03', '%M:%S') Wait(self.marionette).until( lambda m: player_view.player_elapsed_time >= play_time, message='Mp3 sample did not start playing') player_view.tap_forward() self.take_screenshot()
def test_select_album_play(self): """ https://moztrap.mozilla.org/manage/case/3755/ """ music_app = Music(self.marionette) music_app.launch() music_app.wait_for_music_tiles_displayed() # switch to albums view list_view = music_app.tap_albums_tab() # check that albums (at least one) are available albums = list_view.media self.assertGreater(len(albums), 0, "The mp3 file could not be found") # select an album sublist_view = albums[0].tap_first_album() # select play # This wait is timing out because of bug 862156 player_view = sublist_view.tap_play() # play for a short duration play_time = time.strptime("00:03", "%M:%S") self.wait_for_condition( lambda m: player_view.player_elapsed_time >= play_time, timeout=10, message="Mp3 sample did not start playing", ) # validate playback self.assertTrue(player_view.is_player_playing(), "The player is not playing") # select stop player_view.tap_play() # validate stopped playback self.assertFalse(player_view.is_player_playing(), "The player did not stop playing")