def test_361(self): """http://litmus.pculture.org/show_test.cgi?id=361 edit item video to audio. 1. add 3-blip-videos feed 2. download the Joo Joo 3. Edit item from Video to Audio 4. Verify item played as audio item """ reg = MiroRegions() miro = MiroApp() time.sleep(5) url = "http://qa.pculture.org/feeds_test/MixedCats.xml" feed = "MIXED" title = "Tongue" new_type = "Music" old_type = "Video" #Set Global Preferences miro.open_prefs(reg) prefs = PreferencesPanel() general_tab = prefs.open_tab("General") general_tab.show_audio_in_music("on") general_tab.show_videos_in_videos("on") podcasts_tab = prefs.open_tab("Podcasts") podcasts_tab.autodownload_setting("Off") podcasts_tab.close_prefs() #start clean miro.delete_feed(reg, feed) #add feed and download joo joo item miro.add_feed(reg, url,feed) miro.tab_search(reg, title) if reg.m.exists("button_download.png",10): click(reg.m.getLastMatch()) miro.wait_for_item_in_tab(reg, "Videos", item=title) reg.m.find(title) reg.m.click(title) reg.mtb.click("tabsearch_clear.png") miro.edit_item_type(reg, new_type, old_type) #locate item in audio tab and verify playback miro.wait_for_item_in_tab(reg, tab="Music",item=title) reg.m.click(title) type(' ') #use spacebar to start playback self.assertTrue(miro.verify_audio_playback(reg, title)) miro.stop_audio_playback(reg, title) #cleanup miro.delete_feed(reg, feed)
def test_620(self): """http://litmus.pculture.org/show_test.cgi?id=620 dl youtube video and convert. 1. Download youtube video 2. Convert to video formats 3. Verify playback 4. Convert to audio formats 5. Verify playback 6. Cleanup """ reg = MiroRegions() miro = MiroApp() # 1. Download youtube vidoe vid_url = "http://www.youtube.com/watch?v=baJ43ByylbM&feature=fvw" item_title = "Zoom" reg.tl.click("File") reg.tl.click("Download from") time.sleep(4) type(vid_url) time.sleep(2) type("\n") miro.confirm_download_started(reg, item_title) miro.wait_for_item_in_tab(reg, "videos",item_title) if reg.m.exists(item_title,3): miro.log_result("9","test_620 file external download verified.") reg.m.click(item_title) # 2. Convert to audio formats try: aconvertList = ("MP3","Vorbis") for x in aconvertList: miro.convert_file(reg, x) time.sleep(2) miro.click_sidebar_tab(reg, "Converting") miro.wait_conversions_complete(reg, item_title,x) # 3. Verify playback miro.click_sidebar_tab(reg, "music") aplaybackList = ("MP3",) for x in aplaybackList: miro.tab_search(reg, "Converted to "+str(x),False) if reg.m.exists(Pattern("item_play_unplayed.png")): doubleClick(reg.m.getLastMatch()) self.assertTrue(miro.verify_audio_playback(reg, title)) miro.stop_audio_playback(reg, title) else: self.fail("converted item not found") except FindFailed, debugging: self.verificationErrors.append(debugging)