On Mon, 23 Mar 2026 20:45:46 GMT, Andy Goryachev <[email protected]> wrote:

>> modules/javafx.controls/src/test/java/test/javafx/scene/control/cell/TextFieldTableCellTest.java
>>  line 398:
>> 
>>> 396: 
>>> 397:         TextField textField = (TextField) cell.getGraphic();
>>> 398:         MouseEventFirer mouse = new MouseEventFirer(textField);
>> 
>> This is what happened before.
>> We created the following structure:
>> 
>> Group
>> └ TextField
>> 
>> And then testing the `TextField` in isolation without the table or cell 
>> (since both are not inside the scene graph).
>> 
>> Guess what, I also reverted the change, this testcase was supposed to test, 
>> and still green. It does not make any sense. So removed it. (And now, we 
>> avoid that this kind of test can be written, as you need to take care of the 
>> scene graph by e.g. just using the `stageLoader`).
>
> I am a bit confused - you reverted the fix for 
> https://bugs.openjdk.org/browse/JDK-8119995 ?
> 
> I am a bit reluctant to remove the test, can we keep it?

Yes, I reverted the fix and this test is still green.
Because as I said, it does not test the table at all. The table (and therefore 
`VirtualFlow`, which was adjusted) is never in the scene graph.

We just spin up:

Group
└ TextField

And do 2 right click in the `TextField`. No table attached, nothing that is 
really tested here. To put it mildly, this test does absolutely nothing. 

If you want me to keep it, I will write:
`stageLoader = new StageLoader(textField);`
and we have the same behavior and a green test that tests nothing.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2124#discussion_r2977593135

Reply via email to