On Wed, 10 Jun 2026 22:12:22 GMT, Marius Hanl <[email protected]> wrote:
>> Christopher Schnick has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Split test method
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/ComboBoxTest.java
> line 603:
>
>> 601:
>> 602: // Calls updateDisplayNode()
>> 603: getDisplayNode();
>
> This looks a bit weird - but should be the `buttonCell`, right?
>
> So you may can just do: `ListCell<?> buttonCell = getDisplayNode()`
> and then use it below for the assertions
>
> assertNotNull(buttonCell.getGraphic());
> assertEquals("null-text", ((Label)
> buttonCell.getGraphic()).getText());
>
> comboBox.setValue("ITEM1");
> assertEquals("ITEM1", ((Label) buttonCell.getGraphic()).getText());
>
> comboBox.setValue("ITEM2");
> assertEquals("ITEM2", ((Label) buttonCell.getGraphic()).getText());
I think I mentioned that before, this is done to prevent calls to
updateDisplayNode(). E.g. the method getDisplayNode() calls
updateDisplayNode(), which would defeat the point of the test
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2179#discussion_r3395247635