RFR: JDK-8353319 : Open source Swing tests - Set 3
Abhishek Kumar
abhiscxk at openjdk.org
Tue Apr 15 04:35:43 UTC 2025
On Mon, 14 Apr 2025 23:58:40 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
> Following tests are updates as part of this PR:
>
> 1. javax/swing/JRootPane/bug4614623.java - manual
> 2. javax/swing/JTabbedPane/bug4613811.java - manual
> 3. javax/swing/JWindow/bug4251781.java - manual
> 4. javax/swing/JFrame/bug4419914.java - manual, updated existing test by adding JWindow, JDialog cases.
test/jdk/javax/swing/JFrame/bug4419914.java line 69:
> 67: END CENTER START
> 68:
> 69: 3. Press on the "START" button in case JWindow & JDialog and "NORTH"
Suggestion:
3. Press on the "START" button in case of JWindow & JDialog and "NORTH"
test/jdk/javax/swing/JFrame/bug4419914.java line 91:
> 89: .title("Tab movement Instructions")
> 90: .instructions(INSTRUCTIONS)
> 91: .rows((int) INSTRUCTIONS.lines().count() + 2)
setting row count is optional, can be removed.
test/jdk/javax/swing/JFrame/bug4419914.java line 93:
> 91: .rows((int) INSTRUCTIONS.lines().count() + 2)
> 92: .columns(45)
> 93: .testTimeOut(15)
I guess time out of 10 is sufficient for this test to verify.
test/jdk/javax/swing/JFrame/bug4419914.java line 95:
> 93: .testTimeOut(15)
> 94: .testUI(bug4419914::createAndShowUI)
> 95: .positionTestUI(WindowLayouts::rightOneRow)
I find `WindowLayouts::rightOneColumn` suitable for the testUIs alignment. Test windows are aligned vertically which looks better than horizontal alignment.
test/jdk/javax/swing/JFrame/bug4419914.java line 144:
> 142: window.add(new JButton("END"), BorderLayout.LINE_END);
> 143:
> 144: JButton quitButton = new JButton("Quit");
For consistency with other UI component's text
Suggestion:
JButton quitButton = new JButton("QUIT");
test/jdk/javax/swing/JRootPane/bug4614623.java line 50:
> 48: 2) Release the Alt key, the selection background (light grey)
> 49: should appear around the File menu. Compare "About" menu
> 50: with "File" menu to see the light grey selection background.
Either use `""` for all the occurrence of menus else remove it for consistency
Suggestion:
should appear around the File menu. Compare About menu
with File menu to see the light grey selection background.
test/jdk/javax/swing/JRootPane/bug4614623.java line 62:
> 60: .instructions(INSTRUCTIONS)
> 61: .columns(62)
> 62: .rows(12)
Column of 35 looks much better than 62.
You can remove setting up rows explicitly.
test/jdk/javax/swing/JTabbedPane/bug4613811.java line 48:
> 46:
> 47: If the last tab (Tab 5) is visible, the right arrow
> 48: button should be disabled.
on macOS,
When the 1st tab is visible, the left arrow is not at all visible and right arrow is not visible for 5th tab. I guess they are either not rendered or hidden.
Need to modify test instruction as per the platform.
test/jdk/javax/swing/JTabbedPane/bug4613811.java line 57:
> 55: .title("Test Instructions")
> 56: .instructions(INSTRUCTIONS)
> 57: .columns(40)
width of 30 should be enough
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043525793
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043542819
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043543351
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043530095
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043537364
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043546404
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043545250
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043555188
PR Review Comment: https://git.openjdk.org/jdk/pull/24639#discussion_r2043551372
More information about the client-libs-dev
mailing list