Package org.jsoup.select

Examples of org.jsoup.select.Elements.attr()


        Elements headers = html.select("table > thead > tr > th");
        assertThat(headers.size(), equalTo(1));
        assertThat(headers.text(), equalTo("Customer"));
       
        Elements resultRows = html.select("table > tbody > tr");
        assertThat(resultRows.attr("ng-repeat"), containsString("result in searchResults"));
       
        Elements resultCells = resultRows.select(" > td");
        assertThat(resultCells.size(), equalTo(1));
        assertThat(resultCells.select("a").attr("href"), equalTo("#/"+"SampleEntities"+ "/edit/{{result.customer}}"));
        assertThat(resultCells.select("a").text(), equalTo("{{result.customer.id}}"));
View Full Code Here


        Document html = Jsoup.parseBodyFragment(output);
        assertThat(output.trim(), not(equalTo("")));
       
        Elements container = html.select("div.form-group");
        assertThat(container, notNullValue());
        assertThat(container.attr("ng-class"), not(equalTo("")));
       
        Elements nToManyWidgetElement = html.select("div.form-group > div.col-sm-10");
        assertThat(nToManyWidgetElement, notNullValue());

        Elements selectElement = nToManyWidgetElement.select(" > select");
View Full Code Here

       
        Elements nToManyWidgetElement = html.select("div.form-group > div.col-sm-10");
        assertThat(nToManyWidgetElement, notNullValue());

        Elements selectElement = nToManyWidgetElement.select(" > select");
        assertThat(selectElement.attr("id"), equalTo(enumProperty));
        assertThat(selectElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME) + "." + enumProperty));
        String collectionElement = enumProperty.substring(0, 1);
        String optionsExpression = collectionElement +" for "+ collectionElement +" in " + enumProperty + "List";
        assertThat(selectElement.attr("ng-options"), equalTo(optionsExpression));
    }
View Full Code Here

        Elements nToManyWidgetElement = html.select("div.form-group > div.col-sm-10");
        assertThat(nToManyWidgetElement, notNullValue());

        Elements selectElement = nToManyWidgetElement.select(" > select");
        assertThat(selectElement.attr("id"), equalTo(enumProperty));
        assertThat(selectElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME) + "." + enumProperty));
        String collectionElement = enumProperty.substring(0, 1);
        String optionsExpression = collectionElement +" for "+ collectionElement +" in " + enumProperty + "List";
        assertThat(selectElement.attr("ng-options"), equalTo(optionsExpression));
    }
View Full Code Here

        Elements selectElement = nToManyWidgetElement.select(" > select");
        assertThat(selectElement.attr("id"), equalTo(enumProperty));
        assertThat(selectElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME) + "." + enumProperty));
        String collectionElement = enumProperty.substring(0, 1);
        String optionsExpression = collectionElement +" for "+ collectionElement +" in " + enumProperty + "List";
        assertThat(selectElement.attr("ng-options"), equalTo(optionsExpression));
    }

}
View Full Code Here

        Document html = Jsoup.parseBodyFragment(output);
        assertThat(output.trim(), not(equalTo("")));
       
        Elements container = html.select("div.form-group");
        assertThat(container, notNullValue());
        assertThat(container.attr("ng-class"), not(equalTo("")));
       
        Elements formInputElement = html.select("div.form-group input");
        assertThat(formInputElement.attr("id"), equalTo("fullName"));
        assertThat(formInputElement.attr("type"), equalTo("text"));
        assertThat(formInputElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME)+"."+"fullName"));
View Full Code Here

        Elements container = html.select("div.form-group");
        assertThat(container, notNullValue());
        assertThat(container.attr("ng-class"), not(equalTo("")));
       
        Elements formInputElement = html.select("div.form-group input");
        assertThat(formInputElement.attr("id"), equalTo("fullName"));
        assertThat(formInputElement.attr("type"), equalTo("text"));
        assertThat(formInputElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME)+"."+"fullName"));
    }

    @Test
View Full Code Here

        assertThat(container, notNullValue());
        assertThat(container.attr("ng-class"), not(equalTo("")));
       
        Elements formInputElement = html.select("div.form-group input");
        assertThat(formInputElement.attr("id"), equalTo("fullName"));
        assertThat(formInputElement.attr("type"), equalTo("text"));
        assertThat(formInputElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME)+"."+"fullName"));
    }

    @Test
    public void testGenerateBasicStringPropertyWithMaxlength() throws Exception {
View Full Code Here

        assertThat(container.attr("ng-class"), not(equalTo("")));
       
        Elements formInputElement = html.select("div.form-group input");
        assertThat(formInputElement.attr("id"), equalTo("fullName"));
        assertThat(formInputElement.attr("type"), equalTo("text"));
        assertThat(formInputElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME)+"."+"fullName"));
    }

    @Test
    public void testGenerateBasicStringPropertyWithMaxlength() throws Exception {
        Map<String, Object> root = createInspectionResultWrapper(ENTITY_NAME, STRING_PROP_WITH_MAX_LEN);
View Full Code Here

        Document html = Jsoup.parseBodyFragment(output);
        assertThat(output.trim(), not(equalTo("")));
       
        Elements container = html.select("div.form-group");
        assertThat(container, notNullValue());
        assertThat(container.attr("ng-class"), not(equalTo("")));
       
        Elements formInputElement = html.select("div.form-group input");
        assertThat(formInputElement.attr("id"), equalTo("fullName"));
        assertThat(formInputElement.attr("type"), equalTo("text"));
        assertThat(formInputElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME)+"."+"fullName"));
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.