Package com.steeplesoft.jsf.facestester

Examples of com.steeplesoft.jsf.facestester.FacesComponent


    }

    @Test(groups = {"integration", "scenario"})
    public void shouldHaveLinksDisabledToFirstAndPreviousPage() throws Exception {
        FacesPage homePage = tester.requestPage(HOME_PAGE);
        FacesComponent first = homePage.getComponentWithId("first");
        assertEquals(first.getValueAsString(), "First Page");
        assertTrue(Boolean.valueOf(String.valueOf(first.getWrappedComponent().getAttributes().get("disabled"))));
        FacesComponent previous = homePage.getComponentWithId("previous");
        assertEquals(previous.getValueAsString(), "Newer Entries");
        assertTrue(Boolean.valueOf(String.valueOf(previous.getWrappedComponent().getAttributes().get("disabled"))));
    }
View Full Code Here


    }

    @Test
    public void shouldDisplaySearchForm() throws Exception {
        FacesPage homePage = tester.requestPage(HOME_PAGE);
        FacesComponent searchForm = homePage.getComponentWithId("search");
        assertTrue(searchForm.isRendered());
        FacesComponent queryInput = homePage.getComponentWithId("search:q");
        assertEquals(queryInput.getWrappedComponent().getClientId(), "q", "The prependId attribute on form should be false and the parent id not prepended to the child id");
        assertEquals(queryInput.getValueAsString(), null);
        FacesComponent searchButton = homePage.getComponentWithId("search:s");
        assertEquals(searchButton.getWrappedComponent().getClientId(), "s", "The prependId attribute on form should be false and the parent id not prepended to the child id");
        assertTrue(searchButton.getWrappedComponent() instanceof UICommand);
        assertEquals(((UICommand) searchButton.getWrappedComponent()).getActionExpression().getExpressionString(), "#{blog.search}");
    }
View Full Code Here

TOP

Related Classes of com.steeplesoft.jsf.facestester.FacesComponent

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.