use of org.apache.wicket.markup.html.HTML5Attributes in project wicket by apache.
the class TextAreaTest method requiredAttribute.
/**
* https://issues.apache.org/jira/browse/WICKET-5289
*/
@Test
public void requiredAttribute() {
TestPage testPage = new TestPage();
testPage.textArea.setOutputMarkupId(true);
testPage.textArea.setType(String.class);
testPage.textArea.setRequired(true);
testPage.textArea.add(new HTML5Attributes());
tester.startPage(testPage);
TagTester tagTester = tester.getTagById(testPage.textArea.getMarkupId());
String required = tagTester.getAttribute("required");
assertEquals("required", required);
}
use of org.apache.wicket.markup.html.HTML5Attributes in project wicket by apache.
the class TextFieldTest method requiredAttribute.
/**
* https://issues.apache.org/jira/browse/WICKET-5289
*/
@Test
public void requiredAttribute() {
TestPage testPage = new TestPage();
testPage.textField.setOutputMarkupId(true);
testPage.textField.setType(String.class);
testPage.textField.setRequired(true);
testPage.textField.add(new HTML5Attributes());
tester.startPage(testPage);
TagTester tagTester = tester.getTagById(testPage.textField.getMarkupId());
String required = tagTester.getAttribute("required");
assertEquals("required", required);
}
Aggregations