Examples of PageTester


Examples of org.apache.tapestry5.test.PageTester

    @BeforeMethod
    public void before()
    {
        // LocaleAppModule.java has configured support for a certain locales.
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);
    }
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    @Test
    public void click_link()
    {

        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForActionLink");
        Element link = doc.getElementById("link1");
        doc = tester.clickLink(link);
        assertTrue(doc.toString().contains("You chose: 123"));
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    private PageTester tester;

    @Test
    public void display()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForHead");
        assertTrue(doc.toString().contains("OK"));
    }
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    }

    @Test(dataProvider = "dtd_page_provider")
    public void verify_correct_dtds(String pageName, String expectedDTD, String checkText)
    {
        PageTester tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage(pageName);
        String txt = doc.toString();
        // use startsWith to make sure the DTD is getting into the right spot.
        assertTrue(txt.startsWith(expectedDTD));
        // we should also make sure that the other DTD's don't appear anywhere else...
        checkOtherDTD(txt, expectedDTD);
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    private PageTester tester;

    @Test
    public void render()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForLoop");
        assertTrue(doc.toString().contains("abcabcabc"));
        assertEquals(doc.getElementById("1").getChildMarkup(), "xyz");
    }
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    private PageTester tester;

    @BeforeClass
    public void setup()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME, "src/test/app2");
    }
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    private PageTester tester;

    @Test
    public void submit_form()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForForm");
        Element form = doc.getElementById("form1");
        Map<String, String> fieldValues = CollectionFactory.newMap();
        fieldValues.put("t1", "hello");
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    private PageTester tester;

    @Test
    public void render()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForUnless");
        assertNotNull(doc.getElementById("2"));
        assertNotNull(doc.getElementById("4"));
        assertNotNull(doc.getElementById("6"));
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    private PageTester tester;

    @Test
    public void render()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForIf");
        assertNotNull(doc.getElementById("1"));
        assertNotNull(doc.getElementById("3"));
        assertNotNull(doc.getElementById("5"));
View Full Code Here

Examples of org.apache.tapestry5.test.PageTester

    }

    @BeforeMethod
    public void before()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        doc = tester.renderPage("TestPageForSubmit");
        fieldValues = CollectionFactory.newMap();
    }
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.