/** Make sure that deleting a role also deletes any related shares. */
  public void testDeleteRole() {
    administration.roles().delete(ROLE_DELETE_ID);

    // deleting the role should make this a private permission.
    roleDashboard.setSharingPermissions(TestSharingPermissionUtils.createPrivatePermissions());

    navigation.dashboard().navigateToMy();
    assertions
        .getDashboardAssertions()
        .assertDashboardPages(
            Arrays.asList(dashboardCopy, groupDashboard, projectDashboard, roleDashboard),
            Table.OWNED);
  }
  /** Test that the dashboard shares are cleaned up when a group is deleted. */
  public void testDeleteGroup() {
    administration.usersAndGroups().deleteGroup(GROUP_DELETE);

    // deleting the group should remove that share permission.
    groupDashboard.setSharingPermissions(
        TestSharingPermissionUtils.createGroupPermissions(GROUP_ADMIN));

    navigation.dashboard().navigateToMy();
    assertions
        .getDashboardAssertions()
        .assertDashboardPages(
            Arrays.asList(dashboardCopy, groupDashboard, projectDashboard, roleDashboard),
            Table.OWNED);
  }