Search in sources :

Example 16 with DashboardInfo

use of com.google.gerrit.extensions.api.projects.DashboardInfo in project gerrit by GerritCodeReview.

the class DashboardIT method setDefaultDashboard.

@Test
public void setDefaultDashboard() throws Exception {
    DashboardInfo info = createTestDashboard();
    assertThat(info.isDefault).isNull();
    project().dashboard(info.id).setDefault();
    assertThat(project().dashboard(info.id).get().isDefault).isTrue();
    assertThat(project().defaultDashboard().get().id).isEqualTo(info.id);
}
Also used : DashboardInfo(com.google.gerrit.extensions.api.projects.DashboardInfo) Test(org.junit.Test) AbstractDaemonTest(com.google.gerrit.acceptance.AbstractDaemonTest)

Aggregations

DashboardInfo (com.google.gerrit.extensions.api.projects.DashboardInfo)16 AbstractDaemonTest (com.google.gerrit.acceptance.AbstractDaemonTest)8 Test (org.junit.Test)8 ImmutableList (com.google.common.collect.ImmutableList)4 ResourceNotFoundException (com.google.gerrit.extensions.restapi.ResourceNotFoundException)4 DashboardSectionInfo (com.google.gerrit.extensions.api.projects.DashboardSectionInfo)3 BadRequestException (com.google.gerrit.extensions.restapi.BadRequestException)3 IdString (com.google.gerrit.extensions.restapi.IdString)3 ConfigInvalidException (org.eclipse.jgit.errors.ConfigInvalidException)3 ResourceConflictException (com.google.gerrit.extensions.restapi.ResourceConflictException)2 ProjectState (com.google.gerrit.server.project.ProjectState)2 List (java.util.List)2 RepositoryNotFoundException (org.eclipse.jgit.errors.RepositoryNotFoundException)2 Repository (org.eclipse.jgit.lib.Repository)2 Truth.assertThat (com.google.common.truth.Truth.assertThat)1 NoHttpd (com.google.gerrit.acceptance.NoHttpd)1 ProjectOperations (com.google.gerrit.acceptance.testsuite.project.ProjectOperations)1 TestProjectUpdate.allow (com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.allow)1 Permission (com.google.gerrit.entities.Permission)1 BranchInput (com.google.gerrit.extensions.api.projects.BranchInput)1