コード例 #1
0
ファイル: sg42_feedsearch.py プロジェクト: GunioRobot/miro-qa
    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")
コード例 #2
0
ファイル: sg2_search.py プロジェクト: GunioRobot/miro-qa
    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)
コード例 #3
0
ファイル: sg6_feeds.py プロジェクト: GunioRobot/miro-qa
    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)
コード例 #4
0
ファイル: sg6_feeds.py プロジェクト: GunioRobot/miro-qa
    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") 
コード例 #5
0
ファイル: sg2_search.py プロジェクト: GunioRobot/miro-qa
    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)
コード例 #6
0
ファイル: sg31_playback.py プロジェクト: GunioRobot/miro-qa
    def test_160(self):
        """http://litmus.pculture.org/show_test.cgi?id=160.

        1. File -> Open
        2. Select video file on system
        3. Verify playback starts and item added to Library
        4. Cleanup - just remove from Library
        """
        
        reg = MiroRegions() 
        miro = MiroApp()

        
        try:
        
            vid_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","monkey.flv")
            miro.shortcut('o')
            miro.type_a_path(vid_path)
            time.sleep(3)
            self.assertTrue(exists(Pattern("playback_controls.png")))
            miro.shortcut("d")
        finally:
            type(Key.ESC)
コード例 #7
0
ファイル: sg41_one_click.py プロジェクト: GunioRobot/miro-qa
    def test_7(self):
        """http://litmus.pculture.org/show_test.cgi?id=7 add feed.

        1. Open Ryan is Hungry
        2. click one-click link
        3. Verify feed added
        4. Cleanup
        """
        
        reg = MiroRegions() 
        miro = MiroApp()
        feed = "Ryan"
        try:
            url = "http://ryanishungry.com/subscribe/"
            switchApp(miro.open_ff())
            if reg.t.exists("Firefox",45):
                click(reg.t.getLastMatch())
            miro.shortcut("l")
            time.sleep(2)
            type(url + "\n")
            time.sleep(20)
            if miro.os_name == "osx":
                self.shortcut('f', shift=True)
            else:
                type(Key.F11)
            
            find(ONE_CLICK_BADGE)
            click(ONE_CLICK_BADGE)
            time.sleep(25)
            miro.close_ff()
                        
            #Start Miro    
            miro.close_one_click_confirm(self)
            miro.shortcut("r",shift=True)
            miro.click_podcast(reg, feed)
        finally:
            miro.delete_feed(reg, feed)