Package org.jvnet.hudson.test.JenkinsRule

Examples of org.jvnet.hudson.test.JenkinsRule.WebClient.goTo()


    @Test
    @PresetData(DataSet.ANONYMOUS_READONLY)
    public void testPresetData() throws Exception {
        WebClient wc = rule.createWebClient();
        try {
            wc.goTo("loginError");
            fail("Expecting a 401 error");
        } catch (FailingHttpStatusCodeException e) {
            e.printStackTrace();
            assertEquals(SC_UNAUTHORIZED,e.getStatusCode());
        }
View Full Code Here


        servers.add(server);
        server.start();

        FreeStyleProject project = DuplicatesUtil.createGerritTriggeredJobForCommentAdded(j, "myGerritProject");
        WebClient wc = j.createWebClient();
        HtmlPage page = wc.goTo("/job/myGerritProject/configure");
        List<HtmlElement> elements = page.getDocumentElement().getElementsByAttribute("td", "class", "setting-name");
        HtmlElement tr = null;
        for (HtmlElement element : elements) {
            if ("Verdict Category".equals(element.getTextContent())) {
                tr = element.getEnclosingElement("tr");
View Full Code Here

        server2.getConfig().getCategories().add(new VerdictCategory("Verified", "Verified For Gerrit 2.6+"));

        FreeStyleProject project = DuplicatesUtil.createGerritTriggeredJobForCommentAdded(j, "myGerritProject",
                GerritServer.ANY_SERVER);
        WebClient wc = j.createWebClient();
        HtmlPage page = wc.goTo("/job/myGerritProject/configure");
        List<HtmlElement> elements = page.getDocumentElement().getElementsByAttribute("td", "class", "setting-name");
        HtmlElement tr = null;
        for (HtmlElement element : elements) {
            if ("Verdict Category".equals(element.getTextContent())) {
                tr = element.getEnclosingElement("tr");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.