Package org.richfaces.demo.tooltip

Examples of org.richfaces.demo.tooltip.TooltipData


    // 4) Make sure tooltip is currently hidden (style contains 'display: none')
    String hiddenStyle = tooltip1.getStyleAttribute();
    assertTrue("Tooltip not hidden as expected: ["+hiddenStyle+"]",
        hiddenStyle.contains("display:none") || hiddenStyle.contains("display: none"));
    // 5) Lookup backing bean and current tooltip counter
    ToolTipData toolTipData = (ToolTipData)server.getManagedBeanValue("#{toolTipData}");
    assertNotNull("Couldn't find ToolTipData managed bean",toolTipData);
    int startVal = toolTipData.getTooltipCounterWithoutMod();
    //6) Move mouse over div to make tooltip display
    //   Yes, all three of these are required.
    parentDiv.mouseOver();
    parentDiv.mouseMove();
    parentSubDiv.mouseOver();

    // 0.5 delay on tooltip - so wait a sec
    Thread.sleep(1000);

    // 7) Make sure tooltip is currently visible (style does not contain 'display: none')
    String visibleStyle = tooltip1.getStyleAttribute();
    assertFalse("Tooltip not visible as expected: ["+visibleStyle+"]",
        visibleStyle.contains("display:none") || visibleStyle.contains("display: none"));       
    // 8) Our tooltip counter should have increased by 1
    toolTipData = (ToolTipData)server.getManagedBeanValue("#{toolTipData}");
    int endVal = toolTipData.getTooltipCounterWithoutMod();
    assertEquals("toolTipCounter did not increment as expected",startVal+1,endVal);
  }
View Full Code Here


    // 4) Make sure tooltip is currently hidden (style contains 'display: none')
    String hiddenStyle = tooltip1.getStyleAttribute();
    assertTrue("Tooltip not hidden as expected: ["+hiddenStyle+"]",
        hiddenStyle.contains("display:none") || hiddenStyle.contains("display: none"));
    // 5) Lookup backing bean and current tooltip counter
    ToolTipData toolTipData = (ToolTipData)server.getManagedBeanValue("#{toolTipData}");
    assertNotNull("Couldn't find ToolTipData managed bean",toolTipData);
    int startVal = toolTipData.getTooltipCounterWithoutMod();
    // 6) Move mouse over div to make tooltip display
    //   Yes, all three of these are required.
    parentDiv.mouseOver();
    parentDiv.mouseMove();
    parentSubDiv.mouseOver();
    parentSubDiv.click();   

    // 0.5 delay on tooltip - so wait a sec
    Thread.sleep(1000);

    // 7) Make sure tooltip is currently visible (style does not contain 'display: none')
    String visibleStyle = tooltip1.getStyleAttribute();
    assertFalse("Tooltip not visible as expected: ["+visibleStyle+"]",
        visibleStyle.contains("display:none") || visibleStyle.contains("display: none"));       
    // 8) Our tooltip counter should have increased by 1
    toolTipData = (ToolTipData)server.getManagedBeanValue("#{toolTipData}");
    int endVal = toolTipData.getTooltipCounterWithoutMod();
    assertEquals("toolTipCounter did not increment as expected",startVal+1,endVal);
  }
View Full Code Here

TOP

Related Classes of org.richfaces.demo.tooltip.TooltipData

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.