Search in sources :

Example 11 with Document

use of elemental2.dom.Document in project tapestry-5 by apache.

the class HeadTest method display.

@Test
public void display() {
    tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);
    Document doc = tester.renderPage("TestPageForHead");
    assertTrue(doc.toString().contains("OK"));
}
Also used : PageTester(org.apache.tapestry5.test.PageTester) Document(org.apache.tapestry5.dom.Document) Test(org.testng.annotations.Test)

Example 12 with Document

use of elemental2.dom.Document in project tapestry-5 by apache.

the class LocaleTest method prefer_canada_french.

@Test
public void prefer_canada_french() {
    tester.setPreferedLanguage(Locale.CANADA_FRENCH);
    Document doc = tester.renderPage("TestPageForLocale");
    assertEquals(doc.getElementById("id1").getChildMarkup(), "French page");
}
Also used : Document(org.apache.tapestry5.dom.Document) Test(org.testng.annotations.Test)

Example 13 with Document

use of elemental2.dom.Document in project tapestry-5 by apache.

the class LocaleTest method change_language_in_browser.

@Test
public void change_language_in_browser() {
    tester.setPreferedLanguage(Locale.ENGLISH);
    Document doc = tester.renderPage("TestPageForLocale");
    assertEquals(doc.getElementById("id1").getChildMarkup(), "English page");
    tester.setPreferedLanguage(Locale.CANADA_FRENCH);
    doc = tester.renderPage("TestPageForLocale");
    assertEquals(doc.getElementById("id1").getChildMarkup(), "French page");
}
Also used : Document(org.apache.tapestry5.dom.Document) Test(org.testng.annotations.Test)

Example 14 with Document

use of elemental2.dom.Document in project tapestry-5 by apache.

the class LocaleTest method no_preferred_language.

@Test
public void no_preferred_language() {
    Document doc = tester.renderPage("TestPageForLocale");
    assertEquals(doc.getElementById("id1").getChildMarkup(), "English page");
}
Also used : Document(org.apache.tapestry5.dom.Document) Test(org.testng.annotations.Test)

Example 15 with Document

use of elemental2.dom.Document in project tapestry-5 by apache.

the class ASOTest method submit_aso.

@Test
public void submit_aso() {
    tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);
    Document doc = tester.renderPage("TestPageForASO");
    assertTrue(doc.toString().contains("bar"));
}
Also used : PageTester(org.apache.tapestry5.test.PageTester) Document(org.apache.tapestry5.dom.Document) Test(org.testng.annotations.Test)

Aggregations

Document (org.apache.tapestry5.dom.Document)20 Test (org.testng.annotations.Test)17 PageTester (org.apache.tapestry5.test.PageTester)11 Test (org.junit.Test)10 HTMLDocument (elemental2.dom.HTMLDocument)9 HTMLElement (elemental2.dom.HTMLElement)9 HTMLIFrameElement (elemental2.dom.HTMLIFrameElement)9 HTMLBodyElement (elemental2.dom.HTMLBodyElement)5 Element (elemental2.dom.Element)4 Element (org.apache.tapestry5.dom.Element)4 DOMTokenList (elemental2.dom.DOMTokenList)3 JsPropertyMap (jsinterop.base.JsPropertyMap)3 Document (org.gwtproject.dom.client.Document)3 Element (org.gwtproject.dom.client.Element)3 InputElement (org.gwtproject.dom.client.InputElement)3 Document (elemental2.dom.Document)2 File (elemental2.dom.File)2 Window (elemental2.dom.Window)2 Field (java.lang.reflect.Field)2 List (java.util.List)2