RFR: 8314906: [testbug] Create behavior tests for text input controls [v5]

Martin Fox duke at openjdk.org
Fri Sep 15 23:04:45 UTC 2023


On Fri, 15 Sep 2023 20:13:31 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> tests/system/src/test/java/test/javafx/scene/control/behavior/BehaviorRobotTestBase.java line 196:
>> 
>>> 194:                 "9", KeyCode.DIGIT9,
>>> 195:                 ".", KeyCode.PERIOD,
>>> 196:                 ",", KeyCode.COMMA
>> 
>> On French layouts the DIGIT codes don't actually produce digits (you have to hold down Shift) and there's no KeyCode.PERIOD (also a shifted character). You don't seem to be using those characters but you might want to remove them from this table so no one is tempted to use them in the future.
>
> Interesting.  
> 
> It is my understanding though that for the purposes of this test it should work as expected.  I've added `TextAreaBehaviorRobotTest.testTyping()` - could you try running it with your setup please?
> 
> 
>     @Test
>     public void testTyping() throws Exception {
>         execute(
>             //addKeyListener(),
>             "0123456789.,abracadabra",
>             checkText("0123456789.,abracadabra", 23)
>         );
>     }

I ran the TextAreaBehaviorRobotTest on macOS 13.5.2. Test passed with my keyboard set to U.S. English and failed when set to French.


TextAreaBehaviorRobotTest > testTyping() FAILED
    org.opentest4j.AssertionFailedError: in step 2 ==> expected: <0123456789.,abracadabra> but was: <à&é"'(§è!ç,abracadabra>

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1221#discussion_r1327849342


More information about the openjfx-dev mailing list