Esempio n. 1
0
    def test_458(self):
        """http://litmus.pculture.org/show_test.cgi?id=458 edit blank item description

        1. add TWO STUPID feed
        2. download the Flip Faceitem
        3. Edit item description
        4. Cleanup
        """
        
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://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, "Videos",item=title)
        reg.m.click(title)
        miro.edit_item_metadata(reg, meta_field="about",meta_value="Blank description edited")
        miro.tab_search(reg, "blank description")
        if reg.m.exists(title):
            miro.log_result("656","test_458")           
        else:
            miro.log_result("656","test_458",status="fail")
        #cleanup
        miro.delete_feed(reg, feed)
Esempio n. 2
0
    def test_728(self):
        """http://litmus.pculture.org/show_test.cgi?id=728 edit metadata for mulitple items

        1. add Static List feed
        2. download the Earth Eats item
        3. Edit item metadata
       

        """
        reg = MiroRegions() 
        miro = MiroApp()
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.show_audio_in_music("on")
        general_tab.close_prefs()
        
        url = "http://qa.pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Earth Eats"
        title = "Mushroom" # item title updates when download completes
        new_type = "Video"

        edit_itemlist = [
            ["name", "Earth Day Everyday", "647"],
            ["artist", "Oliver and Katerina", "648"],
            ["album", "Barki Barks", "649"],
            ["genre", "family", "650"],
            ["track_num" ,"1", "673"],
            ["track_of" ,"2", "673"],
            ["year", "2010", "655"],
            ["rating", "5", "651"],
            ]
        
        #start clean
        miro.delete_feed(reg, feed)
        #add feed and download earth eats item
        miro.add_feed(reg, url,feed)
        miro.toggle_normal(reg)
        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")
        for x in edit_itemlist:
            miro.edit_item_metadata(reg, meta_field=x[0],meta_value=x[1])
            try:
                miro.log_result(x[2],"test_647")
            finally:
                time.sleep(2)
        if not miro.tab_search(reg, "Earth Day",confirm_present=True) == True:
            self.fail("new title not saved")
        #cleanup
        miro.delete_feed(reg, feed)
Esempio n. 3
0
    def test_363(self):
        """http://litmus.pculture.org/show_test.cgi?id=363 edit item metadata

        1. add Static List feed
        2. download the Earth Eats item
        3. Edit item metadata
        4. Verify item played as audio item

        """
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        url = "http://qa.pculture.org/feeds_test/list-of-guide-feeds.xml"
        feed = "Static"
        term = "Earth Eats"
        title = "Mushroom" 
        new_type = "Video"
        #Set Global Preferences
        miro.open_prefs(reg)
        prefs = PreferencesPanel()
        general_tab = prefs.open_tab("General")
        general_tab.show_audio_in_music("on")
        general_tab.close_prefs()

        
        miro.delete_feed(reg, feed)
        
        #add feed and download earth eats item
        miro.add_feed(reg, url,feed)
        miro.toggle_normal(reg)
        miro.tab_search(reg, title=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_metadata(reg, meta_field="about",meta_value="hoovercraft full of eels")
        miro.tab_search(reg, "hoovercraft eels")
        if not reg.m.exists(title):
            self.fail("can not verify description edited")
        miro.delete_feed(reg, feed)
Esempio n. 4
0
    def test_653(self):
        """http://litmus.pculture.org/show_test.cgi?id=653 edit album art

        1. add watched folder
        2. Edit artwork for 1 item
        3. Edit artwork for multiple items
        4. Cleanup
        """
        
        reg = MiroRegions() 
        miro = MiroApp()
        time.sleep(5)
        folder_path = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","ArtTest")
        title = "Pancakes"
        title2 = "summer"
        title3="deerhunter"
       
        
        #1. add watched folder
        miro.add_watched_folder(reg, folder_path)
        if reg.s.exists("ArtTest"):
            click(reg.s.getLastMatch())          
            miro.log_result("157","test_653")
        art_file = os.path.join(os.getenv("PCF_TEST_HOME"),"Miro","TestData","album_art1.jpg")    
        #add feed and download flip face item
        miro.toggle_normal(reg)
        miro.tab_search(reg, title)
        try:
            reg.m.find(title)
            reg.m.click(title)
            reg.mtb.click("tabsearch_clear.png")
            miro.edit_item_metadata(reg, meta_field="art",meta_value=art_file)
            ## Verify new image here:
            reg.m.find(Pattern("album_art1.png"))
        finally:
            miro.open_prefs(reg)
            prefs = PreferencesPanel()
            folder_tab = prefs.open_tab("Folders")
            folder_tab.remove_watched_folder("ArtTest")
            folder_tab.close_prefs()