Fixed selection of tabs.
@@ -30,6 +30,8 @@ import io.jenkins.plugins.analysis.warnings.Eclipse;
import io.jenkins.plugins.analysis.warnings.FindBugs;
import io.jenkins.plugins.analysis.warnings.Pmd;
import io.jenkins.plugins.analysis.warnings.checkstyle.CheckStyle;
+import io.jenkins.plugins.analysis.warnings.recorder.pageobj.DetailsTab;
+import io.jenkins.plugins.analysis.warnings.recorder.pageobj.DetailsTab.TabType;
import io.jenkins.plugins.analysis.warnings.recorder.pageobj.IssueRow;
import io.jenkins.plugins.analysis.warnings.recorder.pageobj.IssuesTable;
import io.jenkins.plugins.analysis.warnings.recorder.pageobj.PropertyTable;
@@ -473,22 +475,26 @@ public class MiscIssuesRecorderITest extends IntegrationTestWithJenkinsPerSuite
private void verifyBaselineDetails(final AnalysisResult baseline) {
HtmlPage baselineDetails = getWebPage(JavaScriptSupport.JS_ENABLED, baseline);
+ DetailsTab detailsTab = new DetailsTab(baselineDetails);
+
+ PropertyTable categories = detailsTab.select(TabType.CATEGORIES);
- PropertyTable categories = new PropertyTable(baselineDetails, "category");
assertThat(categories.getTitle()).isEqualTo("Categories");
assertThat(categories.getColumnName()).isEqualTo("Category");
assertThat(categories.getRows()).containsExactly(
new PropertyRow("Design", 2, 100),
new PropertyRow("Sizes", 1, 50));
- PropertyTable types = new PropertyTable(baselineDetails, "type");
+ PropertyTable types = detailsTab.select(TabType.TYPES);
+
assertThat(types.getTitle()).isEqualTo("Types");
assertThat(types.getColumnName()).isEqualTo("Type");
assertThat(types.getRows()).containsExactly(
new PropertyRow("DesignForExtensionCheck", 2, 100),
new PropertyRow("LineLengthCheck", 1, 50));
- IssuesTable issues = new IssuesTable(baselineDetails);
+ IssuesTable issues = detailsTab.select(TabType.ISSUES);
+
assertThat(issues.getColumnNames()).containsExactly(
IssueRow.DETAILS, IssueRow.FILE, IssueRow.CATEGORY, IssueRow.TYPE, IssueRow.PRIORITY, IssueRow.AGE);
assertThat(issues.getTitle()).isEqualTo("Issues");
