Test was failing because `CountDownLatch` was not used to make sure that new date is selected and the delay present was not sufficient. If the current date is on the left edge of the date picker, this test would fail because of the way new date was selected using mouse click.
Added `CountDownLatch` to make sure that alert dialog is closed before asserting the date. Updated the test to select new date using robot `keyType` method instead of mouse click so that the test becomes robust. Ran the test individually and along with all system tests on Mac. No failure found. ------------- Commit messages: - Fix date picker test failure Changes: https://git.openjdk.org/jfx/pull/1104/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1104&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8306424 Stats: 19 lines in 1 file changed: 15 ins; 4 del; 0 mod Patch: https://git.openjdk.org/jfx/pull/1104.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1104/head:pull/1104 PR: https://git.openjdk.org/jfx/pull/1104