On Mon, 20 Feb 2023 10:34:58 GMT, Karthik P K <k...@openjdk.org> wrote:
>> When a large number of items were scrolled in the `ChoiceBox`, the scrolled >> offset was carried forward when the list is replaced with small number of >> items. Hence the scroll up arrow was displayed with empty popup. >> >> Changed code to scroll to top before popup display when content height of >> `ChoiceBox` is smaller than the scrolled offset. >> >> Added system test to validate the fix. > > Karthik P K has updated the pull request incrementally with one additional > commit since the last revision: > > Fixing typo and adding more checks in systems test I verified the changes on macOS and Windows - on both platforms `testChoicBoxScrollOnCollectionChange` passes when it's run as the only test (with `--tests '*testChoicBoxScrollOnCollectionChange'` option) but fails when you run all system tests: java.lang.AssertionError at org.junit.Assert.fail(Assert.java:87) at org.junit.Assert.assertTrue(Assert.java:42) at org.junit.Assert.assertTrue(Assert.java:53) at test.robot.javafx.scene.ChoiceBoxScrollUpOnCollectionChangeTest.testChoicBoxScrollOnCollectionChange(ChoiceBoxScrollUpOnCollectionChangeTest.java:131) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ... tests/system/src/test/java/test/robot/javafx/scene/ChoiceBoxScrollUpOnCollectionChangeTest.java line 119: > 117: > 118: @Test > 119: public void testChoicBoxScrollOnCollectionChange() throws Exception { There's also a minor spelling error here (s/Choic/Choice) ------------- PR: https://git.openjdk.org/jfx/pull/1039