Пример #1
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 = MiroRegions() 
        miro = MiroApp()
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TWO STUPID"
        term = "House"
        title = "Dinosaur"
        
        #1. add feed
        miro.add_feed(reg, url,feed)
        #2. search
        miro.tab_search(reg, term)
        self.assertTrue(reg.m.exists(title))
        self.assertFalse(reg.m.exists("Flip"))
        miro.click_sidebar_tab(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
        miro.delete_feed(reg, "stupid")
Пример #2
0
    def test_225(self):
        """http://litmus.pculture.org/show_test.cgi?id=225 add several items to a new playlist.

        1. add a watched folder to get some items in the db
        2. select the items and create a new playlist from menu
        3. verify items in list
        4. repeat with context menu and verify

        """
        watched_feed = "TestData"
        playlist = "MIX LIST"
        reg = MiroRegions() 
        miro = MiroApp()
        miro.click_sidebar_tab(reg, "Podcasts")
        miro.toggle_normal(reg)
        miro.tab_search(reg, watched_feed)
        reg.m.click(Pattern("sort_name_normal.png"))
        item_list = ["Lego", "Pancake", "Deerhunter"]
        keyDown(Key.SHIFT)
        time.sleep(1)
        reg.m.click("Lego")
        reg.m.click("Deerhunter")
        keyUp(Key.SHIFT)
        miro.add_playlist(reg, playlist,style="shortcut")
        miro.toggle_normal(reg)
        for title in item_list:
            miro.tab_search(reg, title,confirm_present=True)
Пример #3
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. Search in the tab
        3. From Sidebar -> New Search feed, create saved search channel
        4. Verify Search saved
        5. Cleanup

        """
        reg = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Voice"
                
        #1. add feed
        miro.add_feed(reg, url,feed)
        miro.tab_search(reg, term)
        #2. search
        miro.new_search_feed(reg, term, radio="Podcast", source=feed, defaults=True)
                        
        #3. verify search saved
        miro.click_last_podcast(reg)
        self.assertTrue(reg.m.exists(term, 45))
        
        #4. cleanup
        miro.click_remove_podcast(reg)
        miro.remove_confirm(reg, action="remove")
        miro.delete_feed(reg, "Static List")
Пример #4
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 = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Gimp"
        title = "GimpKnowHow"
        
        #1. add feed
        miro.add_feed(reg, url, feed)
        #2. search
        miro.tab_search(reg, term)
        reg.mtb.click("button_save_as_podcast.png")
        #3. verify search saved
        miro.click_last_podcast(reg)
        #4. cleanup
        type(Key.DELETE)
        #Last chance to verify Gimp is the saved search feed.
        self.assertTrue(reg.m.exists("GIMP"),5)
        miro.remove_confirm(reg, action="remove")
        miro.delete_feed(reg, "Static List")
        miro.handle_crash_dialog('215', db=False, test=False)
Пример #5
0
    def test_709(self):
        """http://litmus.pculture.org/show_test.cgi?id=709 create playlist from library search.

        1. add a watched folder to get some items in the db
        2. search in music tab
        3. click Add to Playist button
        4. accept name and verify created

        """
        watched_feed = "TestData"
        playlist = "Johnson"
        item_list = ["Pancakes","Horizon"]
        reg = MiroRegions() 
        miro = MiroApp()
        p = miro.get_podcasts_region(reg)
        miro.click_sidebar_tab(reg, "Music")
        miro.tab_search(reg, playlist)
        reg.mtb.click(Pattern("button_save_as_playlist.png"))
        time.sleep(3)
        type(Key.ENTER)
        miro.click_playlist(reg, playlist.upper())
        miro.toggle_normal(reg)
        
        for title in item_list:
            miro.tab_search(reg, title,confirm_present=True)       
Пример #6
0
    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 = MiroRegions() 
        miro = MiroApp()
        
    
        feed = "TestData"
        term = "monkey"
        folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","WatchTest")
        #1. add feed
        miro.add_watched_folder(reg, folder_path)
        if reg.s.exists("WatchTest"):
            miro.log_result("678","test_721")
        #2. search
        miro.tab_search(reg, term)
        miro.new_search_feed(reg, term,radio="Podcast",source=feed,watched=True)

        #Remove Watched Folder
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        folder_tab = prefs.open_tab("Folders")
        folder_tab.remove_watched_folder("ArtTest")
        folder_tab.close_prefs()
Пример #7
0
    def test_458(self):
        """http://litmus.pculture.org/show_test.cgi?id=458 edit blank item description

        1. add TWO STUPID feed
        2. download the Flip Faceitem
        3. Edit item description
        4. Cleanup
        """
        
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TWO STUPID"
        title = "Flip" # item title updates when download completes
             
        #add feed and download flip face item
        miro.add_feed(reg, url,feed)
        miro.toggle_normal(reg)
        miro.tab_search(reg, title)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())
        miro.wait_for_item_in_tab(reg, "Videos",item=title)
        reg.m.click(title)
        miro.edit_item_metadata(reg, meta_field="about",meta_value="Blank description edited")
        miro.tab_search(reg, "blank description")
        if reg.m.exists(title):
            miro.log_result("656","test_458")           
        else:
            miro.log_result("656","test_458",status="fail")
        #cleanup
        miro.delete_feed(reg, feed)
Пример #8
0
    def test_236(self):
        """http://litmus.pculture.org/show_test.cgi?id=236 startup, corrupt item_info_cache

        Litmus Test Title:: 236 - rebuild item_info_cache on startup.
        Description: 
        1. Clean up Miro support and vidoes directories
        2. Launch - walk through 1st tieme install dialog and search everywhere
        """

        reg = MiroRegions() 
        miro = MiroApp()
        folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
        miro.add_watched_folder(reg, folder_path)
        miro.quit_miro()
        myLib.config.delete_preferences()
        setAutoWaitTimeout(myLib.testvars.timeout)
        #set the search regions 
        miro.restart_miro()
        miro.first_time_startup_dialog(lang="Default",run_on_start="No",search="No",search_path=None,itunes="No")    
        waitVanish("Preparing")
        time.sleep(10)
        reg = MiroRegions() 
        miro = MiroApp()
        miro.click_sidebar_tab(reg, "Videos")
        miro.tab_search(reg, title="Deerhunter",confirm_present=True)
Пример #9
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 = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TWO STUPID"
        title = "Flip"
        term = "dinosaur"
        
        #1. add feed
        miro.add_feed(reg, url, feed)
        #2. search
        miro.tab_search(reg, term)
        self.assertFalse(reg.m.exists(title, 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(title))
        #4. cleanup
        miro.delete_feed(reg, feed)
Пример #10
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 = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/3blipvideos.xml"
        feed = "ThreeBlip"
        term = "strange creature"
        title = "Joo Joo"
        
        #1. add feed
        miro.add_feed(reg, url,feed)
        #2. search
        miro.tab_search(reg, term)
        reg.mtb.click("button_save_as_podcast.png")
        #3. verify search saved
        miro.click_last_podcast(reg)
        miro.tab_search(reg, term,confirm_present=True)
        
        #4. cleanup
        miro.click_remove_podcast(reg)
        miro.remove_confirm(reg, action="remove")
        miro.delete_feed(reg, "blip")
        miro.delete_feed(reg, feed)
Пример #11
0
    def test_112(self):
        """http://litmus.pculture.org/show_test.cgi?id=112 download errors

        1. Add feed
        2. Download All
        3. Verify error messages
        """
        reg = MiroRegions()
        miro = MiroApp()
        feed_url = "http://participatoryculture.org/feeds_test/feed13.rss"
        feed_name = "Feed"

        error_types = {"Server Closes Connection": "no_connection.png",
                       "File not found": "file_not_found.png",
                       "503 Error": "no_connection.png",
                       "Host not found": "unknown_host.png",
                       "HTTP error": "http_error.png",
                       "Timeout error": "no_connection.png",
                       }
        miro.add_feed(reg, feed_url, feed_name)
        miro.set_podcast_autodownload(reg, setting="All")
        time.sleep(10)
        for error, image in error_types.iteritems():
                miro.tab_search(reg, error)
                assert reg.m.exists(Pattern(image).similar(0.6),60)
        miro.delete_feed(reg, feed_name)
Пример #12
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 = MiroRegions() 
        miro = MiroApp()
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.show_audio_in_music("on")
        general_tab.close_prefs()
        
        url = "http://qa.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"],
            ["track_num" ,"1", "673"],
            ["track_of" ,"2", "673"],
            ["year", "2010", "655"],
            ["rating", "5", "651"],
            ]
        
        #start clean
        miro.delete_feed(reg, feed)
        #add feed and download earth eats item
        miro.add_feed(reg, url,feed)
        miro.toggle_normal(reg)
        miro.tab_search(reg, term)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())
        miro.wait_for_item_in_tab(reg, "Music",item=title)
        reg.m.find(title)
        reg.m.click(title)
        reg.mtb.click("tabsearch_clear.png")
        for x in edit_itemlist:
            miro.edit_item_metadata(reg, meta_field=x[0],meta_value=x[1])
            try:
                miro.log_result(x[2],"test_647")
            finally:
                time.sleep(2)
        if not miro.tab_search(reg, "Earth Day",confirm_present=True) == True:
            self.fail("new title not saved")
        #cleanup
        miro.delete_feed(reg, feed)
Пример #13
0
    def test_322(self):
        """http://litmus.pculture.org/show_test.cgi?id=322 search and save as a podcast

        1. Perform a search
        2. Click off the tab
        3. Click back and verify the search is remembered.
        4. Cleanup
        """
        setAutoWaitTimeout(60)
        reg = MiroRegions() 
        miro = MiroApp()
        
        #Set Global Preferences

        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        podcasts_tab = prefs.open_tab("Podcasts")
        podcasts_tab.autodownload_setting("Off")
        podcasts_tab.close_prefs()       

        searches = {"blip": "python",
                    "YouTube": "cosmicomics",
                    "Revver": "Beiber",
                    "Yahoo": "Canada",
                    "DailyMotion": "Russia",
                    "Metavid": "africa",
                    "Mininova": "Creative Commons",
                    "Goog": "Toronto"}
        for engine, term in searches.iteritems():
            miro.click_sidebar_tab(reg, "search")
            miro.search_tab_search(reg, term, engine)
            time.sleep(10)
            reg.mtb.click("button_save_as_podcast.png")
            if engine == "blip":
                saved_search = engine
            else:
                saved_search = engine +" for"
            time.sleep(10) #give some time for everything to load up
            miro.click_podcast(reg, saved_search)
            miro.shortcut("r")
            time.sleep(5)
            miro.get_podcasts_region(reg)
            miro.tab_search(reg, term)
            try:
                self.assertTrue(reg.m.exists(engine))
                miro.delete_feed(reg, engine)
            except:
                 miro.log_result("322","test 322, failed for " +engine+": "+term, status="fail")
        #cleanup
        for x in searches.keys():
            miro.delete_feed(reg, x)
Пример #14
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 = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://qa.pculture.org/feeds_test/MixedCats.xml"
        feed = "MIXED"
        title = "Tongue"
        new_type = "Music"
        old_type = "Video"

        #Set Global Preferences
        
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.show_audio_in_music("on")
        general_tab.show_videos_in_videos("on")
        podcasts_tab = prefs.open_tab("Podcasts")
        podcasts_tab.autodownload_setting("Off")
        podcasts_tab.close_prefs()
        
        #start clean
        miro.delete_feed(reg, feed)
        #add feed and download joo joo item
        miro.add_feed(reg, url,feed)
        miro.tab_search(reg, title)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())
        miro.wait_for_item_in_tab(reg, "Videos", item=title)
        reg.m.find(title)
        reg.m.click(title)
        reg.mtb.click("tabsearch_clear.png")
        miro.edit_item_type(reg, new_type, old_type)
        #locate item in audio tab and verify playback
        miro.wait_for_item_in_tab(reg, tab="Music",item=title)
        reg.m.click(title)        
        type(' ') #use spacebar to start playback
        self.assertTrue(miro.verify_audio_playback(reg, title))
        miro.stop_audio_playback(reg, title)
       
        #cleanup
        miro.delete_feed(reg, feed)
Пример #15
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 = MiroRegions() 
        miro = MiroApp()
        # 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")
        
        miro.confirm_download_started(reg, item_title)
        miro.wait_for_item_in_tab(reg, "videos",item_title)
        if reg.m.exists(item_title,3):
            miro.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:
                miro.convert_file(reg, x)
                time.sleep(2)
            miro.click_sidebar_tab(reg, "Converting")
            miro.wait_conversions_complete(reg, item_title,x)
            
            # 3. Verify playback
            miro.click_sidebar_tab(reg, "music")
            aplaybackList = ("MP3",)
            for x in aplaybackList:
                miro.tab_search(reg, "Converted to "+str(x),False)
                if reg.m.exists(Pattern("item_play_unplayed.png")):
                    doubleClick(reg.m.getLastMatch())
                    self.assertTrue(miro.verify_audio_playback(reg, title))
                    miro.stop_audio_playback(reg, title)                   
                else:
                    self.fail("converted item not found")
        except FindFailed, debugging:
            self.verificationErrors.append(debugging)
Пример #16
0
    def test_362(self):
        """http://litmus.pculture.org/show_test.cgi?id=362 edit item music to video

        1. add Feed
        2. download Paris mp3
        3. Edit item from Audio to Video
        4. Verify item played as video item

        """
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://qa.pculture.org/feeds_test/MixedCats.xml"
        feed = "MIXED"
        term = "Paris"
        title = "Laren"
        new_type = "Video"
        old_type = "Music"
        #Set Global Preferences
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.show_audio_in_music("on")
        general_tab.show_videos_in_videos("on")
        podcasts_tab = prefs.open_tab("Podcasts")
        podcasts_tab.autodownload_setting("Off")
        podcasts_tab.close_prefs()

        
        #add feed and download joo joo item
        miro.add_feed(reg, url,feed)
        miro.tab_search(reg, term)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())
        miro.wait_for_item_in_tab(reg, "Music",item=title)
        reg.m.find(title)
        reg.m.click(title)
        reg.mtb.click("tabsearch_clear.png")
        miro.edit_item_type(reg, new_type, old_type)
        #locate item in audio tab and verify playback
        miro.wait_for_item_in_tab(reg, tab="Video",item=title)
        reg.m.doubleClick(title)
        miro.verify_video_playback(reg)
        miro.quit_miro()
        miro.restart_miro()
        miro.wait_for_item_in_tab(reg, tab="Video",item=title)
        #cleanup
        miro.delete_feed(reg, feed)
Пример #17
0
    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(myLib.testvars.timeout)
        #set the search regions
        reg = MiroRegions() 
        miro = MiroApp()
        miro.delete_all_podcasts(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 
        miro.import_opml(reg, opml_path)
        time.sleep(15) #give a chance to add and update
        miro.import_opml(reg, opml_path2)
        time.sleep(15) #give a chance to add and update
   
        
        #expand all the folders
        p = miro.get_podcasts_region(reg)
        miro.expand_feed_folder(reg, "GEEKY")
        miro.expand_feed_folder(reg, "FUN")
        #set the feeds region
        p = miro.get_podcasts_region(reg)
        #select multiple feeds for the folders
        p.click("BIRCHBOXTV")
        added_feeds = miro.multi_select(region=p,item_list=feed_list)
        if len(added_feeds) > 0:
            added_feeds.append("BIRCHBOXTV")
        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 = miro.click_podcast(reg, new_folder)
        rightClick(Location(feed_match))
        if exists("Update",2):
            click(getLastMatch())
        try:
            for feed in added_feeds:
                assert miro.tab_search(reg, title=feed,confirm_present=True), True
        except:
            self.fail("%s feed not found" % feed)
        finally:
            #cleanup
            miro.delete_all_podcasts(reg)
Пример #18
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 = MiroRegions() 
        miro = MiroApp()
        
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TWO STUPID"
        term = "Face"
        title = "Flip"
        
        #1. add feed
        miro.add_feed(reg, url,feed)
        miro.set_podcast_autodownload(reg, setting="All")
        #2. search
        miro.tab_search(reg, term)
        self.assertTrue(reg.m.exists(title))

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

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

        miro.click_last_podcast(reg)
        miro.tab_search(reg, term2,confirm_present=True)
        miro.clear_search(reg)
        time.sleep(3)
        if not reg.mtb.exists(term2.upper()):
            miro.log_result("324","test_24",status="pass")
       

        #4. cleanup
        miro.delete_feed(reg, "stupid")
        miro.click_last_podcast(reg)
        miro.delete_current_selection(reg)
        miro.delete_feed(reg, "Static List")
Пример #19
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 = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://qa.pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Earth Eats"
        title = "Mushroom" 
        new_type = "Video"
        #Set Global Preferences
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.show_audio_in_music("on")
        general_tab.close_prefs()

        
        miro.delete_feed(reg, feed)
        
        #add feed and download earth eats item
        miro.add_feed(reg, url,feed)
        miro.toggle_normal(reg)
        miro.tab_search(reg, title=term)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())
        miro.wait_for_item_in_tab(reg, "Music", item=title)
        reg.m.find(title)
        reg.m.click(title)
        reg.mtb.click("tabsearch_clear.png")
        miro.edit_item_metadata(reg, meta_field="about",meta_value="hoovercraft full of eels")
        miro.tab_search(reg, "hoovercraft eels")
        if not reg.m.exists(title):
            self.fail("can not verify description edited")
        miro.delete_feed(reg, feed)
Пример #20
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

        """
        
        #set the search regions
        reg = MiroRegions() 
        miro = MiroApp()        
        url = "http://bluesock.org/~willg/cgi-bin/newitemsfeed.cgi"
        feed = "my feed"
        miro.add_feed(reg, url,feed)
        miro.get_podcasts_region(reg)

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

        1. Add feed
        2. Download item
        3. Verify download completes
        4. Check title display via screenshot
        5. Verify playback

        """
        feed_url = "http://vimeo.com/habi/likes/rss"
        feed_name = "David"
        item_title = "glove"
        item_image = "vimeo-glove.png"
        reg = MiroRegions()
        miro = MiroApp()
        miro.add_feed(reg, feed_url, feed_name)
        miro.tab_search(reg, item_title)
        miro.download_all_items(reg)
        assert download_playback_check_title(reg, miro, item_title, item_image)
        miro.delete_feed(reg, feed_name)
Пример #22
0
    def test_653(self):
        """http://litmus.pculture.org/show_test.cgi?id=653 edit album art

        1. add watched folder
        2. Edit artwork for 1 item
        3. Edit artwork for multiple items
        4. Cleanup
        """
        
        reg = MiroRegions() 
        miro = MiroApp()
        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
        miro.add_watched_folder(reg, folder_path)
        if reg.s.exists("ArtTest"):
            click(reg.s.getLastMatch())          
            miro.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
        miro.toggle_normal(reg)
        miro.tab_search(reg, title)
        try:
            reg.m.find(title)
            reg.m.click(title)
            reg.mtb.click("tabsearch_clear.png")
            miro.edit_item_metadata(reg, meta_field="art",meta_value=art_file)
            ## Verify new image here:
            reg.m.find(Pattern("album_art1.png"))
        finally:
            miro.open_prefs(reg)
            prefs = PreferencesPanel()
            folder_tab = prefs.open_tab("Folders")
            folder_tab.remove_watched_folder("ArtTest")
            folder_tab.close_prefs()
Пример #23
0
    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(myLib.testvars.timeout)
        miro = MiroApp()
        #set the search regions
        miro.quit_miro()
        myLib.config.set_def_db_and_prefs()
        miro.restart_miro()
        time.sleep(10)
        reg = MiroRegions() 
        miro = MiroApp()

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

        #1. Add the feeds 
        miro.import_opml(reg, opml_path)
        p = miro.get_podcasts_region(reg)
        for feed in feedlist:
            x = p.find(feed)
            y = p.find(folder)
            dragDrop(x,y)
            time.sleep(2)
        feed_match = miro.click_podcast(reg, folder)
        rightClick(Location(feed_match))
        if exists("Update",2):
            click(getLastMatch())
        for feed in feedlist:
            miro.tab_search(reg, title=feed,confirm_present=True)
        #cleanup
        miro.delete_all_podcasts(reg)
Пример #24
0
    def test_14289_644(self):
        """http://litmus.pculture.org/show_test.cgi?id=644 feed items with non-ascii chars.

        1. Add feed
        2. Download item
        3. Verify download completes
        4. Check title display via screenshot
        5. Verify playback

        """
        url_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","dilbert-feed.xml")
        feed_url = "http://gdata.youtube.com/feeds/api/users/4001v63/uploads"
        feed_name = "Uploads"
        item_title = "kerta"
        item_image = "non_ascii_item.png"
        reg = MiroRegions()
        miro = MiroApp()
        miro.add_feed(reg, feed_url, feed_name)
        miro.tab_search(reg, item_title)
        miro.download_all_items(reg)
        assert download_playback_check_title(reg, miro, item_title, item_image)
        miro.delete_feed(reg, feed_name)
Пример #25
0
    def test_18656_763(self):
        """http://litmus.pculture.org/show_test.cgi?id=763 youtube feed dl.

        1. Add feed
        2. Download item
        3. Verify download completes
        4. Check title display via screenshot
        5. Verify playback

        """
        url_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","youtube-feed.rss")
        feed_url = "file:///"+url_path
        feed_name = "AL JAZEERA"
        item_title = "Alarm"
        item_image = "youtube_alarm_spreads.png"
        reg = MiroRegions()
        miro = MiroApp()
        miro.add_feed(reg, feed_url, feed_name)
        miro.tab_search(reg, item_title)
        miro.download_all_items(reg)
        assert download_playback_check_title(reg, miro, item_title, item_image)
        miro.delete_feed(reg, feed_name)
Пример #26
0
    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
        """
        reg = MiroRegions()
        miro = MiroApp()
        miro.quit_miro()
        myLib.config.delete_database_and_prefs()
        myLib.config.delete_miro_video_storage_dir()
        #set the search regions
        miro.restart_miro()
        search_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
        miro.first_time_startup_dialog(lang="Default",run_on_start="No",search="Yes",search_path=search_path,itunes="No")
        time.sleep(10)
        reg = MiroRegions()
        miro = MiroApp()
        miro.click_sidebar_tab(reg, "Videos")
        miro.tab_search(reg, title="Deerhunter",confirm_present=True)
Пример #27
0
    def test_18656_764(self):
        """http://litmus.pculture.org/show_test.cgi?id=764 vimeo feed dl.

        1. Add feed
        2. Download item
        3. Verify download completes
        4. Check title display via screenshot
        5. Verify playback

        """
        url_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","vimeo-feed")
        feed_url = "file:///"+url_path
        feed_name = "ONE DAY"
        item_title = "Jellyfish"
        item_image = "vimeo-jellyfish.png"
        reg = MiroRegions()
        miro = MiroApp()
        miro.add_feed(reg, feed_url, feed_name)
        miro.tab_search(reg, item_title)
        miro.download_all_items(reg)
        assert download_playback_check_title(reg, miro, item_title, item_image)
        miro.delete_feed(reg, feed_name)
Пример #28
0
    def test_79(self):
        """http://litmus.pculture.org/show_test.cgi?id=79 Search - New Search Podcast: Engine
        Steps to Perform:

        1.  Select Sidebar -> New Search Podcast
        2.  Enter a search term
        3.  Select the Search Engine radio button
        4.  Select a search engine from the pulldown menu
        5.  Select Create Podcast
        """

        reg = MiroRegions() 
        miro = MiroApp()

        #Set Global Preferences
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        podcasts_tab = prefs.open_tab("Podcasts")
        podcasts_tab.autodownload_setting("Off")
        podcasts_tab.close_prefs()
        
        searches = { "Yahoo": "Canada", "DailyMotion": "Ontario", "YouTube": "toronto"}
        radio = "Search"
        for source, term in searches.iteritems():
            miro.new_search_feed(reg, term,radio,source,defaults=False,watched=False)
            time.sleep(10) #give some time for everything to load up
            miro.click_podcast(reg, source)
            miro.shortcut("r")
            time.sleep(5)
            miro.tab_search(reg, term)
            try:
                self.assertTrue(reg.m.exists(source))
                miro.delete_feed(reg, source)
            except:
                 miro.log_result("79","test_79, failed for " +source+": "+term, status="fail")
        
        #cleanup
        for x in searches.keys():
            miro.delete_feed(reg, x)
Пример #29
0
    def test_18656_765(self):
        """http://litmus.pculture.org/show_test.cgi?id=764 itunes feed dl.

        1. Add feed
        2. Download item
        3. Verify download completes
        4. Check title display via screenshot
        5. Verify playback

        """
        url_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","dilbert-feed.xml")
        feed_url = "file:///"+url_path
        feed_name = "Dilbert"
        item_title = "Survey"
        item_image = "dilbert_survey_results.png"
        reg = MiroRegions()
        miro = MiroApp()
        miro.add_feed(reg, feed_url, feed_name)
        miro.tab_search(reg, item_title)
        miro.download_all_items(reg)
        assert download_playback_check_title(reg, miro, item_title, item_image)
        miro.delete_feed(reg, feed_name)
Пример #30
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 = MiroRegions() 
        miro = MiroApp()
        
        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": "******"
                     }
        miro.remove_http_auth_file(reg)
        #add feed and download 4th item
        miro.add_feed(reg, url,feed)
        miro.tab_search(reg, term)
        reg.m.click("button_download.png")
        for username, passw in BAD_PASSW.iteritems():
            miro.http_auth(reg, username,passw)
        miro.http_auth(reg, username="******", passw="pcfdudes")
        time.sleep(5)
        miro.confirm_download_started(reg, title)
        #cleanup
        miro.delete_feed(reg, feed)
        if miro.remove_http_auth_file(reg) == False:
            self.fail("auth file not saved on filesystem")