On Thu, 20 Apr 2023 13:28:23 GMT, Karthik P K <k...@openjdk.org> wrote:

> 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.

I'd recommend bringing back a (slightly modified) mouse test and keeping the 
keyboard test.
+ minor suggestions.

I think the change is not equivalent, but it might be a good addition to the 
existing test.  We may add changing the selected date with the keyboard (RIGHT 
ARROW key), and also modify the mouse test by clicking first at coordinates 
(width * 0.3, height * 0.5), saving the selected date1, then clicking at (width 
* 0.6. height * 0.5) and checking that the new selected date != date1.  This 
will ensure the mouse-based test always works regardless of current date, and 
we add another test which I think is also good (right arrow key works always).

Minor comments:
- please update the copyright year
- please update the class javadoc

-------------

Changes requested by angorya (Committer).

PR Review: https://git.openjdk.org/jfx/pull/1104#pullrequestreview-1394623755
PR Comment: https://git.openjdk.org/jfx/pull/1104#issuecomment-1516829097

Reply via email to