RFR: 8316025: Use testUI() method of PassFailJFrame.Builder in FileChooserSymLinkTest.java [v3]

Alexander Zvegintsev azvegint at openjdk.org
Fri Oct 27 20:29:35 UTC 2023


On Wed, 25 Oct 2023 13:29:01 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> This update to `FileChooserSymLinkTest.java` demonstrates the usage of the `testUI` method of the `PassFailJFrame.Builder` class to streamline creating the UI for manual tests.
>> 
>> The [`main` method](https://github.com/aivanov-jdk/jdk/blob/cb1835527d718226f1c6fdd85ff5986703ea356f/test/jdk/javax/swing/JFileChooser/FileChooserSymLinkTest.java#L110-L118) is a simple sequence of calls:
>> 
>> 
>>     public static void main(String[] args) throws Exception {
>>         PassFailJFrame.builder()
>>                       .instructions(INSTRUCTIONS)
>>                       .rows(35)
>>                       .columns(50)
>>                       .testUI(FileChooserSymLinkTest::createTestUI)
>>                       .build()
>>                       .awaitAndCheck();
>>     }
>> 
>> 
>> It's the most streamlined way of creating a manual test.
>> 
>> This change depends on #15665 and [JDK-8294156](https://bugs.openjdk.org/browse/JDK-8294156) as well as #15661, both of which depend on #15660.
>
> Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 19 commits:
> 
>  - Amend indentation of nested <li> elements
>  - Merge master
>  - 8316025: Update the return type of createTestUI
>    
>    PassFailJFrame now supports creating a list of test windows
>  - Merge branch '8294156-func-manual-TestUI' into 8316025-testUI-SymLinkTest
>  - 8294156: Allow creating several test windows
>    
>    The windows can be positioned in advance, or
>    a call back PositionWindows interface can be used
>    to define their positions after the instruction UI
>    frame is positioned on the screen.
>  - Use testUI() and builder pattern to create test UI
>  - Remove trailing whitespace
>  - Mark the Builder class final
>    
>    It's not supposed to be extended.
>  - Amend message in window closing handler
>    
>    The WindowClosingHandler is used both for the instruction
>    frame and for test UI windows.
>    Also add blank lines to separate different parts of the class.
>  - Use invokeOnEDT in getInstructionFrameBounds
>  - ... and 9 more: https://git.openjdk.org/jdk/compare/c587211b...0f4f67b3

Marked as reviewed by azvegint (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/15666#pullrequestreview-1702493257


More information about the client-libs-dev mailing list