Пример #1
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()
Пример #2
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()
Пример #3
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)
Пример #4
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")
Пример #5
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)
Пример #6
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()
Пример #7
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)        
Пример #8
0
    def test_441(self):
        """http://litmus.pculture.org/show_test.cgi?id=441 delete podcast item outside of miro

        1. add TWO STUPID feed
        2. download the Flip Faceitem
        3. restart miro
        4. delete the item
        5. restart miro
        6. verify item still deleted
        """
        reg = MiroRegions() 
        miro = MiroApp()

        #Set Global Preferences

        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.close_prefs()
   
        url = "http://qa.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, tab="Videos",item=title)
        reg.m.find(title)
        reg.m.click(title)
        reg.mtb.click("tabsearch_clear.png")
        filepath = miro.store_item_path(reg)
        if os.path.exists(filepath):
            print "able to verify on os level"
            found_file = True
        miro.tab_search(reg, title)
        reg.m.click(title)
        type(Key.DELETE)

        if found_file == True:
            if os.path.exists(filepath):
                self.fail("file not deleted from filesystem")
        else:
            miro.quit_miro()
            miro.restart_miro()
            miro.click_podcast(reg, feed)
            miro.tab_search(reg, term)
            if not reg.m.exists(Pattern("button_download.png")):
                self.fail("no download button, file not deleted")
            else:
                reg.m.click(Pattern("button_download.png"))
            if miro.confirm_download_started(reg, title) != "in_progress":
                self.fail("item not properely deleted")    
        #cleanup
        miro.delete_feed(reg, feed)
Пример #9
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)
Пример #10
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)
Пример #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_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)
Пример #13
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)
Пример #14
0
    def test_235(self):
        """http://litmus.pculture.org/show_test.cgi?id=235 startup missing movies dir, no downloads

        Litmus Test Title:: 235 - startup missing movies dir.
        Description: 
        1. delete movies dir, launch miro
        2. 
        """
        reg = MiroRegions() 
        miro = MiroApp()
        miro.quit_miro()
        myLib.config.delete_miro_video_storage_dir()
        setAutoWaitTimeout(myLib.testvars.timeout)
        #set the search regions
        miro.restart_miro()
        reg = MiroRegions() 
        miro = MiroApp()
Пример #15
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(myLib.testvars.timeout)
        #set the search regions
        folder = "Great Stuff"
        new_name1 = "INCREDIBLE"
        new_name2 = "AWFUL"
        
        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, feed=folder)
        time.sleep(3)
        reg.t.click("Sidebar")
        reg.t.click("Rename")
        time.sleep(2)
        type(new_name1 + "\n")
        miro.click_podcast(reg, feed=new_name1)
        miro.restart_miro()
        p = miro.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")
            miro.click_podcast(reg, feed=new_name2)
            
        miro.delete_feed(reg, new_name2)
Пример #16
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()
Пример #17
0
    def test_194(self):
        """http://litmus.pculture.org/show_test.cgi?id=194 site with non-utf-8 chars.

        1. Add http://qa.pculture.org/feeds_test/test-guide-unicode.html 
        2. Verify added
        3. Restart and verify still there
        4. Cleanup
        """
        
        site_url = "http://qa.pculture.org/feeds_test/test-guide-unicode.html"
        site = "Awesome"            
        reg = MiroRegions() 
        miro = MiroApp()
        miro.add_source_from_tab(reg, site_url)
        miro.click_last_source(reg)
        reg.m.find("unicode")
        miro.quit_miro()
        miro.restart_miro()
        miro.click_last_source(reg)
        self.assertTrue(reg.m.exists("unicode"))
        miro.delete_site(reg, site)
Пример #18
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)
Пример #19
0
    def test_194(self):
        """http://litmus.pculture.org/show_test.cgi?id=194 site with non-utf-8 chars.

        1. Add http://diziizle.net/
        2. Verify added
        3. Restart and verify still there
        4. Cleanup
        """
        
        site_url = "http://diziizle.net/"
        site = "diziizle"
        setAutoWaitTimeout(60)                
        reg = MiroRegions() 
        miro = MiroApp()
        miro.add_source_from_tab(reg, site_url)
        miro.click_last_source(reg)
        reg.m.find(myLib.testvars.dizizle_logo)
        miro.quit_miro()
        miro.restart_miro()
        miro.click_last_source(reg)
        self.assertTrue(reg.m.exists(myLib.testvars.dizizle_logo))    
        miro.delete_site(reg, site)
Пример #20
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)
Пример #21
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(myLib.testvars.timeout)
        #set the search regions
        miro = MiroApp()
        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-test.opml")

        
        #1. Add the feeds 
        miro.import_opml(reg, opml_path)
        p = miro.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("GEEKY"):
            self.fail("GEEKY folder not moved above 'Featured' podcast")

        #Cleanup - select all the podcasts and delete
        miro.delete_all_podcasts(reg)
Пример #22
0
    def test_17556_5(self):
        """http://litmus.pculture.org/show_test.cgi?id=5 update install from recoverably bad db, upgrade_80, bz 17556.

        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","bz17556_backup80")
        myLib.config.replace_database(db)
        time.sleep(5)
        #set the search regions
        miro.restart_miro()
        waitVanish("Upgrading")
        waitVanish("Preparing")
        time.sleep(10)
        miro.quit_miro()
        myLib.config.reset_preferences()
        miro.restart_miro()
        reg = MiroRegions()
        miro = MiroApp()
        miro.click_podcast(reg, "Starter")
Пример #23
0
 def test_001setup(self):
     miro = MiroApp()
     miro.quit_miro()
     myLib.config.set_def_db_and_prefs()
     miro.restart_miro()
     time.sleep(10)