Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Pulled column and portlet tests up to AbstractAnalysisTest.
Now all static analysis plug-ins have a common test that checks that the number of warnings is shown as a link in the warnings column and warnings table portlet. Currently a test does not check the URL itself it rather clicks the link to see if the navigation works. This could be used as a basis for [JENKINS-39947].
- Loading branch information
Showing
24 changed files
with
264 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/org/jenkinsci/test/acceptance/plugins/analysis_core/AbstractTablePortlet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.jenkinsci.test.acceptance.plugins.analysis_core; | ||
|
||
import org.jenkinsci.test.acceptance.plugins.dashboard_view.AbstractDashboardViewPortlet; | ||
import org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView; | ||
import org.jenkinsci.test.acceptance.po.Control; | ||
|
||
/** | ||
* A portlet that show the number of warnings in a table. | ||
* | ||
* @author Ullrich Hafner | ||
*/ | ||
public class AbstractTablePortlet extends AbstractDashboardViewPortlet { | ||
private Control hideZeroWarningsProjects = control("canHideZeroWarningsProjects"); | ||
|
||
protected AbstractTablePortlet(DashboardView parent, String path) { | ||
super(parent, path); | ||
} | ||
|
||
public void hideZeroWarningsProjects(final boolean checked) { | ||
hideZeroWarningsProjects.check(checked); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
src/main/java/org/jenkinsci/test/acceptance/plugins/checkstyle/CheckStylePortlet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
package org.jenkinsci.test.acceptance.plugins.checkstyle; | ||
|
||
import org.jenkinsci.test.acceptance.plugins.dashboard_view.AbstractDashboardViewPortlet; | ||
import org.jenkinsci.test.acceptance.plugins.analysis_core.AbstractTablePortlet; | ||
import org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView; | ||
import org.jenkinsci.test.acceptance.po.Describable; | ||
|
||
/** | ||
* A Checkstyle portlet for {@link org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView}. | ||
* A Checkstyle portlet for {@link DashboardView}. | ||
* | ||
* @author Fabian Trampusch | ||
*/ | ||
@Describable("Checkstyle warnings per project") | ||
public class CheckStylePortlet extends AbstractDashboardViewPortlet { | ||
public class CheckStylePortlet extends AbstractTablePortlet { | ||
public CheckStylePortlet(final DashboardView parent, final String path) { | ||
super(parent, path); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/main/java/org/jenkinsci/test/acceptance/plugins/findbugs/FindBugsPortlet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/main/java/org/jenkinsci/test/acceptance/plugins/pmd/PmdWarningsPortlet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.