Exemplo n.º 1
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)
Exemplo n.º 2
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")
Exemplo n.º 3
0
    def test_6(self):
        """http://litmus.pculture.org/show_test.cgi?id=6 add feed from MiroGuide.

        1. Open Miro
        2. search for a feed and add it.
        3. Verify feed added
        4. Cleanup
        """
        setAutoWaitTimeout(60)
        pass
        
        #set the search regions
        reg = MiroRegions() 
        miro = MiroApp()
        feed = "Studio"
        search = "Studio sketch"
 
        try:
            miro.click_sidebar_tab(reg, "Miro")
            time.sleep(5)
            gr = Region(reg.mtb)
            gr.setH(300)
            gr.click(Pattern("guide_search.png"))
            type(search +"\n")
            time.sleep(5)
            reg.m.find(Pattern("add_feed.png"))
            click(reg.m.getLastMatch())
            time.sleep(5)
            miro.click_podcast(reg, feed)
                        
        finally:
            #4. cleanup
            miro.delete_feed(reg, feed) 
Exemplo n.º 4
0
    def test_173(self):
        """http://litmus.pculture.org/show_test.cgi?id=173 1st time install, search everywhere

        Litmus Test Title:: 173 - 1st time install, search everywhere
        Description: 
        1. Clean up Miro support and vidoes directories
        2. Launch - walk through 1st tieme install dialog and search everywhere
        """
        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="Everywhere",
                                       itunes="No")
        time.sleep(10)
        reg = MiroRegions()
        miro = MiroApp()
        miro.click_sidebar_tab(reg, "Videos")
        find(Pattern("sort_name_normal.png"))
        doubleClick(getLastMatch().below(100))
        miro.verify_video_playback(reg)
Exemplo n.º 5
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)
Exemplo n.º 6
0
    def test_444(self):
        """http://litmus.pculture.org/show_test.cgi?id=444 external dl errors.

        1. http file url to download
        2. open with File Download menu
        3. Verify download completes
        4. Check title display via screenshot

        """
        item_url = "http://www.youtube.com/watch?v=LU-ZQWZSGfc&feature=fvhr"
        item_title = "watch"
        reg = MiroRegions()
        miro = MiroApp()
        miro.cancel_all_downloads(reg)
        dl_status = miro.download_from_a_url(reg, item_url, item_title)
        print dl_status
        self.assertTrue(dl_status == "failed")
        miro.quit_miro()
        miro.restart_miro()
        miro.click_sidebar_tab(reg, "Downloading")
        assert reg.m.exists(Pattern("file_not_found.png"))
        reg.m.click(item_title)
        type(Key.DELETE)
        miro.click_sidebar_tab(reg, "Videos")
        reg.s.waitVanish("Downloading")
Exemplo n.º 7
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)       
Exemplo n.º 8
0
    def test_5(self):
        """http://litmus.pculture.org/show_test.cgi?id=5 update install.

        Litmus Test Title:: 5 - upgrade from an earlier version of miro (3.5.1)
        Description: 
        1. Copy in Miro 3.5.1 database
        2. Launch miro and verify it is upgraded to current version.
        """
        
        miro = MiroApp()
        miro.quit_miro()
        db = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","databases","351sqlitedb")
        myLib.config.replace_database(db)
        #set the search regions
        miro.restart_miro()
        waitVanish("Upgrading")
        waitVanish("Preparing")
        time.sleep(10)
        miro.handle_crash_dialog('5', db=False, test=False)
        reg = MiroRegions()
        miro = MiroApp()
        
        miro.click_sidebar_tab(reg, "Downloading")
        miro.quit_miro()
        myLib.config.set_def_db_and_prefs()
Exemplo n.º 9
0
    def test_657(self):
        """http://litmus.pculture.org/show_test.cgi?id=657 edit multiple fields

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

        """
        
        reg = MiroRegions()
        miro = MiroApp()
        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"],
            ]
        
        try:       
            
            #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, title)
            if reg.m.exists("button_download.png",10):
                click(reg.m.getLastMatch())
            miro.wait_for_item_in_tab(reg, "Videos",item=title)
            miro.click_podcast(reg, feed)
            miro.tab_search(reg, title)
            reg.m.click(title)
            miro.edit_item_video_metadata_bulk(reg, new_metadata_list)
            time.sleep(2)
            miro.click_sidebar_tab(reg, "Videos")
            miro.tab_search(reg, title)
            reg.mtb.click("Clip")
            if reg.m.exists(title):
                reg.mtb.click("All")
            else:
                self.fail("item not found in Clips filter")
        
        finally:
            miro.quit_miro()
            myLib.config.set_def_db_and_prefs()
Exemplo n.º 10
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)
Exemplo n.º 11
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)
Exemplo n.º 12
0
    def test_108(self):
        """http://litmus.pculture.org/show_test.cgi?id=108 playback through unplayed items.

        1. add a feed url feed of small items
        2. download a few items 
        3. verify unplayed - playback through list
        4. verify marked as unplayed.

        """

        url_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","ShortCats.xml")
        url = "file:///"+url_path
        feed = "Short Cats"
##        url = "http://qa.pculture.org/feeds_test/2stupidvideos.xml"
##        feed = "TWO STUPID"
        
        reg = MiroRegions() 
        miro = MiroApp()


        #Set Global Preferences
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        playback_tab = prefs.open_tab("Playback")
        playback_tab.play_continuous("on", "Podcast")
        playback_tab.close_prefs()
        
        miro.add_feed(reg, url, feed)
        miro.set_podcast_autodownload(reg, setting="All")
        time.sleep(15)
        miro.set_podcast_autodownload(reg, setting="Off")
        if reg.s.exists("Downloading"):
            reg.s.waitVanish("Downloading")
        miro.click_sidebar_tab(reg, "Videos")
        miro.toggle_normal(reg)
        reg.m.wait("item_play_unplayed.png")
        if reg.m.exists("item_play_unplayed.png"):
            find(Pattern("sort_name_normal.png"))
            doubleClick(getLastMatch().below(100))
            wait(Pattern("playback_bar_video.png"),15)
        else:
            self.fail("no unplayed badges found")
        if exists(Pattern("playback_bar_video.png")):
            print "playback started"
            time.sleep(60)
            waitVanish(Pattern("playback_bar_video.png"))
        if reg.m.exists("item_play_unplayed.png"):
            self.fail("items not marked as unplayed")
Exemplo n.º 13
0
    def test_54(self):
        """http://litmus.pculture.org/show_test.cgi?id=54 Test Crash Reporter no DB.

        1. Perform a search of crash inducing text
        2. Submit crash dialog
        3. Quit Miro
        """
        print self.id()
        setAutoWaitTimeout(60)
        reg = MiroRegions()
        miro = MiroApp()

        term ="LET'S TEST DTV'S CRASH REPORTER TODAY"
        miro.click_sidebar_tab(reg, "Search")
        miro.search_tab_search(reg, term)
        miro.handle_crash_dialog( '54', db=False, test=True)
Exemplo n.º 14
0
    def test_55(self):
        """http://litmus.pculture.org/show_test.cgi?id=55 Test Crash Reporter with DB.

        1. Perform a search of crash inducing text
        2. Submit crash dialog with db
        3. Quit Miro
        """
       
        setAutoWaitTimeout(60)
        reg = MiroRegions()
        miro = MiroApp()

        term ="LET'S TEST DTV'S CRASH REPORTER TODAY"
        miro.click_sidebar_tab(reg, "Search")
        miro.search_tab_search(reg, term)
        miro.handle_crash_dialog( '55', test=True)
        miro.search_tab_search(reg, term=" ",engine=None)
Exemplo n.º 15
0
    def test_123(self):
        """http://litmus.pculture.org/show_test.cgi?id=123 add feed more than once.

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

        #3. Verify feed not duplicated
        p = miro.get_podcasts_region(reg)
        time.sleep(2)
        miro.count_images(reg,  img=feed,region="sidebar",num_expected=1)
        miro.delete_feed(reg, feed)
Exemplo n.º 16
0
    def test_82(self):
        """http://litmus.pculture.org/show_test.cgi?id=82 remember last search.

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

        SEARCHES = {"blip": 'octopus', "YouTube": 'cosmicomics'}
        for engine, term in SEARCHES.iteritems():
            miro.click_sidebar_tab(reg, "Search")
            miro.search_tab_search(reg, term, engine)
            miro.click_sidebar_tab(reg, "Videos")
            miro.click_sidebar_tab(reg, "Search")
            self.assertTrue(reg.mtb.exists(term.upper()))
Exemplo n.º 17
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)
Exemplo n.º 18
0
    def test_80(self):

        """http://litmus.pculture.org/show_test.cgi?id=80 Search - New Search Channel: URL
        1.Select Sidebar -> New Search Podcast
        2.Enter the search term: MP3
        3.Select the URL radio button and enter, http://www.ubu.com in the text box
        4.Click Create Podcast
        5.In the warning dialog - click Yes.
        """

        reg = MiroRegions() 
        miro = MiroApp()
        source = "http://www.ubu.com"
        term =  "mp3"
        search_term = "Gertrude"
        radio = "URL"
        miro.new_search_feed(reg, term,radio,source,defaults=False,watched=False)
        if exists("compatible",45):
            type(Key.ENTER)
        time.sleep(30)  # scraping takes a while - need to wait before confirming element present.
        miro.click_sidebar_tab(reg, "Podcasts")
        miro.tab_search(reg, search_term,confirm_present=True)
        miro.delete_feed(reg, term)  
Exemplo n.º 19
0
    def test_339(self):
        """http://litmus.pculture.org/show_test.cgi?id=339 delete feed with dl items.

        Litmus Test Title:: 339 - channels delete a feed with downloaded items
        Description: 
        1. Add the 2-stupid-videos feed, and download both items in the feed.  
        2. Remove Feed and Keep the videos.  
        3. Verify videos are displayed in the non-feed section of the Library
        4. Cleanup
        """

        
        #set the search regions
        reg = MiroRegions() 
        miro = MiroApp()

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

        #1. Add the feed and start dl
        miro.add_feed(reg, url,feed)
        time.sleep(3)
        miro.toggle_normal(reg)
#       miro.count_images(reg,  "item-context-button.png",region="mainright",num_expected=2)
        miro.set_podcast_autodownload(reg, setting="All")
        miro.wait_for_item_in_tab(reg, "videos","Flip")
        miro.wait_for_item_in_tab(reg, "videos","Dinosaur")
        miro.click_podcast(reg, feed)
        type(Key.DELETE)
        miro.remove_confirm(reg, action="keep")
        miro.click_sidebar_tab(reg, "videos")
        miro.tab_search(reg, "Flip",confirm_present=True)
        miro.tab_search(reg, "Dinosaur",confirm_present=True)
        #4. cleanup
        miro.delete_items(reg, "Flip","videos")
        miro.delete_items(reg, "Dinosaur","videos")
Exemplo n.º 20
0
    def test_92(self):
        """http://litmus.pculture.org/show_test.cgi?id=92 delete shortcut.

        1. add a feed and delete
        2. add a site and delete
        3. download an item and delete
        4. Verify item played as audio item

        """
        reg = MiroRegions()
        miro = MiroApp()

        # start the download of the misc file for later delete
        item_url = "http://www.boatingsidekicks.com/fish-detective.swf"
        if myLib.config.get_os_name() == "osx":
            reg.tl.click("File")
        else:
            type("f", KEY_ALT)
        reg.t.click("Download")
        time.sleep(4)
        type(item_url + "\n")

        def _delete_feed(self):
            feed_url = "stupidvideos.com/rss/rss.php?chart=new&format=yahoo"
            feed = "StupidVid"
            miro.shortcut("n")
            if reg.m.exists("URL", 3):
                miro.log_result("97", "test_92")
            time.sleep(2)
            type(feed_url + "\n")
            time.sleep(4)
            miro.delete_feed(reg, feed)
            miro.log_result("92", "delte feed shortcut verified")

        def _delete_feed_folder(self):
            folder_name = "My Folder"
            miro.shortcut("n", shift=True)
            if reg.m.exists("Folder", 3):
                miro.log_result("98", "test_92")
            time.sleep(2)
            type(folder_name + "\n")
            time.sleep(4)
            miro.delete_feed(reg, feed=folder_name)
            miro.log_result("92", "delte feed folder")

        # Add site - and delete using shortcut key
        def _delete_site(self):
            site_url = "http://blip.tv"
            site = "blip"
            miro.add_source(reg, site_url, site)
            time.sleep(2)
            miro.delete_site(reg, site)
            miro.log_result("92", "delte site shortcut verified")
            time.sleep(2)

        # Download item and with shortcut key, delete item
        def _delete_item(self):
            title = "detective"
            miro.wait_for_item_in_tab(reg, "Misc", "detective")
            miro.delete_items(reg, title, "Misc")
            miro.log_result("92", "delete item shortcut verified")
            time.sleep(5)

        # remove playlist
        def _delete_playlist(self):
            playlist = "Pavarotti"
            miro.add_playlist(reg, playlist, style="shortcut")
            miro.click_playlist(reg, playlist)
            miro.log_result("723", "test_92")
            miro.delete_current_selection(reg)
            time.sleep(3)
            self.assertFalse(reg.s.exists(playlist))
            miro.log_result("92", "delete playlist shortcut verified")

        # remove playlist folder
        def _delete_playlist_folder(self):
            miro.shortcut("p", shift=True)
            time.sleep(4)
            if reg.m.exists("playlist folder", 3):
                miro.log_result("724", "test_92")
            type("SUPERPLAYS" + "\n")
            time.sleep(3)
            p = miro.get_playlists_region(reg)
            p.click("SUPERPLAYS")
            time.sleep(2)
            miro.delete_current_selection(reg)
            time.sleep(2)
            self.assertFalse(p.exists("SUPERPLAYS", 3))
            miro.log_result("92", "delete playlist folder shortcut verified")

        try:
            _delete_feed(self)
            _delete_site(self)
            _delete_item(self)
            miro.click_sidebar_tab(reg, "Music")
            _delete_playlist(self)
            _delete_playlist_folder(self)
            _delete_feed_folder(self)
        except FindFailed, debugging:
            print debugging
Exemplo n.º 21
0
    def test_117(self):
        """http://litmus.pculture.org/show_test.cgi?id=117 delete multiple feeds then cancel.

        Litmus Test Title:: 117 - delete multiple feeds then cancel
        Description: 
        1. Add several feeds from list of guide feeds
        2. Select them all
        3. Delete, the cancel the delete
        4. Cleanup
        """
        
        #set the search regions
        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.default_view_setting("Standard")
        podcasts_tab.close_prefs()
     
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        feedlist = ["Center", "Earth"]

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

        p = miro.get_podcasts_region(reg)
        miro.click_sidebar_tab(reg, "Music")
        miro.click_podcast(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")
        miro.remove_confirm(reg, "cancel")
        p = miro.get_podcasts_region(reg)
        time.sleep(5)
        self.assertTrue(p.exists("Static",5))
        #4. Cleanup
        feedlist.append("Static")
        for x in feedlist:
            print x
            miro.delete_feed(reg, x)