コード例 #1
0
ファイル: sg16_feedstests.py プロジェクト: Bhavanak/Miro
    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)
コード例 #2
0
ファイル: sg58_items.py プロジェクト: Bhavanak/Miro
    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)
コード例 #3
0
ファイル: sg16_feedstests.py プロジェクト: Bhavanak/Miro
    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)
コード例 #4
0
ファイル: sg42_feedsearch.py プロジェクト: Bhavanak/Miro
    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")
コード例 #5
0
ファイル: sg6_feeds.py プロジェクト: Bhavanak/Miro
    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")
コード例 #6
0
ファイル: sg42_feedsearch.py プロジェクト: Bhavanak/Miro
    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")
コード例 #7
0
ファイル: sg42_feedsearch.py プロジェクト: Bhavanak/Miro
    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)
コード例 #8
0
ファイル: sg42_feedsearch.py プロジェクト: Bhavanak/Miro
    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")
コード例 #9
0
ファイル: sg58_items2.py プロジェクト: Bhavanak/Miro
    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)
コード例 #10
0
ファイル: sg1_install.py プロジェクト: Bhavanak/Miro
    def test_4(self):
        """http://litmus.pculture.org/show_test.cgi?id=4 1st time install, specify a dir to search.

        Litmus Test Title:: 4 - 1st time install, specify a dir to search
        Description: 
        1. Clean up Miro support and vidoes directories
        2. Launch - walk through 1st tieme install dialog and search everywhere
        """
        if exists("Miro",3) or \
           exists("Music",3):
            click(getLastMatch())
        mirolib.quit_miro(self)
        if config.get_os_name() == "osx":
            time.sleep(20)
        config.delete_database_and_prefs()
        config.delete_miro_video_storage_dir()
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        mirolib.restart_miro(confirm=False)
        search_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
        mirolib.first_time_startup_dialog(self,lang="Default",run_on_start="No",search="Yes",search_path=search_path,itunes="No")
        reg = mirolib.AppRegions()
        time.sleep(10)
        mirolib.click_sidebar_tab(self,reg,"Videos")
        mirolib.tab_search(self,reg,title="Deerhunter",confirm_present=True)
        mirolib.click_sidebar_tab(self,reg,"Music")
        mirolib.tab_search(self,reg,title="Pancakes",confirm_present=True)
コード例 #11
0
ファイル: sg42_feedsearch.py プロジェクト: Bhavanak/Miro
    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")
コード例 #12
0
ファイル: sg16_feedstests.py プロジェクト: Bhavanak/Miro
    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)
コード例 #13
0
ファイル: sg58_items.py プロジェクト: Bhavanak/Miro
    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)
コード例 #14
0
ファイル: sg6_feeds.py プロジェクト: Bhavanak/Miro
    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)
コード例 #15
0
ファイル: sg58_items2.py プロジェクト: Bhavanak/Miro
    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)
コード例 #16
0
ファイル: sg40_feed_folders.py プロジェクト: Bhavanak/Miro
    def test_116(self):
        """http://litmus.pculture.org/show_test.cgi?id=116 add multiple feeds to a folder

        Litmus Test Title:: 116 - add multiple feeds to a new folder
        Description: 
        1. Import 2 OPML file of some feeds and folders
        2. select several feeds and add to new folder
        3. confirm feeds in folders
        4. Cleanup
        """
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        reg = mirolib.AppRegions()
        mirolib.delete_all_podcasts(self,reg)
        opml_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","folder-test.opml")
        opml_path2 = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","folder-test2.opml")
        feed_list =  ["Google", "Onion","two ronnies","Vimeo"]
        added_feeds = []
        new_folder = "multi folder"

        #1. Add the feeds 
        mirolib.import_opml(self,reg,opml_path)
        time.sleep(15) #give a chance to add and update
        mirolib.import_opml(self,reg,opml_path2)
        time.sleep(15) #give a chance to add and update
   
        
        #expand all the folders
        mirolib.expand_feed_folder(self,reg,"GEEKY")
        mirolib.expand_feed_folder(self,reg,"FUN")
        #set the feeds region
        p = mirolib.get_podcasts_region(reg)
        #select multiple feeds for the folders
        p.click("Birchbox")
        added_feeds = mirolib.multi_select(self,region=p,item_list=feed_list)
        if len(added_feeds) > 0:
            added_feeds.append("Birchbox")
        else:
            self.fail("feeds not selected properly for adding to a folder")
        time.sleep(5)
        reg.m.click("New Folder")
        time.sleep(2)
        type(new_folder + "\n")
        time.sleep(5)
        feed_match = mirolib.click_podcast(self,reg,new_folder)
        rightClick(Location(feed_match))
        if exists("Update",2):
            click(getLastMatch())
        
        
        for feed in added_feeds:
            mirolib.tab_search(self,reg,title=feed,confirm_present=True)
        #cleanup
        mirolib.delete_all_podcasts(self,reg)
コード例 #17
0
ファイル: sg16_feedstests.py プロジェクト: Bhavanak/Miro
    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)
コード例 #18
0
ファイル: sg72_conversions.py プロジェクト: Bhavanak/Miro
    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)
コード例 #19
0
ファイル: sg42_feedsearch.py プロジェクト: Bhavanak/Miro
    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")
コード例 #20
0
ファイル: sg58_items2.py プロジェクト: Bhavanak/Miro
    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)
コード例 #21
0
ファイル: sg58_items2.py プロジェクト: Bhavanak/Miro
    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)
コード例 #22
0
ファイル: sg58_items.py プロジェクト: Bhavanak/Miro
    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)
コード例 #23
0
ファイル: sg58_items.py プロジェクト: Bhavanak/Miro
    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)
コード例 #24
0
ファイル: sg6_feeds.py プロジェクト: Bhavanak/Miro
    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") 
コード例 #25
0
ファイル: sg40_feed_folders.py プロジェクト: Bhavanak/Miro
    def test_197(self):
        """http://litmus.pculture.org/show_test.cgi?id=197 drag feeds to a folder

        Litmus Test Title:: 197 - drag feeds to a folder
        Description: 
        1. Import OPML file of some feeds and folders
        2. drag feeds to the folder
        3. verify feeds in folder
        4. Cleanup
        """
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        mirolib.quit_miro(self)
        config.set_def_db_and_prefs()
        mirolib.restart_miro(confirm=False)
        time.sleep(10)
        reg = mirolib.AppRegions()

        opml_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","folder-test2.opml")
        folder = "Best Feeds"
        feedlist = ["Vimeo", "BirchboxTV"]

        #1. Add the feeds 
        mirolib.import_opml(self,reg,opml_path)
        p = mirolib.get_podcasts_region(reg)
        for feed in feedlist:
            x = p.find(feed)
            y = p.find(folder)
            dragDrop(x,y)
            time.sleep(2)
        feed_match = mirolib.click_podcast(self,reg,folder)
        rightClick(Location(feed_match))
        if exists("Update",2):
            click(getLastMatch())
        for feed in feedlist:
            mirolib.tab_search(self,reg,title=feed,confirm_present=True)
        #cleanup
        mirolib.delete_all_podcasts(self,reg)
コード例 #26
0
ファイル: sg58_items.py プロジェクト: Bhavanak/Miro
    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":"apassw",
                     "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="tester", 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")
コード例 #27
0
ファイル: sg42_feedsearch.py プロジェクト: Bhavanak/Miro
    def test_721(self):
        """http://litmus.pculture.org/show_test.cgi?id=721 Menu New Search Watched

        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()
        
    
        feed = "TestData"
        term = "monkey"
        folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","WatchTest")
        prefs.remove_watched_folder(self,reg,folder=folder_path)
        #1. add feed
        mirolib.add_watched_folder(self,reg,folder_path)
        if reg.s.exists("WatchTest"):
            mirolib.log_result("678","test_721")
        #2. search
        mirolib.tab_search(self,reg,term)
        mirolib.new_search_feed(self,reg,term,radio="Podcast",source=feed,watched=True)
        prefs.remove_watched_folder(self,reg,folder=folder_path)
コード例 #28
0
ファイル: sg58_items2.py プロジェクト: Bhavanak/Miro
    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)
コード例 #29
0
ファイル: sg58_items.py プロジェクト: Bhavanak/Miro
    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)
コード例 #30
0
ファイル: sg72_conversions.py プロジェクト: Bhavanak/Miro
 # 4. Convert items to video formats
 try:
     vconvertList = ("Droid","Galaxy","G2","iPad","iPhone","MP4", "Theora","Playstation")
     mirolib.click_sidebar_tab(self,reg,"Videos")
     reg.m.click(item_title)
     
     for x in vconvertList:
         mirolib.convert_file(self,reg,x)
         time.sleep(15)
     mirolib.click_sidebar_tab(self,reg,"Converting")
     mirolib.wait_conversions_complete(self,reg,item_title,str(x))
     # 5. Verify playback
     mirolib.click_sidebar_tab(self,reg,"Videos")
     aplaybackList = ("Droid", "iPhone", "MP4", "Ogg Theora", "Playstation")
     for x in aplaybackList:
         mirolib.tab_search(self,reg,"Converted to "+str(x))
         if reg.m.exists("item_play_unplayed.png"):
             doubleClick(reg.m.getLastMatch())
             find(Pattern("playback_bar_video.png"))
             mirolib.shortcut("d")
             waitVanish(Pattern("playback_bar_video.png"),20)
             mirolib.log_result("102","test_620 stop video playback verified.")
             time.sleep(2)
             type(Key.DELETE)
             mirolib.remove_confirm(self,reg,"remove")     
             time.sleep(3)
         else: self.fail("converted item not found")
 except FindFailed, debugging:
     self.verificationErrors.append(debugging)
 finally:
     while reg.m.exists("Converted to",3):