From 8c1d6498c38c805071c50ae7328603cd9adfbb0b Mon Sep 17 00:00:00 2001 From: dzmipt Date: Fri, 15 Dec 2023 09:23:28 +0100 Subject: [PATCH] add naming for result panel (to be able to look up in the integrated tests) --- src/studio/ui/StudioWindow.java | 5 +++++ src/studio/ui/TabPanel.java | 1 + test-integration/studio/ui/ResultTest.java | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/src/studio/ui/StudioWindow.java b/src/studio/ui/StudioWindow.java index d59679ca..9eff8c38 100755 --- a/src/studio/ui/StudioWindow.java +++ b/src/studio/ui/StudioWindow.java @@ -143,6 +143,7 @@ public class StudioWindow extends JFrame implements WindowListener { private static int studioWindowNameIndex = 0; private int editorTabbedPaneNameIndex = 0; private int editorNameIndex = 0; + private int resultNameIndex = 0; private static List allWindows = new ArrayList<>(); @@ -162,6 +163,10 @@ public int nextEditorNameIndex() { return editorNameIndex++; } + public int nextResultNameIndex() { + return resultNameIndex++; + } + public int nextEditorTabbedPaneNameIndex() { return editorTabbedPaneNameIndex++; } diff --git a/src/studio/ui/TabPanel.java b/src/studio/ui/TabPanel.java index 71de9cff..c642cc36 100755 --- a/src/studio/ui/TabPanel.java +++ b/src/studio/ui/TabPanel.java @@ -124,6 +124,7 @@ private void initComponents() { refreshFont(); setLayout(new BorderLayout()); add(component, BorderLayout.CENTER); + setName("resultPanel" + studioWindow.nextResultNameIndex()); } public void refreshFont() { diff --git a/test-integration/studio/ui/ResultTest.java b/test-integration/studio/ui/ResultTest.java index 6f9c7912..b00a2c3d 100644 --- a/test-integration/studio/ui/ResultTest.java +++ b/test-integration/studio/ui/ResultTest.java @@ -49,4 +49,10 @@ public void testUploadButtonEnabled() { } +// @Test +// public void testMarkersAfterSorting() { +// execute(); +// frameFixture.panel("resultPanel0") +// } + }