Package org.richfaces.fragment.notify

Examples of org.richfaces.fragment.notify.NotifyMessage


    public void testShowCloseButton() {
        page.waitUntilThereIsNoNotify();
        page.setShowCloseButtion(true);
        page.showNotification();

        NotifyMessage message = page.getNotify().getItem(0);

        actions.moveToElement(message.advanced().getSummaryElement()).build().perform();
        assertTrue("The close button should be visible!", message.advanced().getCloseIconElement().isDisplayed());
        page.waitUntilThereIsNoNotify();

        page.setShowCloseButtion(false);

        page.showNotification();

        message = page.getNotify().getItem(0);

        actions.moveToElement(message.advanced().getSummaryElement());
        assertFalse("The close button should not be visible!", message.advanced().getCloseIconElement().isDisplayed());
    }
View Full Code Here


        page.setNonBlocking(true);
        page.setNonBlockingOpacity(opacity);
        page.waitUntilThereIsNoNotify();
        page.showNotification();

        final NotifyMessage message = page.getNotify().getItem(0);
        actions.moveToElement(message.advanced().getSummaryElement()).perform();

        Graphene.waitAjax().withMessage("The notify should has opacity " + opacity + ".")
            .pollingEvery(50, TimeUnit.MILLISECONDS).until(new Predicate<WebDriver>() {
                @Override
                public boolean apply(WebDriver input) {
                    double actualOpacity = Double.valueOf(message.advanced().getRootElement().getCssValue("opacity"));
                    boolean succcess = Math.abs(Double.valueOf(opacity) - actualOpacity) <= 0.2;
                    if (!succcess) {
                        Utils.triggerJQ("mouseover", message.advanced().getSummaryElement());
                    }
                    return succcess;
                }
            });
    }
View Full Code Here

TOP

Related Classes of org.richfaces.fragment.notify.NotifyMessage

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.