RFR: 8316025: Use testUI() method of PassFailJFrame.Builder in FileChooserSymLinkTest.java [v3]
Alexey Ivanov
aivanov at openjdk.org
Wed Oct 25 13:29:01 UTC 2023
> 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
-------------
Changes: https://git.openjdk.org/jdk/pull/15666/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15666&range=02
Stats: 123 lines in 1 file changed: 53 ins; 60 del; 10 mod
Patch: https://git.openjdk.org/jdk/pull/15666.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15666/head:pull/15666
PR: https://git.openjdk.org/jdk/pull/15666
More information about the client-libs-dev
mailing list