def test_338(self): """http://litmus.pculture.org/show_test.cgi?id=338 delete feed with dl items. Litmus Test Title:: 338 - channels delete a feed with downloads in progress Description: 1. Add the 3-blip-videos feed. Start items downloading 2. Remove the feed and verify downloads are removed. """ #set the search regions reg = MiroRegions() miro = MiroApp() url = "http://pculture.org/feeds_test/3blipvideos.xml" feed = "ThreeBlip" #1. Add the feed and start dl miro.cancel_all_downloads(reg) miro.add_feed(reg, url,feed) miro.download_all_items(reg) time.sleep(2) miro.confirm_download_started(reg, "The Joo") miro.delete_feed(reg, feed) time.sleep(5) if reg.s.exists("Downloading",5): self.fail("Downloading tab still present")
def test_444(self): """http://litmus.pculture.org/show_test.cgi?id=444 external dl errors. 1. http file url to download 2. open with File Download menu 3. Verify download completes 4. Check title display via screenshot """ item_url = "http://www.youtube.com/watch?v=LU-ZQWZSGfc&feature=fvhr" item_title = "watch" reg = MiroRegions() miro = MiroApp() miro.cancel_all_downloads(reg) dl_status = miro.download_from_a_url(reg, item_url, item_title) print dl_status self.assertTrue(dl_status == "failed") miro.quit_miro() miro.restart_miro() miro.click_sidebar_tab(reg, "Downloading") assert reg.m.exists(Pattern("file_not_found.png")) reg.m.click(item_title) type(Key.DELETE) miro.click_sidebar_tab(reg, "Videos") reg.s.waitVanish("Downloading")
def skip_192(self): """http://litmus.pculture.org/show_test.cgi?id=192 file detection dl. 1. Add clearbits.net page as a source 2. click to dl the torrent file 3. Verify file starts to download 4. Cleanup """ site_url = "http://pculture.org/feeds_test/http-direct-downloads.html" site = "HTTP Direct" ## FIX ME - Need new files, can't download from the videolan ftp site anymore HTTPDOWNLOADS = {".mpFour download":"big", ".mpThree download":"gd", ".mFoura download":"luckynight", # ".mpeg download":"mighty", # ".ogv download":"popeye", # ".mov download":"Matrix", # ".wmv download":"WindowsMedia", # ".avi download":"Coyote", # ".mpg download":"dothack2", # ".mkv download 2":"mulitple", # ".ogg download":"gd", # ".wma download":"Bangles", # ".flac download":"luckynight", # ".mka download":"Widow", } setAutoWaitTimeout(20) reg = MiroRegions() miro = MiroApp() miro.add_source(reg, site_url,site) miro.click_source(reg, site) for filetype, title in HTTPDOWNLOADS.iteritems(): try: if reg.m.exists(filetype): click(reg.m.getLastMatch()) else: type(Key.PAGE_DOWN) reg.m.find(filetype) click(reg.m.getLastMatch()) if miro.confirm_download_started(reg, title) == "failed": self.verificationErrors.append("download failed for imagetype" +str(filetype)) else: reg.mtb.click("download-cancel.png") miro.click_source(reg, site) except: self.verificationErrors.append("download failed for imagetype" +str(filetype)) finally: type(Key.ESC) #Close any lingering dialogs miro.cancel_all_downloads(reg) miro.delete_site(reg, site)
def test_364(self): """http://litmus.pculture.org/show_test.cgi?id=364 edit item misc to video 1. Download item that lands in Misc 2. Edit type to video 3. start playback and verify play external dialog 4. cleanup """ reg = MiroRegions() miro = MiroApp() time.sleep(5) url = "http://vimeo.com/moogaloop_local.swf?clip_id=7335370&server=vimeo.com" title = "local" #Set Global Preferences miro.open_prefs(reg) prefs = PreferencesPanel() general_tab = prefs.open_tab("General") general_tab.show_videos_in_videos("on") general_tab.close_prefs() miro.cancel_all_downloads(reg) reg.tl.click("File") reg.tl.click("Download from") time.sleep(4) type(url) time.sleep(10) type("\n") if reg.s.exists("Downloading"): print "item dl started" reg.s.waitVanish("Downloading",120) time.sleep(5) miro.wait_for_item_in_tab(reg, tab="Misc",item=title) x = reg.m.find(title) click(x) reg.s.find("Music") tmpr = Region(reg.s.getLastMatch().above()) tmpr.setW(tmpr.getW()+80) tmpr.setX(tmpr.getX()-20) y = tmpr.find("Videos") dragDrop(x,y) #locate item in video tab and verify playback click(y) if reg.m.exists(title): doubleClick(reg.m.getLastMatch()) miro.verify_video_playback(reg) miro.delete_items(reg, title,"Videos") else: miro.delete_items(reg, title,"Videos") self.fail("item not found in videos tab")
def test_16456_674(self): """http://litmus.pculture.org/show_test.cgi?id=674 https url download. 1. http file url to download 2. open with File Download menu 3. Verify download completes 4. Check title display via screenshot """ item_url = "https://www.youtube.com/watch?v=pOle1AnPOc4" item_title = "Charlie" item_image = "charlie_bit_me.png" reg = MiroRegions() miro = MiroApp() miro.cancel_all_downloads(reg) miro.download_from_a_url(reg, item_url, item_title) assert download_playback_check_title(reg, miro, item_title, item_image)
def test_youtube_9(self): """http://litmus.pculture.org/show_test.cgi?id=9 external dl youtube. 1. http file url to download 2. open with File Download menu 3. Verify download completes 4. Check title display via screenshot """ item_url = "http://www.youtube.com/watch?v=5pB3gAjivrY" item_title = "Andrew" item_image = "andrew_garcia_straight_up.png" reg = MiroRegions() miro = MiroApp() miro.cancel_all_downloads(reg) miro.download_from_a_url(reg, item_url, item_title) assert download_playback_check_title(reg, miro, item_title, item_image)
def test_9(self): """http://litmus.pculture.org/show_test.cgi?id=9 external dl. 1. http file url to download 2. open with File Download menu 3. Verify download completes 4. Check title display via screenshot """ item_url = "http://j2.video2.blip.tv/7790005512538/Miropcf-TurnASearchIntoAChannel756.mp4" item_title = "Miropcf" item_image = "Miropcf_TurnASearch.png" reg = MiroRegions() miro = MiroApp() miro.cancel_all_downloads(reg) miro.download_from_a_url(reg, item_url, item_title) assert download_playback_check_title(reg, miro, item_title, item_image)
def test_13827_633(self): """http://litmus.pculture.org/show_test.cgi?id=633 503 error retry. 1. 503 error file url download 2. open with File Download menu 3. Verify error message are displayed with retry option """ url = "http://pculture.org/feeds_test/503.php" reg = MiroRegions() miro = MiroApp() miro.cancel_all_downloads(reg) reg.tl.click("File") reg.tl.click("Download from") time.sleep(3) type(url+"\n") for x in range(0,2): time.sleep(3) find(Pattern("retry_dialog.png").similar(0.5)) type(Key.ENTER) type(Key.ESC)
def test_193(self): """http://litmus.pculture.org/show_test.cgi?id=193 torrent direct dl. 1. Add clearbits.net page as a source 2. click to dl the torrent file 3. Verify file starts to download 4. Cleanup """ site_url = "http://www.clearbits.net/torrents/662-here-be-dragons-ipod" site = "ClearBits" title = "Dragons" reg = MiroRegions() miro = MiroApp() miro.cancel_all_downloads(reg) miro.add_source(reg, site_url,site) miro.click_source(reg, site) reg.m.click("Torrent file") miro.confirm_download_started(reg, title) miro.cancel_all_downloads(reg) miro.delete_site(reg, site)