Skip to content

Commit

Permalink
Added some comments for methods
Browse files Browse the repository at this point in the history
  • Loading branch information
alpdk committed Oct 17, 2024
1 parent 5d7b50e commit 382f027
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class TestCasePanelBuilder(
}
resetButton.addActionListener { reset() }
resetToLastRunButton.addActionListener { resetToLastRun() }
removeButton.addActionListener { subtractTest() }
removeButton.addActionListener { switchTestPanel() }

sendButton.addActionListener { sendRequest() }

Expand All @@ -311,7 +311,7 @@ class TestCasePanelBuilder(
}

/**
* Create button with text
* Create a Panel that will replace test that was deleted by user.
*/
fun getRemovePanel(testPanelIndex: Int): JPanel {
val panel = JPanel()
Expand Down Expand Up @@ -342,6 +342,9 @@ class TestCasePanelBuilder(
return panel
}

/**
* Method that switch removed panel to test panel that was deleted.
*/
private fun undoRemove(testPanelIndex: Int) {
generatedTestsTabData.allTestCasePanel.remove(generatedTestsTabData.testCaseNameToRemovePanel[testCase.testName])

Expand Down Expand Up @@ -673,7 +676,10 @@ class TestCasePanelBuilder(
GenerateTestsTabHelper.update(generatedTestsTabData)
}

private fun subtractTest() {
/**
* Switch test panel to removed panel of this test.
*/
private fun switchTestPanel() {
val index: Int =
generatedTestsTabData.allTestCasePanel.getComponentZOrder(generatedTestsTabData.testCaseNameToPanel[testCase.testName])

Expand Down

0 comments on commit 382f027

Please sign in to comment.