Exemple #1
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
        """
        if exists("Miro",3) or \
           exists("Music",3):
            click(getLastMatch())
        mirolib.quit_miro(self)
        if config.get_os_name() == "osx":
            time.sleep(20)
        config.delete_database_and_prefs()
        config.delete_miro_video_storage_dir()
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        mirolib.restart_miro(confirm=False)
        search_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
        mirolib.first_time_startup_dialog(self,lang="Default",run_on_start="No",search="Yes",search_path="Everywhere",itunes="No")
        reg = mirolib.AppRegions()
        time.sleep(10)
        mirolib.click_sidebar_tab(self,reg,"Videos")
        find(Pattern("sort_name_normal.png").exact())
        doubleClick(getLastMatch().below(100))
        mirolib.verify_video_playback(self,reg)
Exemple #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)
Exemple #3
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
        """
        if exists("Miro",3) or \
           exists("Music",3):
            click(getLastMatch())
        mirolib.quit_miro(self)
        if config.get_os_name() == "osx":
            time.sleep(20)
        config.delete_database_and_prefs()
        config.delete_miro_video_storage_dir()
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        mirolib.restart_miro(confirm=False)
        search_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData")
        mirolib.first_time_startup_dialog(self,lang="Default",run_on_start="No",search="Yes",search_path=search_path,itunes="No")
        reg = mirolib.AppRegions()
        time.sleep(10)
        mirolib.click_sidebar_tab(self,reg,"Videos")
        mirolib.tab_search(self,reg,title="Deerhunter",confirm_present=True)
        mirolib.click_sidebar_tab(self,reg,"Music")
        mirolib.tab_search(self,reg,title="Pancakes",confirm_present=True)
Exemple #4
0
    def test_999reset(self):
        """fake test to reset db and preferences.

        """
        mirolib.quit_miro(self)
        config.set_def_db_and_prefs()
        mirolib.restart_miro(confirm=False)
        time.sleep(10)        
Exemple #5
0
    def test_362(self):
        """http://litmus.pculture.org/show_test.cgi?id=362 edit item music to video

        1. add Static List Feed
        2. download the Earth Eats
        3. Edit item from Audio to Video
        4. Verify item played as video item

        """
        reg = mirolib.AppRegions()
        time.sleep(5)
        url = "http://pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Earth Eats"
        title = "Mushroom"
        new_type = "Video"
        #Set Global Preferences
        mirolib.delete_feed(self,reg,feed)
        prefs.set_item_display(self,reg,option="audio",setting="on")
        time.sleep(2)
        prefs.set_item_display(self,reg,option="video",setting="on")
        time.sleep(2)
        prefs.set_autodownload(self,reg,setting="Off")
        time.sleep(2)

        
        #add feed and download joo joo item
        mirolib.add_feed(self,reg,url,feed)
        mirolib.tab_search(self,reg,term)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())
        mirolib.wait_for_item_in_tab(self,reg,"Music",item=title)
        reg.m.click(title)
        mirolib.edit_item_type(self,reg,new_type)
        #locate item in audio tab and verify playback
        mirolib.wait_for_item_in_tab(self,reg,tab="Video",item=title)
        doubleClick(reg.m.getLastMatch())
        mirolib.verify_video_playback(self,reg)
        mirolib.quit_miro(self,reg)
        mirolib.restart_miro()
        mirolib.wait_for_item_in_tab(self,reg,tab="Video",item=title)
        #cleanup
        mirolib.delete_feed(self,reg,feed)
Exemple #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)
Exemple #7
0
    def test_460(self):
        """http://litmus.pculture.org/show_test.cgi?id=460 upgrade corrupt db submit crash with db

        Litmus Test Title:: 460 - upgrade with corrupted db submit crash report with db
        Description: 
        1. Replace Miro db with a corrupt database.
        2. Launch miro and submit crash report with db
        """
        if exists("Miro",3) or \
           exists("Music",3):
            click(getLastMatch())
        mirolib.quit_miro(self)
        if config.get_os_name() == "osx":
            time.sleep(20)
        db = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","databases","corrupt_db")
        config.replace_database(db)
        setAutoWaitTimeout(testvars.timeout)
        #set the search regions
        mirolib.restart_miro(confirm=False)
        mirolib.corrupt_db_dialog(action="submit_crash",db=True)
Exemple #8
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 = mirolib.AppRegions()
        mirolib.add_source_from_tab(self,reg,site_url)
        mirolib.click_last_source(self,reg)
        reg.m.find(testvars.dizizle_logo)
        mirolib.quit_miro(self,reg)
        mirolib.restart_miro()
        mirolib.click_last_source(self,reg)
        self.assertTrue(reg.m.exists(testvars.dizizle_logo))    
        mirolib.delete_site(self,reg,site)
Exemple #9
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)
Exemple #10
0
    def test_441(self):
        """http://litmus.pculture.org/show_test.cgi?id=441 delete podcast item outside of miro

        1. add TwoStupid feed
        2. download the Flip Faceitem
        3. restart miro
        4. delete the item
        5. restart miro
        6. verify item still deleted
        """
        reg = mirolib.AppRegions()
        remember = False
        try:
            prefs.set_preference_checkbox(self,reg,tab="General",option="When starting",setting="on")
            remember = True
        except:
            remember = False
            type(Key.ESC) #close the dialog if it didn't work
        time.sleep(5)
        url = "http://pculture.org/feeds_test/2stupidvideos.xml"
        feed = "TwoStupid"
        title = "Flip" # item title updates when download completes
             
        #add feed and download flip face item
        mirolib.add_feed(self,reg,url,feed)
        mirolib.toggle_normal(reg)
        mirolib.tab_search(self,reg,title)
        if reg.m.exists("button_download.png",10):
            click(reg.m.getLastMatch())
        mirolib.wait_for_item_in_tab(self,reg,tab="Videos",item=title)
        mirolib.click_podcast(self,reg,feed)
        mirolib.tab_search(self,reg,title)
        reg.m.click(title)     
        filepath = mirolib.store_item_path(self,reg)
        if os.path.exists(filepath):
            print "able to verify on os level"
            found_file = True
        mirolib.quit_miro(self,reg)
        mirolib.restart_miro()
        if remember == True and reg.m.exists("title",15):  #check the remember last tab setting
            mirolib.log_result("698","test_441")
        else:
            mirolib.click_podcast(self,reg,feed)
        mirolib.tab_search(self,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:
            mirolib.quit_miro(self,reg)
            mirolib.restart_miro()
            mirolib.click_podcast(self,reg,feed)
            mirolib.tab_search(self,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 mirolib.confirm_download_started(self,reg,title) != "in_progress":
                self.fail("item not properely deleted")    
        #cleanup
        mirolib.delete_feed(self,reg,feed)
Exemple #11
0
    def test_467(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 = mirolib.AppRegions()
        #1. open preferences
        p = prefs.open_prefs(self,reg)
        #2. change language to croatian (hr)
        if p.exists("System default") or p.exists("English"):
            click(p.getLastMatch())
        for x in range(0,3):
            if not exists("Croatian",3):
                type(Key.PAGE_DOWN)
        for x in range(0,6):
            if not exists("Croatian",3):
                type(Key.PAGE_UP)
        click("Croatian")
        time.sleep(2)
        type(Key.TAB)
        type(Key.TAB)
        type(Key.ENTER)
        #mirolib.shortcut("w")
        type(Key.ESC)
        #3. Restart Miro
        mirolib.quit_miro(self,reg)
        mirolib.restart_miro()

        #4. Verify Changes and reset
        prefs.open_prefs(self,reg,lang='hr',menu='Datoteka',option='Postavke')
        if p.exists("Croatian"):
            click(p.getLastMatch())
        else:
            find("Jezik")
            click(getLastMatch().right(40))
        type(Key.PAGE_UP)
        for x in range(0,3):
            if exists("English",3):
                break
            else:
                type(Key.PAGE_UP)
        click("English")
        time.sleep(2)
        type(Key.TAB)
        type(Key.TAB)
        type(Key.ENTER)
        type(Key.ESC)
        time.sleep(2)
        #5. Restart Miro
        if reg.s.exists("icon-search.png",3) or \
           reg.s.exists("icon-video.png",3):
            click(reg.s.getLastMatch())
            time.sleep(3)
        mirolib.shortcut('q')
        time.sleep(2)
        mirolib.restart_miro()
        self.assertTrue(exists("File"))