8225012: sanity/client/SwingSet/src/ToolTipDemoTest.java fails on Windows
Reviewed-by: serb
This commit is contained in:
parent
5ae6bc23e8
commit
1f521a1204
@ -669,7 +669,7 @@ java/awt/Window/8159168/SetShapeTest.java 8274106 macosx-aarch64
|
||||
java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8274106 macosx-aarch64
|
||||
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java 8274106 macosx-aarch64
|
||||
|
||||
sanity/client/SwingSet/src/ToolTipDemoTest.java 8225012 windows-all,macosx-all
|
||||
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001 linux-all
|
||||
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770 macosx-all
|
||||
|
||||
############################################################################
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2022 Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -38,6 +38,7 @@ import javax.swing.UIManager;
|
||||
|
||||
import org.jtregext.GuiTestListener;
|
||||
import org.netbeans.jemmy.ClassReference;
|
||||
import org.netbeans.jemmy.JemmyProperties;
|
||||
import org.netbeans.jemmy.operators.JComponentOperator;
|
||||
import org.netbeans.jemmy.operators.JFrameOperator;
|
||||
import org.netbeans.jemmy.operators.JLabelOperator;
|
||||
@ -79,12 +80,20 @@ public class ToolTipDemoTest {
|
||||
@Test(dataProvider = "availableLookAndFeels", dataProviderClass = TestHelpers.class)
|
||||
public void test(String lookAndFeel) throws Exception {
|
||||
UIManager.setLookAndFeel(lookAndFeel);
|
||||
|
||||
JemmyProperties.setCurrentDispatchingModel(JemmyProperties.ROBOT_MODEL_MASK |
|
||||
JemmyProperties.SMOOTH_ROBOT_MODEL_MASK);
|
||||
|
||||
new ClassReference(ToolTipDemo.class.getCanonicalName()).startApplication();
|
||||
JFrameOperator frameOperator = new JFrameOperator(DEMO_TITLE);
|
||||
frameOperator.setComparator(EXACT_STRING_COMPARATOR);
|
||||
// Setting the tooltip dismiss delay
|
||||
ToolTipManager.sharedInstance().setDismissDelay(TOOLTIP_DISMISS_DELAY);
|
||||
|
||||
//activate window
|
||||
frameOperator.clickMouse();
|
||||
frameOperator.moveMouse(-1, -1);
|
||||
|
||||
// Verifying the plain tooltip properties
|
||||
checkToolTip(frameOperator, PLAIN_TOOLTIP_COMP_TITLE,
|
||||
PLAIN_TOOLTIP_TEXT);
|
||||
@ -116,18 +125,15 @@ public class ToolTipDemoTest {
|
||||
*/
|
||||
private void checkToolTip(JFrameOperator frameOperator, String compTitle,
|
||||
String toolTipText) {
|
||||
|
||||
JLabelOperator toolTipHostComp =
|
||||
new JLabelOperator(frameOperator, compTitle);
|
||||
JToolTipOperator toolTipOperator =
|
||||
new JToolTipOperator(toolTipHostComp.showToolTip());
|
||||
toolTipOperator.waitTipText(toolTipText);
|
||||
checkToolTipLocation(toolTipHostComp, toolTipOperator);
|
||||
|
||||
// Dismissing the tooltip by mouse click
|
||||
toolTipHostComp.clickMouse();
|
||||
// Dismissing the tooltip by moving the mouse out
|
||||
toolTipHostComp.moveMouse(-1, -1);
|
||||
toolTipOperator.waitComponentShowing(false);
|
||||
|
||||
}
|
||||
|
||||
private void checkToolTipLocation(JComponentOperator componentOpertor,
|
||||
|
Loading…
Reference in New Issue
Block a user