def test_458(self): """http://litmus.pculture.org/show_test.cgi?id=458 edit blank item description 1. add TwoStupid feed 2. download the Flip Faceitem 3. Edit item description 4. Cleanup """ reg = mirolib.AppRegions() time.sleep(5) url = "http://pculture.org/feeds_test/2stupidvideos.xml" feed = "TwoStupid" title = "Flip" # item title updates when download completes #add feed and download flip face item mirolib.add_feed(self,reg,url,feed) mirolib.toggle_normal(reg) mirolib.tab_search(self,reg,title) if reg.m.exists("button_download.png",10): click(reg.m.getLastMatch()) mirolib.wait_for_item_in_tab(self,reg,"Videos",item=title) reg.m.click(title) mirolib.edit_item_metadata(self,reg,meta_field="about",meta_value="Blank description edited") mirolib.tab_search(self,reg,"blank description") if reg.m.exists(title): mirolib.log_result("656","test_458") else: mirolib.log_result("656","test_458",status="fail") #cleanup mirolib.delete_feed(self,reg,feed)
def test_363(self): """http://litmus.pculture.org/show_test.cgi?id=363 edit item metadata 1. add Static List feed 2. download the Earth Eats item 3. Edit item metadata 4. Verify item played as audio item """ reg = mirolib.AppRegions() time.sleep(5) url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml" feed = "Static" term = "Earth Eats" title = "Mushroom" # item title updates when download completes new_type = "Video" #Set Global Preferences prefs.set_item_display(self,reg,option="audio",setting="on") time.sleep(2) mirolib.delete_feed(self,reg,feed) #add feed and download earth eats item mirolib.add_feed(self,reg,url,feed) mirolib.toggle_normal(reg) mirolib.tab_search(self,reg,title=term) if reg.m.exists("button_download.png",10): click(reg.m.getLastMatch()) mirolib.wait_for_item_in_tab(self,reg,"Music",item=title) reg.m.click(title) mirolib.edit_item_metadata(self,reg,meta_field="about",meta_value="hoovercraft full of eels") mirolib.tab_search(self,reg,"hoovercraft eels") if not reg.m.exists(title): self.fail("can not verify description edited") mirolib.delete_feed(self,reg,feed)
def test_653(self): """http://litmus.pculture.org/show_test.cgi?id=653 edit album art 1. add watched folder 2. Edit artwork for 1 item 3. Edit artwork for multiple items 4. Cleanup """ reg = mirolib.AppRegions() time.sleep(5) folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","ArtTest") title = "Pancakes" title2 = "summer" title3="deerhunter" #1. add watched folder mirolib.add_watched_folder(self,reg,folder_path) if reg.s.exists("ArtTest"): click(reg.s.getLastMatch()) mirolib.log_result("157","test_653") art_file = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","album_art1.jpg") #add feed and download flip face item mirolib.toggle_normal(reg) mirolib.tab_search(self,reg,title) try: reg.m.click(title) mirolib.edit_item_metadata(self,reg,meta_field="art",meta_value=art_file) ## Verify new image here: reg.m.find(Pattern("album_art1.png")) finally: prefs.remove_watched_folder(self,reg,folder=folder_path)
def test_728(self): """http://litmus.pculture.org/show_test.cgi?id=728 edit metadata for mulitple items 1. add Static List feed 2. download the Earth Eats item 3. Edit item metadata """ reg = mirolib.AppRegions() time.sleep(5) url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml" feed = "Static" term = "Earth Eats" title = "Mushroom" # item title updates when download completes new_type = "Video" edit_itemlist = [["name","Earth Day Everyday", "647"], ["artist","Oliver and Katerina", "648"], ["album","Barki Barks", "649"], ["genre","family", "650"], ["rating","5", "651"], ["year","2010","655"], ["track_num","1", "673"], ["track_of","2", "673"], ] #start clean mirolib.delete_feed(self,reg,feed) #add feed and download earth eats item mirolib.add_feed(self,reg,url,feed) mirolib.toggle_normal(reg) mirolib.tab_search(self,reg,term) if reg.m.exists("button_download.png",10): click(reg.m.getLastMatch()) mirolib.wait_for_item_in_tab(self,reg,"Music",item=title) reg.m.click(title) for x in edit_itemlist: mirolib.edit_item_metadata(self,reg,meta_field=x[0],meta_value=x[1]) mirolib.log_result(x[2],"test_647") time.sleep(2) if not mirolib.tab_search(self,reg,"Earth Day",confirm_present=True) == True: self.fail("new title not saved") #cleanup mirolib.delete_feed(self,reg,feed)