Exemple #1
0
    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)
Exemple #2
0
    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
        """

    	setAutoWaitTimeout(testvars.timeout)   
        #set the search regions
    	reg = mirolib.AppRegions()

    	url = "http://pculture.org/feeds_test/2stupidvideos.xml"
    	feed = "TwoStupid"

    	#1. Add the feed and start dl
    	mirolib.add_feed(self,reg,url,feed)
    	time.sleep(3)
    	mirolib.toggle_normal(reg)
#    	mirolib.count_images(self,reg, "item-context-button.png",region="mainright",num_expected=2)
    	mirolib.set_podcast_autodownload(self,reg,setting="All")
    	mirolib.wait_for_item_in_tab(self,reg,"videos","Flip")
    	mirolib.wait_for_item_in_tab(self,reg,"videos","Dinosaur")
    	mirolib.click_podcast(self,reg,feed)
    	type(Key.DELETE)
    	mirolib.remove_confirm(self,reg,action="keep")
    	mirolib.click_sidebar_tab(self,reg,"videos")
    	mirolib.tab_search(self,reg,"Flip",confirm_present=True)
    	mirolib.tab_search(self,reg,"Dinosaur",confirm_present=True)
    	#4. cleanup
    	mirolib.delete_items(self,reg,"Flip","videos")
    	mirolib.delete_items(self,reg,"Dinosaur","videos")
Exemple #3
0
    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)
Exemple #4
0
    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)
Exemple #5
0
    def test_117(self):
        """http://litmus.pculture.org/show_test.cgi?id=117 delete multiple feeds then cancel.

        Litmus Test Title:: 117 - delete multiple feeds then cancel
        Description: 
        1. Add several feeds from list of guide feeds
        2. Select them all
        3. Delete, the cancel the delete
        4. Cleanup
        """
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        reg = mirolib.AppRegions()      
        prefs.set_autodownload(self,reg,setting="Off")
        prefs.set_default_view(self,reg,setting="Standard")

        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        feedlist = ["Center", "Earth"]

        #1. Add the feed and start dl
        mirolib.add_feed(self,reg,url,feed)
        for f in feedlist:
            mirolib.tab_search(self,reg,f)
            self.assertTrue(reg.m.exists("Add this"))
            reg.m.click("Add this")
            time.sleep(4)
        mirolib.tab_search(self,reg,"")
        mirolib.toggle_normal(reg)

        p = mirolib.get_podcasts_region(reg)
        mirolib.click_sidebar_tab(self,reg,"Music")
        mirolib.click_podcast(self,reg,feed)            
        #2. Select them all
       
        keyDown(Key.SHIFT)  
        for x in feedlist:
            if p.exists(x):
                p.click(x)
            else:
                print "could not find feed" +str(x)
            time.sleep(2)
        keyUp(Key.SHIFT)
        #3. Delete then cancel.  Verify still exists Static List
        if reg.m.exists("Delete",4) or reg.m.exists("button_mv_delete_all.png",4):
            click(reg.m.getLastMatch())
        else:
            self.fail("Can't find Delete All button in main view")
        mirolib.remove_confirm(self,reg,"cancel")
        p = mirolib.get_podcasts_region(reg)
        time.sleep(5)
        self.assertTrue(p.exists("Static",5))
        #4. Cleanup
        feedlist.append("Static")
        for x in feedlist:
            print x
            mirolib.delete_feed(self,reg,x)
Exemple #6
0
    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)
Exemple #7
0
    def test_657(self):
        """http://litmus.pculture.org/show_test.cgi?id=657 edit multiple fields

        1. add Static List feed
        2. download the Earth Eats item
        3. Edit item metadata
       

        """
        reg = mirolib.AppRegions()
        time.sleep(5)
        url = "http://ringtales.com/nyrss.xml"
        feed = "The New"
        title = "Cat" 

        new_metadata_list = [["show","Animated Cartoons", "658"],
                      ["episode_id","nya", "670"],
                      ["season_no","25", "671"],
                      ["episode_no","43", "672"],
                      ["video_kind","Clip", "652"],
                      ]
        
        #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,title)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())
        mirolib.wait_for_item_in_tab(self,reg,"Videos",item=title)
        mirolib.click_podcast(self,reg,feed)
        reg.m.click(title)
        mirolib.edit_item_video_metadata_bulk(self,reg,new_metadata_list)
        time.sleep(2)
        mirolib.click_sidebar_tab(self,reg,"Videos")
        mirolib.tab_search(self,reg,title)
        reg.mtb.click("Clip")
        if reg.m.exists(title):
            reg.mtb.click("All")
        else:
            self.fail("item not found in Clips filter")
        #cleanup
        mirolib.delete_feed(self,reg,feed)
Exemple #8
0
    def test_441(self):
        """http://litmus.pculture.org/show_test.cgi?id=441 delete podcast item outside of miro

        1. add TwoStupid feed
        2. download the Flip Faceitem
        3. restart miro
        4. delete the item
        5. restart miro
        6. verify item still deleted
        """
        reg = mirolib.AppRegions()
        remember = False
        try:
            prefs.set_preference_checkbox(self,reg,tab="General",option="When starting",setting="on")
            remember = True
        except:
            remember = False
            type(Key.ESC) #close the dialog if it didn't work
        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,tab="Videos",item=title)
        mirolib.click_podcast(self,reg,feed)
        mirolib.tab_search(self,reg,title)
        reg.m.click(title)     
        filepath = mirolib.store_item_path(self,reg)
        if os.path.exists(filepath):
            print "able to verify on os level"
            found_file = True
        mirolib.quit_miro(self,reg)
        mirolib.restart_miro()
        if remember == True and reg.m.exists("title",15):  #check the remember last tab setting
            mirolib.log_result("698","test_441")
        else:
            mirolib.click_podcast(self,reg,feed)
        mirolib.tab_search(self,reg,title)
        reg.m.click(title)
        type(Key.DELETE)

        if found_file == True:
            if os.path.exists(filepath):
                self.fail("file not deleted from filesystem")
        else:
            mirolib.quit_miro(self,reg)
            mirolib.restart_miro()
            mirolib.click_podcast(self,reg,feed)
            mirolib.tab_search(self,reg,term)
            if not reg.m.exists(Pattern("button_download.png")):
                self.fail("no download button, file not deleted")
            else:
                reg.m.click(Pattern("button_download.png"))
            if mirolib.confirm_download_started(self,reg,title) != "in_progress":
                self.fail("item not properely deleted")    
        #cleanup
        mirolib.delete_feed(self,reg,feed)