示例#1
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")
示例#2
0
    def test_620(self):
        """http://litmus.pculture.org/show_test.cgi?id=620 dl youtube video and convert.

        1. Download youtube video
        2. Convert to video formats
        3. Verify playback
        4. Convert to audio formats
        5. Verify playback
        6. Cleanup
        """

        reg = mirolib.AppRegions()
        # 1. Download youtube vidoe
        vid_url = "http://www.youtube.com/watch?v=baJ43ByylbM&feature=fvw"
        item_title = "Zoom"
        reg.tl.click("File")
        reg.tl.click("Download from")
        time.sleep(4)
        type(vid_url)
        time.sleep(2)
        type("\n")
        
        mirolib.confirm_download_started(self,reg,item_title)
        mirolib.wait_for_item_in_tab(self,reg,"videos",item_title)
        if reg.m.exists(item_title,3):
            mirolib.log_result("9","test_620 file external download verified.")
        reg.m.click(item_title)
        # 2. Convert to audio formats
        try:
            aconvertList = ("MP3","Vorbis")
            for x in aconvertList:
                mirolib.convert_file(self,reg,x)
                time.sleep(2)
            mirolib.click_sidebar_tab(self,reg,"Converting")
            mirolib.wait_conversions_complete(self,reg,item_title,x)
            
            # 3. Verify playback
            mirolib.click_sidebar_tab(self,reg,"music")
            aplaybackList = ("MP3",)
            for x in aplaybackList:
                mirolib.tab_search(self,reg,"Converted to "+str(x),False)
                if reg.m.exists(Pattern("item_play_unplayed.png")):
                    doubleClick(reg.m.getLastMatch())
                    mirolib.verify_audio_playback(self,reg,"Converted")
                else:
                    self.fail("converted item not found")
        except FindFailed, debugging:
            self.verificationErrors.append(debugging)
示例#3
0
    def test_419(self):
        """http://litmus.pculture.org/show_test.cgi?id=419 external torrent dl.

        1. clearbits torrent dl
        2. open with File Download menu
        3. Verify download started and metadata
        4. Cleanup

        """
        reg = mirolib.AppRegions()
        
        item_url = "http://youtorrent.com/download/7379834/young-broke-and-fameless-the-mixtape.torrent"
        item_title = "Fameless"
        reg.tl.click("File")
        reg.tl.click("Download from")
        time.sleep(5)
        type(item_url+"\n")
        print ("confirm download started")
        status = mirolib.confirm_download_started(self,reg,item_title)
        print status
        if status == "downloaded":
            mirolib.delete_items(self,reg,item_title,"Misc")
        elif status == "in_progress":
            mirolib.delete_items(self,reg,item_title,"Downloading")
        else:
            self.fail("Can not confirm download started")
示例#4
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)
示例#5
0
    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 = mirolib.AppRegions()

        mirolib.add_source(self,reg,site_url,site)
        mirolib.click_source(self,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 mirolib.confirm_download_started(self,reg,title) == "failed":
                    self.verificationErrors.append("download failed for imagetype" +str(filetype))
                else:
                    reg.mtb.click("download-cancel.png")
                mirolib.click_source(self,reg,site)
            except:
                self.verificationErrors.append("download failed for imagetype" +str(filetype))
            finally:
                type(Key.ESC) #Close any lingering dialogs
                mirolib.cancel_all_downloads(self,reg)
                mirolib.delete_site(self,reg,site)
示例#6
0
    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"
                        
        setAutoWaitTimeout(60)
        reg = mirolib.AppRegions()
        mirolib.cancel_all_downloads(self,reg)

        mirolib.add_source(self,reg,site_url,site)
        mirolib.click_source(self,reg,site)
        reg.m.click("Torrent file")
        mirolib.confirm_download_started(self,reg,title)

        mirolib.cancel_all_downloads(self,reg)
        mirolib.delete_site(self,reg,site)
示例#7
0
    def test_76(self):
        """http://litmus.pculture.org/show_test.cgi?id=76 item http auth

        1. add the pass protected feed
        2. click to download the item
        3. enter a few invalid combos, then valid
        4. Verify download starts
       

        """
        reg = mirolib.AppRegions()
        
        time.sleep(5)
        url = "http://participatoryculture.org/feeds_test/feed1.rss"
        feed = "Yah"
        term = "fourth test"
        title = "Video 4"
        BAD_PASSW = {"auser":"******",
                     "12341234":"12341234",
                     " ": " ",
                     " ":"password",
                     "username": "******"
                     }
        mirolib.remove_http_auth_file(self,reg)
        #add feed and download 4th item
        mirolib.add_feed(self,reg,url,feed)
        mirolib.tab_search(self,reg,term)
        reg.m.click("button_download.png")
        for username, passw in BAD_PASSW.iteritems():
            mirolib.http_auth(self,reg,username,passw)
        mirolib.http_auth(self,reg,username="******", passw="pcfdudes")
        time.sleep(5)
        mirolib.confirm_download_started(self,reg,title)
        #cleanup
        mirolib.delete_feed(self,reg,feed)
        if mirolib.remove_http_auth_file(self,reg) == False:
            self.fail("auth file not saved on filesystem")
示例#8
0
    def test_182(self):
        """http://litmus.pculture.org/show_test.cgi?id=182 dl from youtube site.

        1. Open youtube url as site
        2. download button
        3. verify download started
        4. Cleanup
        """
        site_url = "http://www.youtube.com/watch?v=fgg2tpUVbXQ&feature=channel"
        site = "YouTube"
        
        reg = mirolib.AppRegions()
        try:
            mirolib.add_source(self,reg,site_url,site)
            mirolib.click_source(self,reg,site)
            
            if reg.mtb.exists(Pattern("download_this_video.png")) or \
                      reg.mtb.exists("Download this"):
                click(reg.mtb.getLastMatch())
                time.sleep(3)
            mirolib.confirm_download_started(self,reg,"Deep")
            reg.mtb.click("download-cancel.png")
        finally:
            mirolib.delete_site(self,reg,site)
示例#9
0
    def test_719(self):
        """http://litmus.pculture.org/show_test.cgi?id=719 external torrent dl from browser

        1. clearbits torrent dl
        2. open with browser
        3. Verify download started and metadata
        4. Cleanup

        """
        reg = mirolib.AppRegions()
        
        url = "http://www.clearbits.net/get/993-wurlitztraction---lucidity-cue.torrent"
        item_title = "Enough"
        mirolib.browser_to_miro(self,reg,url)
        print ("confirm download started")
        status = mirolib.confirm_download_started(self,reg,item_title)
        print status
        if status == "downloaded":
            mirolib.delete_items(self,reg,item_title,"Misc")
        elif status == "in_progress":
            mirolib.delete_items(self,reg,item_title,"Downloading")
        else:
            self.fail("Can not confirm download started")
示例#10
0
    def test_122(self):
        """http://litmus.pculture.org/show_test.cgi?id=122 item click actions, normal 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")
        time.sleep(2)
        prefs.set_default_view(self,reg,setting="Standard")

        #add feed and download joo joo item
        mirolib.add_feed(self,reg,url,feed)
        mirolib.tab_search(self,reg,title1)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())

        mirolib.click_podcast(self,reg,feed)
        mirolib.tab_search(self,reg,title2,confirm_present=True)

        #double-click starts download
        doubleClick(title2)
        if mirolib.confirm_download_started(self,reg,title=title2) == "in_progress":
            mirolib.log_result("122","normal view double-click starts download")
        else:
            self.fail("normal view double-click starts download, failed")
        #double-click pauses download
        mirolib.click_podcast(self,reg,feed)
        doubleClick(title2)
        if exists("item-renderer-download-resume.png"):
            mirolib.log_result("122","normal view double-click pauses download")
        else:
            self.fail("normal view double-click pause download, failed")
        #double-click resumes download
        doubleClick(title2)
        if exists("item-renderer-download-pause.png"):
            mirolib.log_result("122","normal view double-click resume download")
        else:
            self.fail("normal 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","normal view double-click starts playback")
        else:
            self.fail("normal view double-click start playback, failed")
        mirolib.verify_video_playback(self,reg)

        #single click thumb starts download
        mirolib.tab_search(self,reg,title3)
        if reg.m.exists("thumb-default-video.png"):
            print "using default thumb"
            click(reg.m.getLastMatch())
        else:
            print "can't find thumb, best guess"
            reg.m.find(title1)
            click(reg.m.getLastMatch().left(50))
        if mirolib.confirm_download_started(self,reg,title=title3) == "in_progress":
            mirolib.log_result("122","normal view click starts download")
        else:
            self.fail("normal view double-click starts download, failed")
        #single click thumb starts playback
        mirolib.click_podcast(self,reg,feed)
        mirolib.tab_search(self,reg,title1)
        if reg.m.exists("thumb-default-video.png"):
            print "using default thumb"
            click(reg.m.getLastMatch())
        elif reg.m.exists("thumb-joojoo.png"):
            print "found joo joo thumb"
            click(reg.m.getLastMatch())
        else:
            print "can't find thumb, best guess"
            reg.m.find(title1)
            click(reg.m.getLastMatch().left(50))
        if exists("playback_bar_video.png"):
            mirolib.log_result("122","normal view double-click starts playback")
        else:
            self.fail("normal view double-click start playback, failed")
        mirolib.verify_video_playback(self,reg)   
        #cleanup
        mirolib.delete_feed(self,reg,feed)
示例#11
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)