Пример #1
0
    def test_726(self):
        """http://litmus.pculture.org/show_test.cgi?id=726 Feed with gzipped enclosures.

        1. Add feeds
        2. verify items are displayed
        3. Verify items are downloadable
        4. Cleanup

        """
        reg = mirolib.AppRegions()

        ZIPPED_FEEDS = [
            #["http://podcastle.org/feed/rss2","PodCastle",],
            ["http://escapepod.org/feed/","Escape","EP"],
            ["http://pseudopod.org/feed/rss2","Pseudopod","Pseudopod"],
            ]
        for url,feed,item_id in ZIPPED_FEEDS:
           #1. add feed
            mirolib.add_feed(self,reg,url,feed)
            #2 verify items displayed
            if reg.m.exists(Pattern("button_download.png"),3):
                click(reg.m.getLastMatch())
            else:
                self.fail("download button not found, no items displayed?")
            #3. verify download started
            status = mirolib.confirm_download_started(self,reg,item_id)
            if status == "in_progress":
                mirolib.log_result("726","verified for feed: "+feed)
            else:
                self.verificationErrors.append("failed for feed: "+feed)
            #4. Cleanup
            mirolib.delete_feed(self,reg,feed)
Пример #2
0
    def test_74(self):
        """http://litmus.pculture.org/show_test.cgi?id=74 Feed search, saved search feed

        1. Add feed1, RSS 2.0 with Yahoo enclosures
        2. Perform a search and save it.
        3. Verify Search saved
        4. Cleanup

        """
        reg = mirolib.AppRegions()
        
        url = "http://pculture.org/feeds_test/feed1.rss"
        feed = "Yah"
        term = "first test video"
        title = "Video"
       
        
        #1. add feed
        mirolib.add_feed(self,reg,url,feed)
        #2. search
        mirolib.tab_search(self,reg,term)
        #3. verify item metadata
        self.assertTrue(reg.m.exists(title))
        self.assertTrue(reg.m.exists("This is"))
        self.assertTrue(reg.m.exists("mike_tv.png"))
    
        #4. cleanup
        mirolib.delete_feed(self,reg,feed)
Пример #3
0
    def test_213(self):
        """http://litmus.pculture.org/show_test.cgi?id=213 Feed search, delete key.

        1. Add 2-stupid-videos feed
        2. Perform a search
        3. Type in search box the delete key 
        4. Cleanup

        """
        reg = mirolib.AppRegions()
        
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TwoStupid"
        title = "Flip Face"
        term = "dinosaur"
        
        #1. add feed
        mirolib.add_feed(self,reg,url,feed)
        #2. search
        mirolib.tab_search(self,reg,term)
        self.assertFalse(reg.m.exists("Flip",5))
        reg.mtb.click(term.upper())
        for x in range(0,8):
            type(Key.LEFT)
        
        for x in range(0,8):
            type(Key.DELETE)

        self.assertTrue(reg.m.exists("Flip"))
        #4. cleanup
        mirolib.delete_feed(self,reg,"TwoStupid")
Пример #4
0
    def test_73(self):
        """http://litmus.pculture.org/show_test.cgi?id=73 Feed with Yahoo and RSS enclosures.

        1. Feed 3
        2. Verify Metadata
        3. Cleanup

        """
        try:
            reg = mirolib.AppRegions()
            url = "http://pculture.org/feeds_test/feed3.rss"
            feed = "RSS 2"
            term = "first test video"
            title = "Video 1"
            
            #1. add feed
            mirolib.add_feed(self,reg,url,feed)
            #2. search
            mirolib.tab_search(self,reg,term)
            
            #3. verify item metadata
            self.assertTrue(reg.m.exists(title))
            self.assertTrue(reg.m.exists("This is"))
            self.assertTrue(reg.m.exists("mike_tv.png"))
       
        finally:#cleanup
            mirolib.delete_feed(self,reg,feed)
Пример #5
0
    def test_60(self):
        """http://litmus.pculture.org/show_test.cgi?id=60  Feed with no enclosures.

        1. Feed 3
        2. Verify Metadata
        3. Cleanup

        """
        reg = mirolib.AppRegions()        
        
        #1. add feed
        url = "http://pculture.org/feeds_test/no-enclosures.rss"
        feed = "Yah"
        term = "first test video"
        title = "Video 1"
        
        #1. add feed
        mirolib.add_feed(self,reg,url,feed)
        #2. search
        
        #3. verify item metadata
        self.assertTrue(reg.m.exists(title))
        self.assertTrue(reg.m.exists("This is")) #Description text

        mirolib.tab_search(self,reg,"Video 2",confirm_present=False)
        if reg.m.exists("second test",1):
            self.fail("video 2 found")
        #cleanup
        mirolib.delete_feed(self,reg,feed)
Пример #6
0
    def test_214(self):
        """http://litmus.pculture.org/show_test.cgi?id=214 Feed search, search with spaces

        1. Add 3 blip videos feed
        2. Perform a search with spaces
        3. Verify Search saved
        4. Cleanup

        """
        reg = mirolib.AppRegions()
        
        url = "http://pculture.org/feeds_test/3blipvideos.xml"
        feed = "ThreeBlip"
        term = "strange creature"
        title = "Joo Joo"
        
        #1. add feed
        mirolib.add_feed(self,reg,url,feed)
        #2. search
        mirolib.tab_search(self,reg,term)
        reg.mtb.click("button_save_as_podcast.png")
        #3. verify search saved
        mirolib.click_last_podcast(self,reg)
        mirolib.tab_search(self,reg,term,confirm_present=True)
        
        #4. cleanup
        mirolib.click_remove_podcast(self,reg)
        mirolib.remove_confirm(self,reg,action="remove")
        mirolib.delete_feed(self,reg,"blip")
Пример #7
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)
Пример #8
0
    def test_7(self):
        """http://litmus.pculture.org/show_test.cgi?id=7 add feed.

        1. Open Ryan is Hungry
        2. click one-click link
        3. Verify feed added
        4. Cleanup
        """
        
        reg = mirolib.AppRegions()
        feed = "Ryan"
        try:
            url = "http://ryanishungry.com/subscribe/"
            switchApp(mirolib.open_ff())
            if reg.t.exists("Firefox",45):
                click(reg.t.getLastMatch())
            mirolib.shortcut("l")
            time.sleep(2)
            type(url + "\n")
            time.sleep(20)
            find(testvars.one_click_badge)
            click(testvars.one_click_badge)
            time.sleep(25)
            mirolib.close_ff()
                        
            #Start Miro    
            mirolib.close_one_click_confirm(self)
            mirolib.shortcut("r",shift=True)
            mirolib.click_podcast(self,reg,feed)
        finally:
            mirolib.delete_feed(self,reg,feed)
Пример #9
0
    def test_215(self):
        """http://litmus.pculture.org/show_test.cgi?id=215 Feed search, saved search feed

        1. Add list of guide feeds (Static List)
        2. Perform a search and save it.
        3. Verify Search saved
        4. Cleanup

        """
        reg = mirolib.AppRegions()
        
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Gimp"
        title = "GimpKnowHow"
        
        #1. add feed
        mirolib.add_feed(self,reg,url,feed)
        #2. search
        mirolib.tab_search(self,reg,term)
        reg.mtb.click("button_save_as_podcast.png")
        #3. verify search saved
        mirolib.click_last_podcast(self,reg)
        #4. cleanup
        type(Key.DELETE)
        #Last chance to verify Gimp is the saved search feed.
        self.assertTrue(reg.m.exists("GIMP"),5)
        mirolib.remove_confirm(self,reg,action="remove")
        mirolib.delete_feed(self,reg,"Static List")
        mirolib.handle_crash_dialog(self,db=False,test=False)
Пример #10
0
    def test_6(self):
        """http://litmus.pculture.org/show_test.cgi?id=6 add feed from MiroGuide.

        1. Open Miro
        2. search for a feed and add it.
        3. Verify feed added
        4. Cleanup
        """
        setAutoWaitTimeout(60)
        pass
        
        #set the search regions
        reg = mirolib.AppRegions()
        feed = "StupidVideos"
 
        try:
            mirolib.click_sidebar_tab(self,reg,"Miro")
            time.sleep(5)
            gr = Region(reg.mtb)
            gr.setH(300)
            gr.click(Pattern("guide_search.png"))
            type("StupidVideos\n")
            time.sleep(5)
            reg.m.find(Pattern("add_feed.png"))
            click(reg.m.getLastMatch())
            time.sleep(5)
            mirolib.click_podcast(self,reg,feed)
                        
        finally:
            #4. cleanup
            mirolib.delete_feed(self,reg,"StupidVideos") 
Пример #11
0
    def test_720(self):
        """http://litmus.pculture.org/show_test.cgi?id=720 Menu New Search Feed.

        1. Add list of guide feeds (Static List)
        2. From Sidebar -> New Search feed, create saved search channel
        3. Verify Search saved
        4. Cleanup

        """
        reg = mirolib.AppRegions()
        
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Voice"
        dummy_feed_url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        
        #1. add feed
        mirolib.add_feed(self,reg,dummy_feed_url,"TwoStupid")
        mirolib.add_feed(self,reg,url,feed)
        mirolib.tab_search(self,reg,term)
        #2. search
        mirolib.new_search_feed(self,reg,term,radio="Podcast", source=feed,defaults=True)
                        
        #3. verify search saved
        mirolib.click_last_podcast(self,reg)
        self.assertTrue(reg.m.exists(term))
        
        #4. cleanup
        mirolib.click_remove_podcast(self,reg)
        mirolib.remove_confirm(self,reg,action="remove")
        mirolib.delete_feed(self,reg,"Static List")
Пример #12
0
    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.
        """

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

        url = "http://pculture.org/feeds_test/3blipvideos.xml"
        feed = "ThreeBlip"

        #1. Add the feed and start dl
        mirolib.cancel_all_downloads(self,reg)
        mirolib.add_feed(self,reg,url,feed)
        mirolib.download_all_items(self,reg)
        time.sleep(2)
        mirolib.confirm_download_started(self,reg,"The Joo")
        mirolib.delete_feed(self,reg,feed)
        time.sleep(5)
        if reg.s.exists("Downloading",5):
            self.fail("Downloading tab still present")
Пример #13
0
    def test_23(self):
        """http://litmus.pculture.org/show_test.cgi?id=23 remember search.

        1. Add 2-stupid-videos feed
        2. Perform a search
        3. Type in search box the delete key 
        4. Cleanup

        """
        reg = mirolib.AppRegions()
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TwoStupid"
        term = "House"
        title = "Dinosaur"
        
        #1. add feed
        mirolib.add_feed(self,reg,url,feed)
        #2. search
        mirolib.tab_search(self,reg,term)
        self.assertTrue(reg.m.exists(title))
        self.assertFalse(reg.m.exists("Flip"))
        mirolib.click_sidebar_tab(self,reg,"Videos")
        reg.s.click(feed)
        self.assertTrue(reg.mtb.exists(term.upper()))
        self.assertTrue(reg.m.exists(title))
        self.assertFalse(reg.m.exists("Flip"))
        #4. cleanup
        mirolib.delete_feed(self,reg,"stupid")
Пример #14
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)
Пример #15
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)
Пример #16
0
 def _delete_feed_folder(self):
     folder_name = "My Folder"
     mirolib.shortcut("n",shift=True)
     if reg.m.exists("Folder",3):
      mirolib.log_result("98","test_92")
     time.sleep(2)
     type(folder_name+"\n")
     time.sleep(4)
     mirolib.delete_feed(self,reg,feed=folder_name)
     mirolib.log_result("92","delte feed folder")
Пример #17
0
    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 = mirolib.AppRegions()
        
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TwoStupid"
        term = "Face"
        title = "Flip"
        
        #1. add feed
        mirolib.add_feed(self,reg,url,feed)
        mirolib.set_podcast_autodownload(self,reg,setting="All")
        #2. search
        mirolib.tab_search(self,reg,term)
        self.assertTrue(reg.m.exists(title))

        url2 = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed2 = "Static"
        term2 = "FilmWeek"
        mirolib.add_feed(self,reg,url2,feed2)
        mirolib.tab_search(self,reg,"Brooklyn")
        mirolib.wait_for_item_in_tab(self,reg,"Videos",title)
        reg.m.click(title)
        type(Key.ENTER)
        time.sleep(2)
        type(" ")
        self.assertTrue(exists(Pattern("playback_controls.png")))
        mirolib.shortcut("d")

        reg.s.click(feed2)
        self.assertTrue(reg.mtb.exists("BROOKLYN"))
        mirolib.tab_search(self,reg,term2)
        reg.mtb.click("button_save_as_podcast.png")

        mirolib.click_last_podcast(self,reg)
        mirolib.tab_search(self,reg,term2,confirm_present=True)
        mirolib.clear_search(reg)
        if reg.mtb.exists(term2.upper()):
            mirolib.log_result("324","test_24",status="fail")
        else:
            mirolib.log_result("324","test_24")
        

        #4. cleanup
        mirolib.delete_feed(self,reg,"stupid")
        mirolib.click_last_podcast(self,reg)
        mirolib.delete_current_selection(self,reg)
        mirolib.delete_feed(self,reg,"Static List")
Пример #18
0
    def test_725(self):
        """http://litmus.pculture.org/show_test.cgi?id=725 item click actions, list view.

        1. add 3-blip-videos feed
        2. download the Joo Joo
        3. verify varios item click scenerios

        """
        reg = mirolib.AppRegions()
        time.sleep(5)
        url = "http://pculture.org/feeds_test/3blipvideos.xml"
        feed = "ThreeBlip"
        title1 = "The Joo"
        title2 = "York"
        title3 = "Accessing"
        mirolib.delete_feed(self,reg,feed)
        prefs.set_autodownload(self,reg,setting="Off")
        prefs.set_default_view(self,reg,setting="List")
        time.sleep(2)      
        #add feed and download joo joo item
        mirolib.add_feed(self,reg,url,feed)
        mirolib.tab_search(self,reg,title1)
        #double-click starts download
        reg.m.find(title1)
        title_loc = reg.m.getLastMatch()
        doubleClick(title_loc)
        if reg.m.exists("video-download-pause.png"):
            mirolib.log_result("122","list view double-click starts download")
        else:
            self.fail("list view double-click starts download, failed")
        #double-click pauses download
        doubleClick(title_loc)
        if reg.m.exists("video-download-resume.png"):
            mirolib.log_result("122","list view double-click pauses download")
        else:
            self.fail("list view double-click pause download, failed")
        #double-click resumes download
        doubleClick(title_loc)
        if exists("video-download-pause.png"):
            mirolib.log_result("122","list view double-click resumes download")
        else:
            self.fail("list view double-click resume download, failed")
        #double-click starts playback
        mirolib.wait_for_item_in_tab(self,reg,tab="Videos",item=title1)
        mirolib.click_podcast(self,reg,feed)
        mirolib.tab_search(self,reg,title1)
        doubleClick(title1)
        if exists(Pattern("playback_bar_video.png")):
            mirolib.log_result("122","list view double-click starts playback")
        else:
            self.fail("list view double-click start playback, failed")
        mirolib.verify_video_playback(self,reg)
        #cleanup
        mirolib.delete_feed(self,reg,feed)
Пример #19
0
 def _delete_feed(self):
     feed_url = "stupidvideos.com/rss/rss.php?chart=new&format=yahoo"
     feed = "StupidVid"
     mirolib.shortcut("n")
     if reg.m.exists("URL",3):
         mirolib.log_result("97","test_92")
     time.sleep(2)
     type(feed_url+"\n")
     time.sleep(4)
     mirolib.delete_feed(self,reg,feed)
     mirolib.log_result("92","delte feed shortcut verified")
Пример #20
0
    def test_75(self):
        """http://litmus.pculture.org/show_test.cgi?id=75 Absolute and relative links.
        1. Feed 1
        2. View videos 3
        3. Click the links and verify they are opened
        4. Cleanup

        """
        try:
            reg = mirolib.AppRegions()
            
            #1. add feed
            url = "http://pculture.org/feeds_test/feed1.rss"
            feed = "Yah"
            term = "third test video"
            title = "Video 3"
            
            #1. add feed
            mirolib.add_feed(self,reg,url,feed)
            #2. search
            mirolib.tab_search(self,reg,term)
            
            #3. verify item metadata
            self.assertTrue(reg.m.exists(title))
            #verify the links
            LINKS = {"absolute link": "google", "relative link": "appcast","another relative": "pculture" }
            for link, linkurl in LINKS.iteritems():
                if reg.m.exists(link):
                    click(reg.m.getLastMatch())
                    time.sleep(15)
                    mirolib.shortcut("l")
                    time.sleep(2)
                    mirolib.shortcut("c")
                    time.sleep(2)
                    url = Env.getClipboard()
                    print url
                    mirolib.close_ff()
                    baseurl = urlsplit(url).netloc
                    if link == "relative link":  
                        if linkurl not in baseurl.split('.'):
                            reg.s.find("Democracy")
                        else:
                            self.fail("wrong link url")
                    else:
                        url_parts = baseurl.split('.')
                        self.failUnless(linkurl in url_parts)            
        #cleanup
        finally:
            mirolib.close_ff()
            mirolib.delete_feed(self,reg,feed)
Пример #21
0
    def test_123(self):
        """http://litmus.pculture.org/show_test.cgi?id=123 add feed more than once.

        Litmus Test Title:: 123 - add a channel more than once  
        Description: 
         1. Add a channel from the Miro Guide.  
         2. Copy the URL and use the Add Feed dialog to add it.  
         3. Verify feed not duplicated.
         4. Cleanup
        """       
        #set the search regions
        reg = mirolib.AppRegions()
        feed = "EEVblog"
        feed2 = "TED"
        mirolib.click_sidebar_tab(self,reg,"Miro")
        gr = Region(reg.mtb)
        gr.setH(300)
        gr.click(Pattern("guide_search.png"))
        type(feed2 +"\n")
        time.sleep(5)
        reg.m.find(Pattern("add_feed.png"))
        click(reg.m.getLastMatch())
        mirolib.click_sidebar_tab(self,reg,"Miro")
        gr.click(Pattern("guide_search.png"))
        type(feed + "\n")
        time.sleep(10)
        reg.m.find(Pattern("add_feed.png"))
        click(reg.m.getLastMatch())
        time.sleep(20)
        mirolib.click_last_podcast(self,reg)
        time.sleep(5)
    #2. Copy the url and attempt to add it
        reg.t.click("Sidebar")
        tmpr = Region(reg.t.getLastMatch().below())
        tmpr.setW(tmpr.getW()+200)
        tmpr.highlight(3)
        if tmpr.exists("Copy") or tmpr.exists("URL"):
            click(tmpr.getLastMatch())
        time.sleep(2)
        mirolib.shortcut("n")        
        time.sleep(2)
        type(Key.ENTER)

        #3. Verify feed not duplicated
        p = mirolib.get_podcasts_region(reg)
        time.sleep(2)
        mirolib.count_images(self,reg, img=feed,region="sidebar",num_expected=1)
        mirolib.delete_feed(self,reg,feed)
        mirolib.delete_feed(self,reg,feed2)
Пример #22
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)
Пример #23
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)
Пример #24
0
    def test_362(self):
        """http://litmus.pculture.org/show_test.cgi?id=362 edit item music to video

        1. add Static List Feed
        2. download the Earth Eats
        3. Edit item from Audio to Video
        4. Verify item played as video 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"
        new_type = "Video"
        #Set Global Preferences
        mirolib.delete_feed(self,reg,feed)
        prefs.set_item_display(self,reg,option="audio",setting="on")
        time.sleep(2)
        prefs.set_item_display(self,reg,option="video",setting="on")
        time.sleep(2)
        prefs.set_autodownload(self,reg,setting="Off")
        time.sleep(2)

        
        #add feed and download joo joo item
        mirolib.add_feed(self,reg,url,feed)
        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)
        mirolib.edit_item_type(self,reg,new_type)
        #locate item in audio tab and verify playback
        mirolib.wait_for_item_in_tab(self,reg,tab="Video",item=title)
        doubleClick(reg.m.getLastMatch())
        mirolib.verify_video_playback(self,reg)
        mirolib.quit_miro(self,reg)
        mirolib.restart_miro()
        mirolib.wait_for_item_in_tab(self,reg,tab="Video",item=title)
        #cleanup
        mirolib.delete_feed(self,reg,feed)
Пример #25
0
    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 = mirolib.AppRegions()
        time.sleep(5)
        url = "http://pculture.org/feeds_test/3blipvideos.xml"
        feed = "ThreeBlip"
        title = "The Joo"
        new_type = "Music"
        
        

        #Set Global Preferences        
        prefs.set_item_display(self,reg,option="audio",setting="on")
        time.sleep(2)
        prefs.set_item_display(self,reg,option="video",setting="on")
        time.sleep(2)
        prefs.set_autodownload(self,reg,setting="Off")
        time.sleep(2)
        #start clean
        mirolib.delete_feed(self,reg,feed)
        #add feed and download joo joo item
        mirolib.add_feed(self,reg,url,feed)
        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)
        time.sleep(2)
        mirolib.edit_item_type(self,reg,new_type)
        #locate item in audio tab and verify playback
        mirolib.wait_for_item_in_tab(self,reg,tab="Music",item=title)
        doubleClick(reg.m.getLastMatch())
        mirolib.verify_audio_playback(self,reg,title)
       
        #cleanup
        mirolib.delete_feed(self,reg,feed)
Пример #26
0
    def test_198(self):
        """http://litmus.pculture.org/show_test.cgi?id=198 rename folder.

        Litmus Test Title:: 198 - rename feed folder
        Description: 
        1. Import OPML file of some feeds and folders
        2. 1 feed and 1 folder
        3. Delete, verify confirm dialog, and delete
        4. Cleanup
        """
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        folder = "Great Stuff"
        new_name1 = "INCREDIBLE"
        new_name2 = "ThisSux"
        
        reg = mirolib.AppRegions()
        reg.t.click("Sidebar")
        reg.t.click("Folder")
        time.sleep(2)
        type(folder + "\n")
        time.sleep(10) #give it 10 seconds to add the folder
        mirolib.click_podcast(self,reg,feed=folder)
        time.sleep(3)
        reg.t.click("Sidebar")
        reg.t.click("Rename")
        time.sleep(2)
        type(new_name1 + "\n")
        mirolib.click_podcast(self,reg,feed=new_name1)
        mirolib.restart_miro()
        p = mirolib.get_podcasts_region(reg)
        if not p.exists(new_name1):
            self.fail("rename did not persist after restart")
        else:
            p.rightClick(new_name1)
            p1 = Region(p.getLastMatch().nearby(200))
            p1.click("Rename")
            time.sleep(2)
            type(new_name2 + "\n")
            mirolib.click_podcast(self,reg,feed=new_name2)
            
        mirolib.delete_feed(self,reg,new_name2)
Пример #27
0
    def test_138(self): #shortened as there no more feed counter and can't count too much stuff.
        """http://litmus.pculture.org/show_test.cgi?id=138 clear out old items.

        Litmus Test Title:: 138 Channels - clear out old items 
        Description: 
         1. Add a feed that adds five new items each time it's updated.
         2. Update the feed to add new items.
         3. Modify old items settings to verify items cleared.
         4. Cleanup

        """
        setAutoWaitTimeout(testvars.timeout)
        
        #set the search regions
        reg = mirolib.AppRegions()        
        url = "http://bluesock.org/~willg/cgi-bin/newitemsfeed.cgi"
        feed = "my feed"
        mirolib.add_feed(self,reg,url,feed)
        mirolib.get_podcasts_region(reg)

        
        mirolib.tab_search(self,reg,"my feed")
        mirolib.toggle_list(reg)
        
        mirolib.count_images(self,reg,img="my feed",region="list",num_expected=5)
        mirolib.click_podcast(self,reg,feed)
        mirolib.shortcut("r")
        time.sleep(10)
        mirolib.get_podcasts_region(reg)
        if mirolib.count_images(self,reg,img="my feed",region="list",num_expected=10) == 10:
            mirolib.log_result("99","test_92") #verifies update podcast shortcut
        mirolib.click_podcast(self,reg,feed)
        for x in range(0,3):
            mirolib.shortcut("r")
            time.sleep(3)
        mirolib.open_podcast_settings(self,reg)
        mirolib.change_podcast_settings(self,reg,option="Podcast Items",setting="Keep 0")
        time.sleep(2)
        mirolib.get_podcasts_region(reg)
        mirolib.count_images(self,reg,img="my feed",region="list",num_expected=5)
        #4. cleanup
        mirolib.delete_feed(self,reg,"my feed") 
Пример #28
0
    def test_191(self):
        """http://litmus.pculture.org/show_test.cgi?id=191 Add rss feed to sidebar.

        1. Add ClearBits.net as a source
        2. Open Netlabel Music page and add RSS feed
        3. Verify feed added to the sidebar
        4. Cleanup
        """
        site_url = "http://clearbits.net"
        site = "ClearBits"
        feed = "ClearBits"
        reg = mirolib.AppRegions()
        mirolib.add_source(self,reg,site_url,site)
        mirolib.click_source(self,reg,site)
        reg.m.click("Netlabel Music")
        reg.m.click(testvars.clearbits_rss)
        mirolib.click_podcast(self,reg,site)
        mirolib.log_result("29","test_191 verify 1-click add site from source.")
        time.sleep(3)
        mirolib.delete_feed(self,reg,feed)
        mirolib.delete_site(self,reg,site)
Пример #29
0
    def test_196(self):
        """http://litmus.pculture.org/show_test.cgi?id=196 create new empty feed folder.

        Litmus Test Title:: 198 - new feed folder
        Description: 
        1. Import OPML file of some feeds and folders
        2. 1 feed and 1 folder
        3. Delete, verify confirm dialog, and delete
        4. Cleanup
        """
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        folder = "GREAT STUFF"        
        reg = mirolib.AppRegions()
        reg.t.click("Sidebar")
        reg.t.click("Folder")
        time.sleep(2)
        type(folder + "\n")
        time.sleep(10) #give it 10 seconds to add the folder
        mirolib.click_podcast(self,reg,folder)       
        mirolib.delete_feed(self,reg,"GREAT")
Пример #30
0
    def test_69(self):
        """http://litmus.pculture.org/show_test.cgi?id=69 Add rss feed via browser.

        1. Add feed The AV Club via the browser (assumes the browser is set to automatically add the feed).
        2. Verify the feed is added
        3. Cleanup

        Assumes that Miro is configured as the default application to open rss feeds in FF.
        
        """
        try:
            reg = mirolib.AppRegions()
            feed = "The AV"
            prefs.set_autodownload(self,reg,setting="Off")     
            url = "http://feeds.feedburner.com/theavclub/mainline"
            mirolib.browser_to_miro(self,reg,url)
            #3. verify feed added
            mirolib.click_podcast(self,reg,feed)
        finally:
        #cleanup
            mirolib.delete_feed(self,reg,feed)