Package org.apache.myfaces.extensions.cdi.test.cargo

Examples of org.apache.myfaces.extensions.cdi.test.cargo.SimplePageInteraction


    }

    @Test
    public void testConversationDialogRestart() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.Conversation.Conversation1.class)
                .with(Pages.Conversation.Conversation2.class)
                .with(Pages.Conversation.Conversation3.class)
                .with(Pages.Conversation.Result.class)
                .start(Pages.Conversation.Conversation1.class)
                .useForm("conversation1");

        pageInteraction.setValue("conversation1:value1", "1")
                .click("conversation1:nextPage")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.useForm("form").click("form:restartConversation");

        pageInteraction.checkTextValue("value1", "");
        pageInteraction.checkTextValue("value2", "");
        pageInteraction.checkTextValue("value3", "");
    }
View Full Code Here


    // NOTE that new @Test means new WebClient means new WindowContext

    @Test
    public void testSimpleRestScopedDialog() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.Restscoped.RestScoped1.class)
                .start(Pages.Restscoped.RestScoped1.class)
                .useForm("restscoped1");

    }
View Full Code Here

    // NOTE that new @Test means new WebClient means new WindowContext

    @Test
    public void testConversationDialog() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.Conversation.Conversation1.class)
                .with(Pages.Conversation.Conversation2.class)
                .with(Pages.Conversation.Conversation3.class)
                .with(Pages.Conversation.Result.class)
                .start(Pages.Conversation.Conversation1.class)
                .useForm("conversation1");

        pageInteraction.setValue("conversation1:value1", "1");
        pageInteraction
                .click("conversation1:nextPage")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.click("refresh")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.click("back")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.click("conversation3:back")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "new2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "new3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "new2");
        pageInteraction.checkTextValue("value3", "new3");

        // close conversation
        pageInteraction.useForm("form").click("form:closeConversation");

        pageInteraction.checkTextValue("value1", "");
        pageInteraction.checkTextValue("value2", "");
        pageInteraction.checkTextValue("value3", "");
    }
View Full Code Here

    // NOTE that new @Test means new WebClient means new WindowContext

    @Test
    public void testSimpleRegistration() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.SimpleRegistration.Form.class)
                .with(Pages.SimpleRegistration.Summary.class);

        pageInteraction
                .start(Pages.SimpleRegistration.Form.class)
                .useForm("mainForm");

        //prependId="false"
        pageInteraction.setValue("loginName", "codi");
        pageInteraction
                .click("register")
                .checkState(Pages.SimpleRegistration.Summary.class);

        pageInteraction.checkTextValue("loginName", "codi");

        //close conversation
        pageInteraction
                .clickOk()
                .checkState(Pages.SimpleRegistration.Form.class);

        pageInteraction.checkTextValue("loginName", "");
    }
View Full Code Here

    // NOTE that new @Test means new WebClient means new WindowContext

    @Test
    public void testConversationDialog() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.Conversation.Conversation1.class)
                .with(Pages.Conversation.Conversation2.class)
                .with(Pages.Conversation.Conversation3.class)
                .with(Pages.Conversation.Result.class)
                .start(Pages.Conversation.Conversation1.class)
                .useForm("conversation1");

        pageInteraction.setValue("conversation1:value1", "1");
        pageInteraction
                .click("conversation1:nextPage")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.click("refresh")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.click("back")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.click("conversation3:back")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "new2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "new3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "new2");
        pageInteraction.checkTextValue("value3", "new3");

        // close conversation
        pageInteraction.useForm("form").click("form:closeConversation");

        pageInteraction.checkTextValue("value1", "");
        pageInteraction.checkTextValue("value2", "");
        pageInteraction.checkTextValue("value3", "");
    }
View Full Code Here

    }

    @Test
    public void testConversationDialogRestart() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.Conversation.Conversation1.class)
                .with(Pages.Conversation.Conversation2.class)
                .with(Pages.Conversation.Conversation3.class)
                .with(Pages.Conversation.Result.class)
                .start(Pages.Conversation.Conversation1.class)
                .useForm("conversation1");

        pageInteraction.setValue("conversation1:value1", "1")
                .click("conversation1:nextPage")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.useForm("form").click("form:restartConversation");

        pageInteraction.checkTextValue("value1", "");
        pageInteraction.checkTextValue("value2", "");
        pageInteraction.checkTextValue("value3", "");
    }
View Full Code Here

    // NOTE that new @Test means new WebClient means new WindowContext

    @Test
    public void testSimpleRegistration() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.SimpleRegistration.Form.class)
                .with(Pages.SimpleRegistration.Summary.class);

        pageInteraction
                .start(Pages.SimpleRegistration.Form.class)
                .useForm("mainForm");

        //prependId="false"
        pageInteraction.setValue("loginName", "codi");
        pageInteraction
                .click("register")
                .checkState(Pages.SimpleRegistration.Summary.class);

        pageInteraction.checkTextValue("loginName", "codi");

        //close conversation
        pageInteraction
                .clickOk()
                .checkState(Pages.SimpleRegistration.Form.class);

        pageInteraction.checkTextValue("loginName", "");
    }
View Full Code Here

    // NOTE that new @Test means new WebClient means new WindowContext

    @Test
    public void testConversationDialog() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.Conversation.Conversation1.class)
                .with(Pages.Conversation.Conversation2.class)
                .with(Pages.Conversation.Conversation3.class)
                .with(Pages.Conversation.Result.class)
                .start(Pages.Conversation.Conversation1.class)
                .useForm("conversation1");

        pageInteraction.setValue("conversation1:value1", "1");
        pageInteraction
                .click("conversation1:nextPage")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.click("refresh")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.click("back")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.click("conversation3:back")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "new2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "new3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "new2");
        pageInteraction.checkTextValue("value3", "new3");

        // close conversation
        pageInteraction.useForm("form").click("form:closeConversation");

        pageInteraction.checkTextValue("value1", "");
        pageInteraction.checkTextValue("value2", "");
        pageInteraction.checkTextValue("value3", "");
    }
View Full Code Here

    }

    @Test
    public void testConversationDialogRestart() throws Exception
    {
        SimplePageInteraction pageInteraction = new SimplePageInteraction(getTestConfiguration())
                .with(Pages.Conversation.Conversation1.class)
                .with(Pages.Conversation.Conversation2.class)
                .with(Pages.Conversation.Conversation3.class)
                .with(Pages.Conversation.Result.class)
                .start(Pages.Conversation.Conversation1.class)
                .useForm("conversation1");

        pageInteraction.setValue("conversation1:value1", "1")
                .click("conversation1:nextPage")
                .checkState(Pages.Conversation.Conversation2.class)
                .useForm("conversation2");

        pageInteraction.setValue("conversation2:value2", "2")
                .click("conversation2:nextPage")
                .checkState(Pages.Conversation.Conversation3.class)
                .useForm("conversation3");

        pageInteraction.setValue("conversation3:value3", "3")
                .click("conversation3:submit")
                .checkState(Pages.Conversation.Result.class);

        pageInteraction.checkTextValue("value1", "1");
        pageInteraction.checkTextValue("value2", "2");
        pageInteraction.checkTextValue("value3", "3");

        pageInteraction.useForm("form").click("form:restartConversation");

        pageInteraction.checkTextValue("value1", "");
        pageInteraction.checkTextValue("value2", "");
        pageInteraction.checkTextValue("value3", "");
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.cdi.test.cargo.SimplePageInteraction

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.