Example #1
0
    def test_117(self):
        """http://litmus.pculture.org/show_test.cgi?id=117 delete multiple feeds then cancel.

        Litmus Test Title:: 117 - delete multiple feeds then cancel
        Description: 
        1. Add several feeds from list of guide feeds
        2. Select them all
        3. Delete, the cancel the delete
        4. Cleanup
        """
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        reg = mirolib.AppRegions()      
        prefs.set_autodownload(self,reg,setting="Off")
        prefs.set_default_view(self,reg,setting="Standard")

        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        feedlist = ["Center", "Earth"]

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

        p = mirolib.get_podcasts_region(reg)
        mirolib.click_sidebar_tab(self,reg,"Music")
        mirolib.click_podcast(self,reg,feed)            
        #2. Select them all
       
        keyDown(Key.SHIFT)  
        for x in feedlist:
            if p.exists(x):
                p.click(x)
            else:
                print "could not find feed" +str(x)
            time.sleep(2)
        keyUp(Key.SHIFT)
        #3. Delete then cancel.  Verify still exists Static List
        if reg.m.exists("Delete",4) or reg.m.exists("button_mv_delete_all.png",4):
            click(reg.m.getLastMatch())
        else:
            self.fail("Can't find Delete All button in main view")
        mirolib.remove_confirm(self,reg,"cancel")
        p = mirolib.get_podcasts_region(reg)
        time.sleep(5)
        self.assertTrue(p.exists("Static",5))
        #4. Cleanup
        feedlist.append("Static")
        for x in feedlist:
            print x
            mirolib.delete_feed(self,reg,x)
Example #2
0
    def test_199(self):
        """http://litmus.pculture.org/show_test.cgi?id=199 reorder folders in sidebar

        Litmus Test Title:: 199 - reorder folders in the sidebar
        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-test.opml")

        
        #1. Add the feeds 
        mirolib.import_opml(self,reg,opml_path)
        p = mirolib.get_podcasts_region(reg)
        x = p.find("GEEKY")
        y = p.find("Featured")
        dragDrop(x,y)
        time.sleep(2)
        p.click("Featured")
        ror = Region(p.getLastMatch().above(250))
        if not ror.exists("Make"):
            self.fail("GEEKY folder not moved above 'Featured' podcast")

        #Cleanup - select all the podcasts and delete
        mirolib.delete_all_podcasts(self,reg)
Example #3
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(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)
Example #4
0
    def test_722(self):
        """http://litmus.pculture.org/show_test.cgi?id=722 delete feeds and folders confirm dialog.

        Litmus Test Title:: 722 - delete feeds confirm dialog
        Description: 
        1. Import OPML file of some feeds and folders
        2. 1 feed and 1 folder
        3. Delete, verify confirm dialog, and delete
        4. Cleanup
        """
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        reg = mirolib.AppRegions()
        mirolib.delete_all_podcasts(self,reg)
        opml_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","folder-test.opml")
        feed = "Featured"
        folder = "GEEKY"
        feedlist = ["Google", "Make","GEEKY","Featured"]

        #1. Add the feeds 
        mirolib.import_opml(self,reg,opml_path)
   
        p = mirolib.get_podcasts_region(reg)
        mirolib.click_podcast(self,reg,feed)            
        #2. Select the folder too
        keyDown(Key.SHIFT)
        p.click(folder)
        keyUp(Key.SHIFT)
        #3. Delete then cancel.  Verify still exists Static List
        type(Key.DELETE)
        for x in feedlist:
            mirolib.count_images(self,reg,img=x,region="main",num_expected=1)             
        type(Key.ENTER)
        time.sleep(2)
        #4. Cleanup
        mirolib.delete_all_podcasts(self,reg)
        p = mirolib.get_podcasts_region(reg)
        for x in feedlist:
            if not p.exists(x):
                mirolib.log_result("202","test_722")
Example #5
0
    def test_123(self):
        """http://litmus.pculture.org/show_test.cgi?id=123 add feed more than once.

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

        #3. Verify feed not duplicated
        p = mirolib.get_podcasts_region(reg)
        time.sleep(2)
        mirolib.count_images(self,reg, img=feed,region="sidebar",num_expected=1)
        mirolib.delete_feed(self,reg,feed)
        mirolib.delete_feed(self,reg,feed2)
Example #6
0
    def test_198(self):
        """http://litmus.pculture.org/show_test.cgi?id=198 rename folder.

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

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

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

        
        mirolib.tab_search(self,reg,"my feed")
        mirolib.toggle_list(reg)
        
        mirolib.count_images(self,reg,img="my feed",region="list",num_expected=5)
        mirolib.click_podcast(self,reg,feed)
        mirolib.shortcut("r")
        time.sleep(10)
        mirolib.get_podcasts_region(reg)
        if mirolib.count_images(self,reg,img="my feed",region="list",num_expected=10) == 10:
            mirolib.log_result("99","test_92") #verifies update podcast shortcut
        mirolib.click_podcast(self,reg,feed)
        for x in range(0,3):
            mirolib.shortcut("r")
            time.sleep(3)
        mirolib.open_podcast_settings(self,reg)
        mirolib.change_podcast_settings(self,reg,option="Podcast Items",setting="Keep 0")
        time.sleep(2)
        mirolib.get_podcasts_region(reg)
        mirolib.count_images(self,reg,img="my feed",region="list",num_expected=5)
        #4. cleanup
        mirolib.delete_feed(self,reg,"my feed")