Source:
<code>public void testPanelsCollapseExpand() { ______TS("Test that 'Collapse Student' button is working"); resultsPage.clickGroupByTeam(); resultsPage.displayByGiverRecipientQuestion(); assertEquals("Collapse Students", resultsPage.instructorPanelCollapseStudentsButton.getText()); resultsPage.clickInstructorPanelCollapseStudentsButton(); assertEquals("Expand Students", resultsPage.instructorPanelCollapseStudentsButton.getText()); int numOfPanels = resultsPage.getNumOfPanelsInInstructorPanel(); resultsPage.verifyParticipantPanelIsCollapsed(4, (numOfPanels * 50)); resultsPage.clickGroupByTeam(); resultsPage.displayByQuestion(); ______TS("Typical case: panels expand/collapse"); assertEquals("Collapse Questions", resultsPage.collapseExpandButton.getText()); assertEquals("Collapse all panels. You can also click on the panel heading to toggle each one individually.", resultsPage.collapseExpandButton.getAttribute("data-original-title")); assertTrue(resultsPage.areResultsVisible()); resultsPage.clickCollapseExpand(); resultsPage.waitForPanelsToCollapse(); assertEquals("Expand Questions", resultsPage.collapseExpandButton.getText()); assertEquals("Expand all panels. You can also click on the panel heading to toggle each one individually.", resultsPage.collapseExpandButton.getAttribute("data-original-title")); assertTrue(resultsPage.areResultsHidden()); resultsPage.clickCollapseExpand(); resultsPage.waitForPanelsToExpand(); assertEquals("Collapse Questions", resultsPage.collapseExpandButton.getText()); assertEquals("Collapse all panels. You can also click on the panel heading to toggle each one individually.", resultsPage.collapseExpandButton.getAttribute("data-original-title")); <START> assertTrue(resultsPage.areResultsVisible()); <END> }</code><technical_language>If methods wrapped assertTrue(...), consider renaming method verifyResultsVisible/Hidden instead move assertions respective methods</technical_language>

Target:
public void testPanelsCollapseExpand() { ______TS("Test that 'Collapse Student' button is working"); resultsPage.clickGroupByTeam(); resultsPage.displayByGiverRecipientQuestion(); assertEquals("Collapse Students", resultsPage.instructorPanelCollapseStudentsButton.getText()); resultsPage.clickInstructorPanelCollapseStudentsButton(); assertEquals("Expand Students", resultsPage.instructorPanelCollapseStudentsButton.getText()); int numOfPanels = resultsPage.getNumOfPanelsInInstructorPanel(); resultsPage.verifyParticipantPanelIsCollapsed(4, (numOfPanels * 50)); resultsPage.clickGroupByTeam(); resultsPage.displayByQuestion(); ______TS("Typical case: panels expand/collapse"); assertEquals("Collapse Questions", resultsPage.collapseExpandButton.getText()); assertEquals("Collapse all panels. You can also click on the panel heading to toggle each one individually.", resultsPage.collapseExpandButton.getAttribute("data-original-title")); resultsPage.verifyResultsVisible(); resultsPage.clickCollapseExpand(); resultsPage.waitForPanelsToCollapse(); assertEquals("Expand Questions", resultsPage.collapseExpandButton.getText()); assertEquals("Expand all panels. You can also click on the panel heading to toggle each one individually.", resultsPage.collapseExpandButton.getAttribute("data-original-title")); resultsPage.verifyResultsHidden(); resultsPage.clickCollapseExpand(); resultsPage.waitForPanelsToExpand(); assertEquals("Collapse Questions", resultsPage.collapseExpandButton.getText()); assertEquals("Collapse all panels. You can also click on the panel heading to toggle each one individually.", resultsPage.collapseExpandButton.getAttribute("data-original-title")); resultsPage.verifyResultsVisible(); }