On Fri, 29 Oct 2021 23:14:07 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

>> modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/LabelSkinTest.java
>>  line 2162:
>> 
>>> 2160:         label.autosize();
>>> 2161:         skin.updateDisplayedText();
>>> 2162:         assertEquals("foo _bar _qux", 
>>> LabelSkinBaseShim.getText(label).getText());
>> 
>> Can you verify here which letter / index is picked as mnemonic? (Also in the 
>> other tests).
>
> I don't see an easy way to do that, and I'm not in favor of making private 
> implementation details package-public just to test some internal state. Of 
> course, mnemonic support should have been designed in a way that is more 
> easily testable, but this PR is not the place to do that.

could be tested indirectly, though not in isolation: 

- access the actual mnenomic via accessibleAttribute
- test whether labelFor/action is working as expected when firing an 
alt-mnemonic onto the scene

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

PR: https://git.openjdk.java.net/jfx/pull/647

Reply via email to