Package org.jvnet.hudson.test.JenkinsRule

Examples of org.jvnet.hudson.test.JenkinsRule.WebClient


    }

    @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());
        }

        // but not once the user logs in.
        verifyNotError(wc.login("alice"));
    }
View Full Code Here


        GerritServer server = new GerritServer(PluginImpl.DEFAULT_SERVER_NAME);
        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("Code-Review", "Code Review For Gerrit 2.6+"));
        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

Related Classes of org.jvnet.hudson.test.JenkinsRule.WebClient

Copyright © 2018 www.massapicom. 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.