Пример #1
0
    def test_29(self):
        """http://litmus.pculture.org/show_test.cgi?id=29 add site from miro site.

        1. Open Awesome website
        2. click one-click subscribe link for revver
        3. Verify site added
        4. Cleanup
        """       
        reg = MiroRegions() 
        miro = MiroApp()

        
        site_url = "http://pculture.org/feeds_test/subscription-test-guide.html"
        site = "Awesome"
        site2 = "Revver"
        miro.add_source_from_tab(reg, site_url)
        miro.click_last_source(reg)
        reg.t.find("Subscribe")
        reg.t.click("Subscribe")
        time.sleep(4)
        p = miro.get_sources_region(reg)
	if p.exists("http://rev",3) or \
           p.exists("revver",3):
            print "revver site added"
        else:
            self.fail("revver site not added to sidebar")                        
        miro.delete_site(reg, site)
        miro.delete_site(reg, "revver")
Пример #2
0
    def test_194(self):
        """http://litmus.pculture.org/show_test.cgi?id=194 rename source.

        1. Add blip.tv as a source
        2. rename
        3. restart and verify name persists
        4. Cleanup
        """
        site_url = "http://blip.tv"
        site = "blip"
        reg = MiroRegions() 
        miro = MiroApp()

        miro.add_source(reg, site_url,site)
        miro.click_source(reg, site)
        reg.t.click("Sidebar")
        reg.t.click("Rename")
        time.sleep(3)
        type("BLIP TV ROCKS \n")
        self.assertTrue(reg.s.exists("BLIP TV ROCKS"))

        miro.quit_miro()
        reg = MiroRegions() 
        miro = MiroApp()
        self.assertTrue(reg.s.exists("BLIP"))
        miro.delete_site(reg, "BLIP")
Пример #3
0
    def test_999reset(self):
        """fake test to reset db and preferences.

        """
        miro = MiroApp()
        miro.quit_miro()
        myLib.config.set_def_db_and_prefs()
        miro.restart_miro()
Пример #4
0
 def setUp(self):
     self.verificationErrors = []
     miro = MiroApp()
     print "starting test: ",self.shortDescription()
     miro.quit_miro()
     myLib.config.set_def_db_and_prefs()
     miro.restart_miro()
     time.sleep(10)        
Пример #5
0
    def test_001setup(self):
        """fake test to reset db and preferences.

        """
        miro = MiroApp()
        miro.quit_miro()
        myLib.config.set_def_db_and_prefs()
        miro.restart_miro()
        time.sleep(10)
Пример #6
0
    def test_001setup(self):
        """Pre subgroup run cleanup and preferences check.

        This isn't a real tests and is just meant to make sure the subgroup is starting with usual preferences settings and clean sidebar.
        """
        miro = MiroApp()
        miro.quit_miro()
        config.set_def_db_and_prefs()
        miro.restart_miro()
        time.sleep(10)
Пример #7
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")
Пример #8
0
    def test_182(self):
        """http://litmus.pculture.org/show_test.cgi?id=182 dl from youtube site.

        1. Open youtube url as site
        2. download button
        3. verify download started
        4. Cleanup
        """
        site_url = "http://www.youtube.com/watch?v=fgg2tpUVbXQ&feature=channel"
        site = "Hubble"
        
        reg = MiroRegions() 
        miro = MiroApp()
        try:
            miro.add_source_from_tab(reg, site_url)
            miro.click_last_source(reg)
            
            if reg.mtb.exists(Pattern("download_this_video.png")) or \
                      reg.mtb.exists("Download this"):
                click(reg.mtb.getLastMatch())
                time.sleep(3)
            miro.confirm_download_started(reg, "Deep")
            reg.mtb.click("download-cancel.png")
        finally:
            miro.delete_site(reg, site)
Пример #9
0
    def test_679(self):
        """http://litmus.pculture.org/show_test.cgi?id=679 create a playlist via menu.

        Also verifies test_222, remove playlist (via context menu)

        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

        """
        playlist = "EMPTY LIST"
        reg = MiroRegions() 
        miro = MiroApp()
        miro.add_playlist(reg, playlist,style="menu")
        p = miro.get_playlists_region(reg)
        list_loc = miro.click_playlist(reg, playlist)
        rightClick(Location(list_loc))
        p.click("Remove")
        miro.remove_confirm(reg, "remove")
        time.sleep(2)
        if p.exists(playlist):
            print "remove failed"
        else:
            miro.log_result("222","verified remove playlist via context menu")
Пример #10
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)
Пример #11
0
 def setUp(self):
     reg = MiroRegions() 
     miro = MiroApp()
     self.verificationErrors = []
     print "starting test: ",self.shortDescription()
     myLib.config.set_image_dirs()
     miro.quit_miro()
     myLib.config.set_def_db_and_prefs()
     myLib.config.delete_miro_downloaded_files()
     miro.restart_miro()
     time.sleep(10)
Пример #12
0
    def test_195(self):
        """http://litmus.pculture.org/show_test.cgi?id=196 delete site.

        1. Add header test as a source
        2. delete it 
        """
        site_url = "http://qa.pculture.org/feeds_test/header-test.php"
        site = "Header Test"
        reg = MiroRegions() 
        miro = MiroApp()
        miro.add_source(reg, site_url,site)
        miro.delete_site(reg, site)
Пример #13
0
    def test_youtube_9(self):
        """http://litmus.pculture.org/show_test.cgi?id=9 external dl youtube.

        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=5pB3gAjivrY"
        item_title = "Andrew"
        item_image = "andrew_garcia_straight_up.png"
        reg = MiroRegions()
        miro = MiroApp()
        miro.cancel_all_downloads(reg)
        miro.download_from_a_url(reg, item_url, item_title)
        assert download_playback_check_title(reg, miro, item_title, item_image)
Пример #14
0
    def test_16456_674(self):
        """http://litmus.pculture.org/show_test.cgi?id=674 https url download.

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

        """
        item_url = "https://www.youtube.com/watch?v=pOle1AnPOc4"
        item_title = "Charlie"
        item_image = "charlie_bit_me.png"
        reg = MiroRegions()
        miro = MiroApp()
        miro.cancel_all_downloads(reg)
        miro.download_from_a_url(reg, item_url, item_title)
        assert download_playback_check_title(reg, miro, item_title, item_image) 
Пример #15
0
    def test_9(self):
        """http://litmus.pculture.org/show_test.cgi?id=9 external dl.

        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://j2.video2.blip.tv/7790005512538/Miropcf-TurnASearchIntoAChannel756.mp4"
        item_title = "Miropcf"
        item_image = "Miropcf_TurnASearch.png"
        reg = MiroRegions()
        miro = MiroApp()
        miro.cancel_all_downloads(reg)
        miro.download_from_a_url(reg, item_url, item_title)
        assert download_playback_check_title(reg, miro, item_title, item_image)
Пример #16
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) 
Пример #17
0
    def test_1(self):
        """http://litmus.pculture.org/show_test.cgi?id=467 change sys language.

        1. Open Preferences
        2. Change the system default language
        3. Restart Miro
        4. Verify changes and reset
        5. Restart Miro
        
        """
        reg = MiroRegions()
        miro = MiroApp()
        #1. open preferences

        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.change_default_language( "Croatian")
        general_tab.close_prefs()
       
        miro.restart_miro()
        
        miro.open_prefs(reg, menu="Datoteka", option="Postavke")
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.change_to_english_language(from_lang="Croatian")
        general_tab.close_prefs()
Пример #18
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)
Пример #19
0
    def test_682(self):
        """http://litmus.pculture.org/show_test.cgi?id=54 Test Crash Reporter with DB.

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

        if myLib.config.get_os_name() == "osx":
            reg.tl.click("Dev")
        else:
            type('f',KEY_ALT)
            time.sleep(1)
            type(Key.LEFT)
        reg.t.click("Test Soft")
        miro.handle_crash_dialog( '682', db=True, test=True)      
Пример #20
0
    def stest_39(self):
        """http://litmus.pculture.org/show_test.cgi?id=39 site navigation.


        #skipping for now will fix later.
        
        1. Add blip.tv as a source
        2. navigate through site
        3. verify nav buttons and states
        4. Cleanup
        """
        site_url = "http://blip.tv"
        site = "blip"
        reg = MiroRegions() 
        miro = MiroApp()
        miro.add_source(reg, site_url,site)
        miro.click_source(reg, site)
        time.sleep(10)

        find("navstop_disabled.png")
        find("navforward_disabled.png")
        find("navhome.png")
        find("navreload.png")

        reg.m.click(myLib.testvars.blip_browse)
        reg.m.click(myLib.testvars.blip_recent)
        self.assertTrue(reg.mtb.exists("navback.png"))
        self.assertTrue(reg.mtb.exists("navforward_disabled.png"))
        self.assertTrue(reg.mtb.exists("navhome.png"))
        self.assertTrue(reg.mtb.exists("navreload.png"))

        reg.mtb.click("navback.png")
        self.assertTrue(reg.mtb.exists("navforward.png"))
        self.assertTrue(reg.mtb.exists("navback_disabled.png"))
        self.assertTrue(reg.mtb.exists("navhome.png"))
        self.assertTrue(reg.mtb.exists("navreload.png"))

        reg.mtb.click("navforward")
        self.assertTrue(reg.mtb.exists("navback.png"))
        self.assertTrue(reg.mtb.exists("navforward_disabled.png"))
        self.assertTrue(reg.mtb.exists("navhome.png"))
        self.assertTrue(reg.mtb.exists("navreload.png"))
        
        reg.mtb.click("navreload.png")
        reg.mtb.click("navstop.png")
        self.assertTrue(reg.mtb.exists("navback.png"))
        self.assertTrue(reg.mtb.exists("navforward.png"))
        self.assertTrue(reg.mtb.exists("navhome.png"))
        self.assertTrue(reg.mtb.exists("navreload.png"))

        reg.mtb.click("navhome.png")
        #FIX MEwait for the updating icon to appear then disappear
        self.assertTrue(reg.mtb.exists("navback.png"))
        self.assertTrue(reg.mtb.exists("navforward_disabled.png"))
        self.assertTrue(reg.mtb.exists("navhome.png"))
        self.assertTrue(reg.mtb.exists("navreload.png"))
        miro.delete_site(reg, site)
Пример #21
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)
Пример #22
0
    def test_13827_633(self):
        """http://litmus.pculture.org/show_test.cgi?id=633 503 error retry.

        1. 503 error file url download
        2. open with File Download menu
        3. Verify error message are displayed with retry option

        """
        url = "http://pculture.org/feeds_test/503.php"
        reg = MiroRegions()
        miro = MiroApp()
        miro.cancel_all_downloads(reg)
        reg.tl.click("File")
        reg.tl.click("Download from")
        time.sleep(3)
        type(url+"\n")
        for x in range(0,2):
            time.sleep(3)
            find(Pattern("retry_dialog.png").similar(0.5))
            type(Key.ENTER)
        type(Key.ESC)
Пример #23
0
    def test_419(self):
        """http://litmus.pculture.org/show_test.cgi?id=419 external torrent dl.

        1. clearbits torrent dl
        2. open with File Download menu
        3. Verify download started and metadata
        4. Cleanup

        """
        reg = MiroRegions()
        miro = MiroApp()
        
        item_url = "http://youtorrent.com/download/7379834/young-broke-and-fameless-the-mixtape.torrent"
        item_title = "Fameless"
        reg.tl.click("File")
        reg.tl.click("Download from")
        time.sleep(5)
        type(item_url+"\n")
        print ("confirm download started")
        status = miro.confirm_download_started(reg, item_title)
        print status
        if status == "downloaded":
            miro.delete_items(reg, item_title,"Misc")
        elif status == "in_progress":
            miro.delete_items(reg, item_title,"Downloading")
        else:
            self.fail("Can not confirm download started")
Пример #24
0
    def test_681(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()
        if myLib.config.get_os_name() == "osx":
            type(Key.F2, KeyModifier.CTRL)
            for x in range(0,11):
                type(Key.RIGHT)
            type(Key.DOWN)
        else:
            type('f',KEY_ALT)
            time.sleep(1)
            type(Key.LEFT)
        reg.t.click("Test Soft")
        miro.handle_crash_dialog( '681', db=False, test=True)
Пример #25
0
    def test_196(self):
        """http://litmus.pculture.org/show_test.cgi?id=196 create new empty feed folder.

        Litmus Test Title:: 198 - new 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(myLib.testvars.timeout)
        #set the search regions
        folder = "GREAT STUFF"        
        reg = MiroRegions() 
        miro = MiroApp()
        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
        miro.click_podcast(reg, folder)       
        miro.delete_feed(reg, "GREAT")
Пример #26
0
    def test_88_461(self):
        """http://litmus.pculture.org/show_test.cgi?id=461 upgrade corrupt db, submit crash no db

        Litmus Test Title:: 461 - upgrade with corrupted db, submit crash no db
        Description: 
        1. Replace Miro db with a corrupt database.
        2. Launch miro and submit crash report with db
        """
        try:
            miro = MiroApp()
            miro.quit_miro()
            db = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","databases","corrupt_db")
            myLib.config.replace_database(db)
            #set the search regions
            miro.restart_miro()
            miro.corrupt_db_dialog(action="submit_crash",db=False)
        finally:
            miro.quit_miro()
            myLib.config.set_def_db_and_prefs()
Пример #27
0
    def setUp(self):
        """ All playlist tests require data. Going to add feed and watched folder at the start of the subgroup.

        """
        self.verificationErrors = []
        miro = MiroApp()
        print "starting test: ",self.shortDescription()
        myLib.config.set_image_dirs()
        miro.quit_miro()
        myLib.config.set_def_db_and_prefs()
        miro.restart_miro()
        time.sleep(10)
        reg = MiroRegions() 
        miro = MiroApp()
        feed = "TestData"
        folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
        miro.add_watched_folder(reg, folder_path)
Пример #28
0
    def test_221(self):
        """http://litmus.pculture.org/show_test.cgi?id=221 rename playlist.

        """
        playlist = "TAB LIST"
        reg = MiroRegions() 
        miro = MiroApp()
        miro.add_playlist(reg, playlist,style="tab")
        miro.log_result("708","test_221 - added playlist via Playlist top level tab")
        list_loc = miro.click_playlist(reg, playlist)
        print list_loc
        rightClick(Location(list_loc))
        type(Key.DOWN)
        type(Key.ENTER)
        time.sleep(2)
        type("NEW NAME \n")
        miro.click_playlist(reg, playlist="NEW NAME")
Пример #29
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)
Пример #30
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)