RFR: 8090123: Items are no longer visible when collection is changed [v6]
Karthik P K
kpk at openjdk.org
Fri Mar 3 07:37:20 UTC 2023
On Wed, 1 Mar 2023 13:59:41 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address review comments
>
> tests/system/src/test/java/test/robot/javafx/scene/ChoiceBoxScrollUpOnCollectionChangeTest.java line 101:
>
>> 99: }
>> 100:
>> 101: Util.sleep(400); // Wait for up arrow to get loaded in UI
>
> Sleeping on the JavaFX application thread is both ineffective and undesirable. If the sleep is needed, then split this into two invocations of `runAndWait` (before and after the sleep), and do the sleep on the test thread.
Updated the code to sleep on the test thread.
Along with this, scrolling fixed amount (75) was also causing the occasional failures as the scroll event was getting triggered continuously and choice box was scrolling to the end making the down arrow getting hidden.
Made changes in code to scroll only required amount to make both up and down arrow visible based on the screen size and row height of choice box items.
Ran the test several times (around 15-20 times) in different screen sizes. Did not see failures now.
-------------
PR: https://git.openjdk.org/jfx/pull/1039
More information about the openjfx-dev
mailing list