def test_112(self): """http://litmus.pculture.org/show_test.cgi?id=112 download errors 1. Add feed 2. Download All 3. Verify error messages """ reg = MiroRegions() miro = MiroApp() feed_url = "http://participatoryculture.org/feeds_test/feed13.rss" feed_name = "Feed" error_types = {"Server Closes Connection": "no_connection.png", "File not found": "file_not_found.png", "503 Error": "no_connection.png", "Host not found": "unknown_host.png", "HTTP error": "http_error.png", "Timeout error": "no_connection.png", } miro.add_feed(reg, feed_url, feed_name) miro.set_podcast_autodownload(reg, setting="All") time.sleep(10) for error, image in error_types.iteritems(): miro.tab_search(reg, error) assert reg.m.exists(Pattern(image).similar(0.6),60) miro.delete_feed(reg, feed_name)
def test_24(self): """http://litmus.pculture.org/show_test.cgi?id=24 edit remembered search. 1. Add 2-stupid-videos feed 2. Perform a search 3. Type in search box the delete key 4. Cleanup """ reg = MiroRegions() miro = MiroApp() url = "http://pculture.org/feeds_test/2stupidvideos.xml" feed = "TWO STUPID" term = "Face" title = "Flip" #1. add feed miro.add_feed(reg, url,feed) miro.set_podcast_autodownload(reg, setting="All") #2. search miro.tab_search(reg, term) self.assertTrue(reg.m.exists(title)) url2 = "http://pculture.org/feeds_test/list-of-guide-feeds.xml" feed2 = "Static" term2 = "FilmWeek" miro.add_feed(reg, url2,feed2) miro.tab_search(reg, "Brooklyn") miro.wait_for_item_in_tab(reg, "Videos",title) reg.m.click(title) type(Key.ENTER) time.sleep(2) type(" ") self.assertTrue(exists("playback_controls.png")) miro.shortcut("d") reg.s.click(feed2) self.assertTrue(reg.mtb.exists("BROOKLYN")) miro.tab_search(reg, term2) reg.mtb.click("button_save_as_podcast.png") miro.click_last_podcast(reg) miro.tab_search(reg, term2,confirm_present=True) miro.clear_search(reg) time.sleep(3) if not reg.mtb.exists(term2.upper()): miro.log_result("324","test_24",status="pass") #4. cleanup miro.delete_feed(reg, "stupid") miro.click_last_podcast(reg) miro.delete_current_selection(reg) miro.delete_feed(reg, "Static List")
def test_108(self): """http://litmus.pculture.org/show_test.cgi?id=108 playback through unplayed items. 1. add a feed url feed of small items 2. download a few items 3. verify unplayed - playback through list 4. verify marked as unplayed. """ url_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","ShortCats.xml") url = "file:///"+url_path feed = "Short Cats" ## url = "http://qa.pculture.org/feeds_test/2stupidvideos.xml" ## feed = "TWO STUPID" reg = MiroRegions() miro = MiroApp() #Set Global Preferences miro.open_prefs(reg) prefs = PreferencesPanel() playback_tab = prefs.open_tab("Playback") playback_tab.play_continuous("on", "Podcast") playback_tab.close_prefs() miro.add_feed(reg, url, feed) miro.set_podcast_autodownload(reg, setting="All") time.sleep(15) miro.set_podcast_autodownload(reg, setting="Off") if reg.s.exists("Downloading"): reg.s.waitVanish("Downloading") miro.click_sidebar_tab(reg, "Videos") miro.toggle_normal(reg) reg.m.wait("item_play_unplayed.png") if reg.m.exists("item_play_unplayed.png"): find(Pattern("sort_name_normal.png")) doubleClick(getLastMatch().below(100)) wait(Pattern("playback_bar_video.png"),15) else: self.fail("no unplayed badges found") if exists(Pattern("playback_bar_video.png")): print "playback started" time.sleep(60) waitVanish(Pattern("playback_bar_video.png")) if reg.m.exists("item_play_unplayed.png"): self.fail("items not marked as unplayed")
def test_339(self): """http://litmus.pculture.org/show_test.cgi?id=339 delete feed with dl items. Litmus Test Title:: 339 - channels delete a feed with downloaded items Description: 1. Add the 2-stupid-videos feed, and download both items in the feed. 2. Remove Feed and Keep the videos. 3. Verify videos are displayed in the non-feed section of the Library 4. Cleanup """ #set the search regions reg = MiroRegions() miro = MiroApp() url = "http://pculture.org/feeds_test/2stupidvideos.xml" feed = "TWO STUPID" #1. Add the feed and start dl miro.add_feed(reg, url,feed) time.sleep(3) miro.toggle_normal(reg) # miro.count_images(reg, "item-context-button.png",region="mainright",num_expected=2) miro.set_podcast_autodownload(reg, setting="All") miro.wait_for_item_in_tab(reg, "videos","Flip") miro.wait_for_item_in_tab(reg, "videos","Dinosaur") miro.click_podcast(reg, feed) type(Key.DELETE) miro.remove_confirm(reg, action="keep") miro.click_sidebar_tab(reg, "videos") miro.tab_search(reg, "Flip",confirm_present=True) miro.tab_search(reg, "Dinosaur",confirm_present=True) #4. cleanup miro.delete_items(reg, "Flip","videos") miro.delete_items(reg, "Dinosaur","videos")