RFR: 8280948: [TESTBUG] Write a regression test for JDK-4659800

Alexey Ivanov aivanov at openjdk.java.net
Thu Feb 3 15:50:09 UTC 2022


On Tue, 1 Feb 2022 06:40:17 GMT, Manukumar V S <mvs at openjdk.org> wrote:

> Write a regression test for JDK-4659800.
> This test checks whether typing 'Space' key generates ActionEvent on focused Button or not, in all Look And Feels in all platforms.
> This test is run 10 times per platform(mac,linux,windows) and it passed all the times(30/30).

> Yea, you are correct, I first tried with key and it was failing with MetalLookAndFeel or use NimbusLookAndFeel, so I thought of changing it to so that it pass in all LnFs, may be I can add that use-case also here, or it would be a separate test case by itself?

But then _it's not a regression test_ for [JDK-4659800](https://bugs.openjdk.java.net/browse/JDK-4659800), it's a new test.

I'm not sure it's worth testing that pressing Space key on a button sends `ActionEvent`. I think it should be covered by an existing test, probably in JCK, but I haven't checked one exists.

If you like, you can create two separate tests: `SpaceKeyActivatesButton` and `EnterKeyActivatesButton` where the latter is limited to Windows platform and Windows and Windows Classic Look-and-Feel.

In recent years, test files are usually given meaningful names rather than `bugNNNN`.

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

PR: https://git.openjdk.java.net/jdk/pull/7296



More information about the client-libs-dev mailing list