Skip to content

Commit

Permalink
add naming for result panel (to be able to look up in the integrated …
Browse files Browse the repository at this point in the history
…tests)
  • Loading branch information
dzmipt committed Dec 15, 2023
1 parent db56ac4 commit 8c1d649
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/studio/ui/StudioWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<StudioWindow> allWindows = new ArrayList<>();
Expand All @@ -162,6 +163,10 @@ public int nextEditorNameIndex() {
return editorNameIndex++;
}

public int nextResultNameIndex() {
return resultNameIndex++;
}

public int nextEditorTabbedPaneNameIndex() {
return editorTabbedPaneNameIndex++;
}
Expand Down
1 change: 1 addition & 0 deletions src/studio/ui/TabPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ private void initComponents() {
refreshFont();
setLayout(new BorderLayout());
add(component, BorderLayout.CENTER);
setName("resultPanel" + studioWindow.nextResultNameIndex());
}

public void refreshFont() {
Expand Down
6 changes: 6 additions & 0 deletions test-integration/studio/ui/ResultTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,10 @@ public void testUploadButtonEnabled() {

}

// @Test
// public void testMarkersAfterSorting() {
// execute();
// frameFixture.panel("resultPanel0")
// }

}

0 comments on commit 8c1d649

Please sign in to comment.