Exemplo n.º 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 = mirolib.AppRegions()

        
        site_url = "http://pculture.org/feeds_test/subscription-test-guide.html"
        site = "Awesome"
        site2 = "Revver"
        mirolib.add_source_from_tab(self,reg,site_url)
        mirolib.click_last_source(self,reg)
        reg.t.find("Subscribe")
        reg.t.click("Subscribe")
        time.sleep(4)
        p = mirolib.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")                        
        mirolib.delete_site(self,reg,site)
        mirolib.delete_site(self,reg,"revver")
Exemplo n.º 2
0
    def test_143(self):
        """http://litmus.pculture.org/show_test.cgi?id=143 multiple delete and cancel.

        1. Add clearbits and archive.org
        2. select bogh and delete, the cancel
        3. verify sites not deleted.
        4. Cleanup
        """
        site_url = "http://clearbits.net"
        site_url2 = "http://archive.org"
        site = "ClearBits"
        site2 = "Internet"
        setAutoWaitTimeout(60)
        reg = mirolib.AppRegions()

        mirolib.add_source(self,reg,site_url,site)
        mirolib.add_source(self,reg,site_url2,site2)
        p = mirolib.get_sources_region(reg)
        p.click(site)
        keyDown(Key.SHIFT)
        p.click(site2)
        keyUp(Key.SHIFT)
        if reg.m.exists("Delete All",5) or \
           reg.m.exists(Pattern("button_mv_delete_all.png"),5):
            click(reg.m.getLastMatch())
        else:
            self.fail("Delete All button for multi-select not found")
        mirolib.remove_confirm(self,reg,"cancel")
        time.sleep(3)
        p = mirolib.get_sources_region(reg)
        time.sleep(3)
        self.assertTrue(p.exists(site))
        self.assertTrue(p.exists(site2))

        #Cleanup
        mirolib.delete_site(self,reg,site)
        mirolib.delete_site(self,reg,site2)