Program: 69474
Project: 69474
Buggy source:
/** 
 * Variant from the above test where the business group is not limited in size. This was a bug while development of the 10.3 release.
 * @param authorLoginPage
 * @param ryomouBrowser
 * @param reiBrowser
 * @param kanuBrowser
 * @throws IOException
 * @throws URISyntaxException
 */
@Test @RunAsClient public void enrollmentWithUnlimitedBusinessGroups(@InitialPage LoginPage authorLoginPage,@Drone @User WebDriver ryomouBrowser,@Drone @Participant WebDriver reiBrowser,@Drone @Student WebDriver kanuBrowser) throws IOException, URISyntaxException {
  screenshotTestRule.setBrowsers(browser,ryomouBrowser,reiBrowser,kanuBrowser);
  UserVO author=new UserRestClient(deploymentUrl).createAuthor();
  UserVO rei=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  UserVO kanu=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  UserVO ryomou=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  authorLoginPage.loginAs(author.getLogin(),author.getPassword());
  String courseTitle="String_Node_Str" + UUID.randomUUID();
  navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
  String groupName="String_Node_Str" + UUID.randomUUID();
  CoursePageFragment authorCourse=CoursePageFragment.getCourse(browser);
  MembersPage membersPage=authorCourse.members().selectBusinessGroups().createBusinessGroup(groupName,"String_Node_Str",-1,false,false);
  navBar.openCourse(courseTitle);
  authorCourse=membersPage.clickToolbarBack();
  String enNodeTitle="String_Node_Str";
  CourseEditorPageFragment courseEditor=authorCourse.edit().createNode("String_Node_Str").nodeTitle(enNodeTitle);
  EnrollmentConfigurationPage enrolmentConfig=new EnrollmentConfigurationPage(browser);
  enrolmentConfig.selectConfiguration().selectBusinessGroups();
  courseEditor.publish().quickPublish(Access.users);
  GroupPage authorGroup=navBar.openGroups(browser).selectGroup(groupName).openAdministration().openAdminMembers().setVisibility(false,true,false).openMembers().assertParticipantList();
  Enrollment[] participantDrivers=new Enrollment[]{new Enrollment(ryomou,ryomouBrowser),new Enrollment(rei,reiBrowser),new Enrollment(kanu,kanuBrowser)};
  for (  Enrollment enrollment : participantDrivers) {
    WebDriver driver=enrollment.getDriver();
    LoginPage.getLoginPage(driver,deploymentUrl).loginAs(enrollment.getUser()).resume();
    NavigationPage participantNavBar=new NavigationPage(driver);
    participantNavBar.openMyCourses().openSearch().extendedSearch(courseTitle).select(courseTitle).start();
    CoursePageFragment participantCourse=new CoursePageFragment(driver);
    participantCourse.clickTree().selectWithTitle(enNodeTitle);
    EnrollmentPage enrollmentPage=new EnrollmentPage(driver);
    enrollmentPage.assertOnEnrolmentPage();
    enrollment.setEnrollmentPage(enrollmentPage);
  }
  for (  Enrollment enrollment : participantDrivers) {
    enrollment.getEnrollmentPage().enrollNoWait();
  }
  int errors=0;
  for (  Enrollment enrollment : participantDrivers) {
    if (enrollment.getEnrollmentPage().hasError()) {
      errors++;
    }
  }
  authorGroup.openMembers();
  int participants=0;
  for (  Enrollment enrollment : participantDrivers) {
    if (authorGroup.isInMembersParticipantList(enrollment.getUser())) {
      participants++;
    }
  }
  Assert.assertEquals(3,participants);
  Assert.assertEquals(0,errors);
}

Fixed version (ground truth):
/** 
 * Variant from the above test where the business group is not limited in size. This was a bug while development of the 10.3 release.
 * @param authorLoginPage
 * @param ryomouBrowser
 * @param reiBrowser
 * @param kanuBrowser
 * @throws IOException
 * @throws URISyntaxException
 */
@Test @RunAsClient public void enrollmentWithUnlimitedBusinessGroups(@InitialPage LoginPage authorLoginPage,@Drone @User WebDriver ryomouBrowser,@Drone @Participant WebDriver reiBrowser,@Drone @Student WebDriver kanuBrowser) throws IOException, URISyntaxException {
  UserVO author=new UserRestClient(deploymentUrl).createAuthor();
  UserVO rei=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  UserVO kanu=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  UserVO ryomou=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  authorLoginPage.loginAs(author.getLogin(),author.getPassword());
  String courseTitle="String_Node_Str" + UUID.randomUUID();
  navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
  String groupName="String_Node_Str" + UUID.randomUUID();
  CoursePageFragment authorCourse=CoursePageFragment.getCourse(browser);
  MembersPage membersPage=authorCourse.members().selectBusinessGroups().createBusinessGroup(groupName,"String_Node_Str",-1,false,false);
  navBar.openCourse(courseTitle);
  authorCourse=membersPage.clickToolbarBack();
  String enNodeTitle="String_Node_Str";
  CourseEditorPageFragment courseEditor=authorCourse.edit().createNode("String_Node_Str").nodeTitle(enNodeTitle);
  EnrollmentConfigurationPage enrolmentConfig=new EnrollmentConfigurationPage(browser);
  enrolmentConfig.selectConfiguration().selectBusinessGroups();
  courseEditor.publish().quickPublish(Access.users);
  GroupPage authorGroup=navBar.openGroups(browser).selectGroup(groupName).openAdministration().openAdminMembers().setVisibility(false,true,false).openMembers().assertParticipantList();
  Enrollment[] participantDrivers=new Enrollment[]{new Enrollment(ryomou,ryomouBrowser),new Enrollment(rei,reiBrowser),new Enrollment(kanu,kanuBrowser)};
  for (  Enrollment enrollment : participantDrivers) {
    WebDriver driver=enrollment.getDriver();
    LoginPage.getLoginPage(driver,deploymentUrl).loginAs(enrollment.getUser()).resume();
    NavigationPage participantNavBar=new NavigationPage(driver);
    participantNavBar.openMyCourses().openSearch().extendedSearch(courseTitle).select(courseTitle).start();
    CoursePageFragment participantCourse=new CoursePageFragment(driver);
    participantCourse.clickTree().selectWithTitle(enNodeTitle);
    EnrollmentPage enrollmentPage=new EnrollmentPage(driver);
    enrollmentPage.assertOnEnrolmentPage();
    enrollment.setEnrollmentPage(enrollmentPage);
  }
  for (  Enrollment enrollment : participantDrivers) {
    enrollment.getEnrollmentPage().enrollNoWait();
  }
  int errors=0;
  for (  Enrollment enrollment : participantDrivers) {
    if (enrollment.getEnrollmentPage().hasError()) {
      errors++;
    }
  }
  authorGroup.openMembers();
  int participants=0;
  for (  Enrollment enrollment : participantDrivers) {
    if (authorGroup.isInMembersParticipantList(enrollment.getUser())) {
      participants++;
    }
  }
  Assert.assertEquals(3,participants);
  Assert.assertEquals(0,errors);
}