Skip to content
Permalink
Browse files

[JENKINS-39947] Added verification of all portlet links.

  • Loading branch information...
uhafner committed May 29, 2017
1 parent 220c16b commit e4b60850a1cd480c851c38266de74f235a42ed5f
@@ -38,6 +38,7 @@
import org.jenkinsci.test.acceptance.plugins.maven.MavenBuildStep;
import org.jenkinsci.test.acceptance.plugins.maven.MavenInstallation;
import org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet;
import org.jenkinsci.test.acceptance.plugins.nested_view.NestedView;
import org.jenkinsci.test.acceptance.po.Build;
import org.jenkinsci.test.acceptance.po.Container;
import org.jenkinsci.test.acceptance.po.Folder;
@@ -130,24 +131,34 @@ public void should_set_build_to_unstable_if_total_warnings_threshold_set() {
}

/**
* Sets up a job within a folder. Verifies that the project action from the job redirects to the result
* of the last build. Checks the correct number of warnings in the project overview and
* result details view. Finally checks if the warnings-per-project portlet and warnings column show the
* Sets up a nested view that contains a dashboard view with a warnings-per-project portlet.
* Creates a folder in this view and a freestyle job in this folder.
* Finally checks if the warnings-per-project portlet and warnings column show the
* correct number of warnings and provide a direct link to the actual warning results.
*/
@Test @Issue({"JENKINS-39947", "JENKINS-39950"}) @WithPlugins({"dashboard-view", "cloudbees-folder"})
@Test @Issue("JENKINS-39947") @WithPlugins({"dashboard-view", "nested-view", "cloudbees-folder", "analysis-core@1.87"})
public void should_show_warnings_in_folder() {
Folder folder = jenkins.jobs.create(Folder.class, jenkins.createRandomName());
folder.save();
NestedView nested = jenkins.getViews().create(NestedView.class);

DashboardView dashboard = nested.getViews().create(DashboardView.class);
dashboard.configure(() -> {
dashboard.matchAllJobs();
dashboard.checkRecurseIntoFolders();
});

Folder folder = dashboard.jobs.create(Folder.class);
folder.save();
folder.open();

FreeStyleJob job = createFreeStyleJob(folder);
runAndVerifyJobResults(job);

P projectAction = createProjectAction(job);

addDashboardViewAndBottomPortlet(projectAction.getTablePortlet(), folder);
dashboard.configure(() -> {
dashboard.addBottomPortlet(projectAction.getTablePortlet());
});

verifyPortlet(projectAction);

addListViewColumn(projectAction.getViewColumn(), folder);
@@ -259,7 +259,7 @@ public void should_set_warnings_count_in_list_view_column() {
FreeStyleJob job = createFreeStyleJob();
buildSuccessfulJob(job);

ListView view = jenkins.views.create(ListView.class, createRandomName());
ListView view = jenkins.views.create(ListView.class);
view.configure();
view.matchAllJobs();
view.addColumn(AnalysisCollectorColumn.class);

0 comments on commit e4b6085

Please sign in to comment.
You can’t perform that action at this time.