private void synchroniseDirectory3() throws InterruptedException {
    navigation.gotoAdminSection("user_directories");

    WebTable tblDirectoryList = new TableLocator(tester, "directory-list").getTable();
    WebLink link = tblDirectoryList.getTableCell(3, 4).getLinkWith("Synchronise");
    log("Attempting to synchronise Directory 3");
    navigation.clickLink(link);
    // Synchronise is asynchronous, so we need to check until it is complete
    int attempts = 0;
    while (true) {
      Thread.sleep(1000);
      // refresh the page to get latest synchronised status
      navigation.gotoAdminSection("user_directories");
      String cellText = new UserDirectoryTable(this).getTableCell(3, 4).asText();
      if (cellText.contains("Synchronising for")) {
        // synch in progress
        attempts++;
        if (attempts > 10) {
          // Just in case...
          fail("Directory did not finish synchronising. Giving up after " + attempts + " retries.");
        }
        log("Still synchronising ...");
      } else {
        assertions.getTextAssertions().assertTextNotPresent("Never synchronised");
        break;
      }
    }
  }
Example #2
0
  public void testRemoveAppt() throws Exception {
    // login hcp
    gen.uc22();
    WebConversation wc = login("9000000000", "pw");
    WebResponse wr = wc.getCurrentPage();
    assertEquals("iTrust - HCP Home", wr.getTitle());
    assertLogged(TransactionType.HOME_VIEW, 9000000000L, 0L, "");

    wr = wr.getLinkWith("View My Appointments").click();
    assertLogged(TransactionType.APPOINTMENT_ALL_VIEW, 9000000000L, 0L, "");

    WebTable table = wr.getTables()[0];
    int row = 0;
    for (int i = 0; i < table.getRowCount(); i++) {
      if (table.getCellAsText(i, 0).equals("Anakin Skywalker")) {
        row = i;
        break;
      }
    }

    wr = table.getTableCell(row, 5).getLinkWith("Edit/Remove").click();
    assertTrue(wr.getText().contains("Anakin Skywalker"));
    WebForm wf = wr.getFormWithID("mainForm");

    wf.getSubmitButtonWithID("removeButton").click();
    wr = wc.getCurrentPage();

    assertTrue(wr.getText().contains("Success: Appointment removed"));
    assertLogged(TransactionType.APPOINTMENT_REMOVE, 9000000000L, 100L, "");
  }
Example #3
0
  public void testSetPassedDate() throws Exception {
    // login hcp
    gen.uc22();
    WebConversation wc = login("9000000000", "pw");
    WebResponse wr = wc.getCurrentPage();
    assertEquals("iTrust - HCP Home", wr.getTitle());
    assertLogged(TransactionType.HOME_VIEW, 9000000000L, 0L, "");
    wr = wr.getLinkWith("View My Appointments").click();
    assertLogged(TransactionType.APPOINTMENT_ALL_VIEW, 9000000000L, 0L, "");

    WebTable table = wr.getTables()[0];
    int row = 0;
    for (int i = 0; i < table.getRowCount(); i++) {
      if (table.getCellAsText(i, 0).equals("Anakin Skywalker")) {
        row = i;
        break;
      }
    }

    wr = table.getTableCell(row, 5).getLinkWith("Edit/Remove").click();
    assertTrue(wr.getText().contains("Anakin Skywalker"));
    WebForm wf = wr.getFormWithID("mainForm");
    wf.setParameter("schedDate", "10/10/2009");

    wf.getSubmitButtonWithID("changeButton").click();
    wr = wc.getCurrentPage();

    assertTrue(wr.getText().contains("The scheduled date of this appointment"));
    assertTrue(wr.getText().contains("has already passed."));
    assertNotLogged(TransactionType.APPOINTMENT_EDIT, 9000000000L, 100L, "");
  }
Example #4
0
  /**
   * testReassignLabProcedure
   *
   * @throws Exception
   */
  public void testReassignLabProcedure() throws Exception {
    gen.clearAllTables();
    gen.standardData();

    WebConversation wc = login("9000000000", "pw");
    WebResponse wr = wc.getCurrentPage();
    assertEquals("iTrust - HCP Home", wr.getTitle());
    // click Document Office Visit
    wr = wr.getLinkWith("Document Office Visit").click();

    // select the patient
    WebForm form = wr.getForms()[0];
    form.getScriptableObject().setParameterValue("UID_PATIENTID", "2");
    form.getButtons()[1].click();
    wr = wc.getCurrentPage();
    assertEquals(ADDRESS + "auth/hcp-uap/documentOfficeVisit.jsp", wr.getURL().toString());
    // Select the office visit from specific date
    wr.getLinkWith("6/10/2007").click();

    wr = wc.getCurrentPage();
    assertEquals("iTrust - Document Office Visit", wr.getTitle());

    // Click the Reassign link.
    WebTable tbl = wr.getTableWithID("labProceduresTable");
    assertEquals("Nice Guy", tbl.getCellAsText(2, 1));
    assertTrue(tbl.getCellAsText(2, 10).contains("Reassign"));
    wr = tbl.getTableCell(2, 10).getLinkWith("Reassign").click();

    wr = wc.getCurrentPage();
    assertEquals("iTrust - Reassign Lab Procedure", wr.getTitle());

    // Change the currently-assigned lab tech
    form = wr.getFormWithID("reassignLabProcedureForm");
    form.setParameter("newLabTech", "5000000001");
    form.setParameter("labProcPriority", "1");
    form.getButtonWithID("setLabTech").click();

    assertLogged(TransactionType.LAB_RESULTS_REASSIGN, 9000000000L, 2L, "");
    wr = wc.getCurrentPage();
    assertEquals("iTrust - Document Office Visit", wr.getTitle());

    // Ensure the lab tech has been changed
    tbl = wr.getTableWithID("labProceduresTable");
    assertEquals("Lab Dude", tbl.getCellAsText(2, 1));
  }
Example #5
0
  public void testEditAppt() throws Exception {
    // login hcp
    WebConversation wc = login("9000000000", "pw");
    WebResponse wr = wc.getCurrentPage();
    assertEquals("iTrust - HCP Home", wr.getTitle());
    assertLogged(TransactionType.HOME_VIEW, 9000000000L, 0L, "");

    wr = wr.getLinkWith("View My Appointments").click();
    assertLogged(TransactionType.APPOINTMENT_ALL_VIEW, 9000000000L, 0L, "");

    WebTable table = wr.getTables()[0];
    wr = table.getTableCell(table.getRowCount() - 1, 5).getLinkWith("Edit/Remove").click();
    assertTrue(wr.getText().contains("Andy Programmer"));
    WebForm wf = wr.getFormWithID("mainForm");
    wf.setParameter("comment", "New comment!");

    SubmitButton[] buttons = wf.getSubmitButtons();
    wr = wf.submit(buttons[0]); // Submit as "Change"
    assertTrue(wr.getText().contains("Success: Appointment changed"));
    assertLogged(TransactionType.APPOINTMENT_EDIT, 9000000000L, 2L, "");
  }
  public void testEditLdapDirectory() {
    navigation.gotoAdminSection("user_directories");
    text.assertTextPresent(
        "The table below shows the user directories currently configured for JIRA.");

    addDirectory();

    WebTable tblDirectoryList = new TableLocator(tester, "directory-list").getTable();
    WebLink link = tblDirectoryList.getTableCell(2, 4).getLinkWith("edit");
    navigation.clickLink(link);

    text.assertTextPresent(new IdLocator(tester, "embcwd"), "Server Settings");

    tester.setWorkingForm("configure-ldap-form");
    tester.setFormElement("name", "First Ldap X");
    tester.setFormElement("hostname", getLdapServer());
    // For this test we can use AD read-only (no SSL)
    tester.setFormElement("port", "389");
    tester.setFormElement("ldapBasedn", getBaseDn());
    tester.setFormElement("ldapUserdn", getUserDn());
    tester.setFormElement("ldapPassword", getPassword());

    tester.setFormElement("ldapUserObjectclass", "inetorgpersonX");
    tester.setFormElement("ldapUserFilter", "(objectclass=inetorgperson)X");
    tester.setFormElement("ldapUserUsername", "cnX");
    tester.setFormElement("ldapUserUsernameRdn", "cnX");
    tester.setFormElement("ldapUserFirstname", "givenNameX");
    tester.setFormElement("ldapUserLastname", "snX");
    tester.setFormElement("ldapUserDisplayname", "displayNameX");
    tester.setFormElement("ldapUserEmail", "mailX");
    tester.setFormElement("ldapUserGroup", "memberOfX");
    tester.setFormElement("ldapUserPassword", "userPasswordX");
    tester.setFormElement("ldapGroupObjectclass", "groupOfUniqueNamesX");
    tester.setFormElement("ldapGroupFilter", "(objectclass=groupOfUniqueNames)X");
    tester.setFormElement("ldapGroupName", "cnX");
    tester.setFormElement("ldapGroupDescription", "descriptionX");
    tester.setFormElement("ldapGroupUsernames", "uniqueMemberX");

    tester.submit("test");
    tester.submit("save");
    // Now we are forced to the "Extended test" page
    assertExtendedTestPageAndReturnToDirectoryList();

    text.assertTextPresent(
        "The table below shows the user directories currently configured for JIRA.");
    // assert the new directory is added at the end
    UserDirectoryTable userDirectoryTable = new UserDirectoryTable(this);
    userDirectoryTable
        .assertRow(1)
        .contains("1", "JIRA Internal Directory", "Internal")
        .hasMoveUp(false)
        .hasMoveDown(true)
        .hasOnlyEditOperation();
    userDirectoryTable
        .assertRow(2)
        .contains("10000", "First Ldap X", getTypeDisplayName() + " (Read Only)")
        .hasMoveUp(true)
        .hasMoveDown(false)
        .hasDisableEditSynchroniseOperations();

    // Open the edit screen and check the values to make sure they are stored/retrieved correctly.
    tblDirectoryList = new TableLocator(tester, "directory-list").getTable();
    link = tblDirectoryList.getTableCell(2, 4).getLinkWith("edit");
    navigation.clickLink(link);

    text.assertTextPresent(new IdLocator(tester, "embcwd"), "Server Settings");

    tester.setWorkingForm("configure-ldap-form");

    assertEquals(
        "First Ldap X",
        tester.getDialog().getElement("configure-ldap-form-name").getAttribute("value"));

    assertEquals(
        getLdapServer(),
        tester.getDialog().getElement("configure-ldap-form-hostname").getAttribute("value"));
    assertEquals(
        "389", tester.getDialog().getElement("configure-ldap-form-port").getAttribute("value"));
    assertEquals(
        getBaseDn(),
        tester.getDialog().getElement("configure-ldap-form-ldapBasedn").getAttribute("value"));
    assertEquals(
        getUserDn(),
        tester.getDialog().getElement("configure-ldap-form-ldapUserdn").getAttribute("value"));
    assertEquals(
        getPassword(),
        tester.getDialog().getElement("configure-ldap-form-ldapPassword").getAttribute("value"));

    assertEquals(
        "inetorgpersonX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapUserObjectclass")
            .getAttribute("value"));
    assertEquals(
        "(objectclass=inetorgperson)X",
        tester.getDialog().getElement("configure-ldap-form-ldapUserFilter").getAttribute("value"));
    assertEquals(
        "cnX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapUserUsername")
            .getAttribute("value"));
    assertEquals(
        "cnX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapUserUsernameRdn")
            .getAttribute("value"));
    assertEquals(
        "givenNameX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapUserFirstname")
            .getAttribute("value"));
    assertEquals(
        "snX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapUserLastname")
            .getAttribute("value"));
    assertEquals(
        "displayNameX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapUserDisplayname")
            .getAttribute("value"));
    assertEquals(
        "mailX",
        tester.getDialog().getElement("configure-ldap-form-ldapUserEmail").getAttribute("value"));
    assertEquals(
        "memberOfX",
        tester.getDialog().getElement("configure-ldap-form-ldapUserGroup").getAttribute("value"));
    assertEquals(
        "userPasswordX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapUserPassword")
            .getAttribute("value"));
    assertEquals(
        "groupOfUniqueNamesX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapGroupObjectclass")
            .getAttribute("value"));
    assertEquals(
        "(objectclass=groupOfUniqueNames)X",
        tester.getDialog().getElement("configure-ldap-form-ldapGroupFilter").getAttribute("value"));
    assertEquals(
        "cnX",
        tester.getDialog().getElement("configure-ldap-form-ldapGroupName").getAttribute("value"));
    assertEquals(
        "descriptionX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapGroupDescription")
            .getAttribute("value"));
    assertEquals(
        "uniqueMemberX",
        tester
            .getDialog()
            .getElement("configure-ldap-form-ldapGroupUsernames")
            .getAttribute("value"));

    // Check for mandatory fields

    // Change the contents and save
    tester.setFormElement("name", "");
    tester.setFormElement("hostname", "");
    tester.setFormElement("port", "");
    tester.setFormElement("ldapBasedn", "");
    tester.setFormElement("ldapUserdn", "");
    tester.setFormElement("ldapPassword", "");

    tester.setFormElement("ldapUserObjectclass", "");
    tester.setFormElement("ldapUserFilter", "");
    tester.setFormElement("ldapUserUsername", "");
    tester.setFormElement("ldapUserUsernameRdn", "");
    tester.setFormElement("ldapUserFirstname", "");
    tester.setFormElement("ldapUserLastname", "");
    tester.setFormElement("ldapUserDisplayname", "");
    tester.setFormElement("ldapUserEmail", "");
    tester.setFormElement("ldapUserGroup", "");
    tester.setFormElement("ldapUserPassword", "");
    tester.setFormElement("ldapGroupObjectclass", "");
    tester.setFormElement("ldapGroupFilter", "");
    tester.setFormElement("ldapGroupName", "");
    tester.setFormElement("ldapGroupDescription", "");
    tester.setFormElement("ldapGroupUsernames", "");
    tester.submit("test");

    // Check for the errors
    text.assertTextPresent("Name is a required field.");
    text.assertTextPresent("Hostname is a required field.");
    text.assertTextPresent("Port is a required field.");
    // JRA-23819
    //        text.assertTextPresent("Username is a required field.");
    //        text.assertTextPresent("Password is a required field.");
    text.assertTextPresent("User object class is a required field.");
    text.assertTextPresent("User object filter is a required field.");
    text.assertTextPresent("User name attribute is a required field.");
    text.assertTextPresent("First name attribute is a required field.");
    text.assertTextPresent("Last name attribute is a required field.");
    text.assertTextPresent("User display name attribute is a required field.");
    text.assertTextPresent("User email attribute is a required field.");
    text.assertTextPresent("User group attribute is a required field.");
    text.assertTextPresent("User password attribute is a required field.");
    text.assertTextPresent("Group object class is a required field.");
    text.assertTextPresent("Group object filter is a required field.");
    text.assertTextPresent("Group name attribute is a required field.");
    text.assertTextPresent("Group description attribute is a required field.");
    text.assertTextPresent("Group members attribute is a required field.");

    tester.clickLink("configure-ldap-form-cancel");

    text.assertTextPresent(
        "The table below shows the user directories currently configured for JIRA.");
    // assert the new directory is added at the end
    userDirectoryTable = new UserDirectoryTable(this);
    userDirectoryTable
        .assertRow(1)
        .contains("1", "JIRA Internal Directory", "Internal")
        .hasMoveUp(false)
        .hasMoveDown(true)
        .hasOnlyEditOperation();
    userDirectoryTable
        .assertRow(2)
        .contains("10000", "First Ldap X", getTypeDisplayName() + " (Read Only)")
        .hasMoveUp(true)
        .hasMoveDown(false)
        .hasDisableEditSynchroniseOperations();

    // Open the edit screen and check the values to make sure they are stored/retrieved correctly.
    tblDirectoryList = new TableLocator(tester, "directory-list").getTable();
    link = tblDirectoryList.getTableCell(2, 4).getLinkWith("edit");
    navigation.clickLink(link);

    text.assertTextPresent(new IdLocator(tester, "embcwd"), "Server Settings");

    tester.setWorkingForm("configure-ldap-form");

    tester.submit("test");
    tester.submit("save");
    // Now we are forced to the "Extended test" page
    assertExtendedTestPageAndReturnToDirectoryList();

    text.assertTextPresent(
        "The table below shows the user directories currently configured for JIRA.");
    // assert the new directory is at the end
    userDirectoryTable = new UserDirectoryTable(this);
    userDirectoryTable
        .assertRow(1)
        .contains("1", "JIRA Internal Directory", "Internal")
        .hasMoveUp(false)
        .hasMoveDown(true)
        .hasOnlyEditOperation();
    userDirectoryTable
        .assertRow(2)
        .contains("10000", "First Ldap X", getTypeDisplayName() + " (Read Only)")
        .hasMoveUp(true)
        .hasMoveDown(false)
        .hasDisableEditSynchroniseOperations();
  }
  public void testSynchroniseDirectory() throws Exception {
    if (assertions.getUserAssertions().userExists("wilma")) {
      log("User wilma was found - attempting to clean up before running test.");
      deleteUser("wilma");
    }
    assertions.getUserAssertions().assertUserDoesNotExist("wilma");

    navigation.gotoAdminSection("user_directories");
    assertions.getTextAssertions().assertTextNotPresent("Never synchronised");

    // Add a second LDAP directory that actually points to the same LDAP tree.
    if (isActiveDirectory()) {
      log("Attempting to add an Active Directory LDAP User Directory...");
      addActiveDirectory("LDAP Directory 2");
    } else {
      log("Attempting to add an Open LDAP User Directory...");
      addOpenLdap("LDAP Directory 2");
    }

    // Confirm the directory setup:
    WebTable table = assertions.getTableAssertions().getWebTable("directory-list");
    assertions.getTableAssertions().assertTableCellHasText(table, 1, 1, "LDAP Directory");
    assertions.getTableAssertions().assertTableCellHasText(table, 2, 1, "JIRA Internal Directory");
    assertions.getTableAssertions().assertTableCellHasText(table, 3, 1, "LDAP Directory 2");

    assertions.getTextAssertions().assertTextPresent("Never synchronised");
    // Do a Synchronise on LDAP 2:
    synchroniseDirectory3();

    // Now add a new User - it will go to LDAP 1
    // Add a User to the LDAP directory
    navigation.gotoAdminSection("user_browser");
    tester.clickLink("create_user");
    tester.setFormElement("username", "wilma");
    tester.setFormElement("fullname", "Wilma Flintstone");
    tester.setFormElement("password", "password");
    tester.setFormElement("confirm", "password");
    tester.setFormElement("email", "*****@*****.**");
    tester.submit("Create");

    assertions.getUserAssertions().assertUserExists("wilma");
    assertions
        .getUserAssertions()
        .assertUserDetails("wilma", "Wilma Flintstone", "*****@*****.**", "LDAP Directory");

    // Now lets disable the LDAP directory
    navigation.gotoAdminSection("user_directories");
    tester.clickLinkWithText("Disable");
    assertions.getTextAssertions().assertTextPresent("LDAP Directory  <em>(inactive)</em>");
    // Wilma should no longer exist
    assertions.getUserAssertions().assertUserDoesNotExist("wilma");

    // Synchronise LDAP 2 to find the newly added user
    synchroniseDirectory3();
    // Check that Wilma is now found for LDAP 2
    assertions.getUserAssertions().assertUserExists("wilma");
    assertions
        .getUserAssertions()
        .assertUserDetails("wilma", "Wilma Flintstone", "*****@*****.**", "LDAP Directory 2");

    // Re-enable the LDAP directory
    navigation.gotoAdminSection("user_directories");
    tester.clickLinkWithText("Enable");
    assertions.getTextAssertions().assertTextNotPresent("LDAP Directory  <em>(inactive)</em>");
    // Wilma should be considered as belonging to LDAP 1 again
    assertions
        .getUserAssertions()
        .assertUserDetails("wilma", "Wilma Flintstone", "*****@*****.**", "LDAP Directory");

    // Cleanup - remove LDAP 2 directory
    navigation.gotoAdminSection("user_directories");
    WebTable tblDirectoryList = new TableLocator(tester, "directory-list").getTable();
    WebLink link = tblDirectoryList.getTableCell(3, 4).getLinkWith("Disable");
    navigation.clickLink(link);
    tblDirectoryList = new TableLocator(tester, "directory-list").getTable();
    link = tblDirectoryList.getTableCell(3, 4).getLinkWith("Remove");
    navigation.clickLink(link);

    // cleanup - delete the user
    deleteUser("wilma");
    assertions.getUserAssertions().assertUserDoesNotExist("wilma");
  }
 public void testSimpleUser() throws Exception {
   WebConversation connection = new WebConversation();
   WebResponse loginPage = connection.getResponse(buildUrl("silverpeas/"));
   assertNotNull(loginPage);
   WebForm loginForm = loginPage.getFormWithName("EDform");
   assertNotNull(loginForm);
   loginForm.setParameter("Login", "SilverAdmin");
   loginForm.setParameter("Password", "SilverAdmin");
   HttpUnitOptions.setScriptingEnabled(false);
   WebResponse welcomePage = loginForm.submit();
   assertNotNull(welcomePage);
   String[] frameNames = welcomePage.getFrameNames();
   assertEquals(5, frameNames.length);
   WebResponse navigationFrame = connection.getFrameContents("bottomFrame");
   assertNotNull(navigationFrame);
   navigationFrame = connection.getFrameContents("SpacesBar");
   assertNotNull(navigationFrame);
   WebLink mailingListLink = navigationFrame.getLinkWith("Liste de diffusion");
   assertNotNull(mailingListLink);
   HttpUnitOptions.setScriptingEnabled(false);
   WebResponse activityPage = connection.getResponse(buildUrl(mailingListLink.getURLString()));
   assertNotNull(activityPage);
   WebTable browseBar = activityPage.getTableWithID("browseBar");
   assertNotNull(browseBar);
   assertEquals("MGI Coutier > Liste de diffusion > Activité", browseBar.getCellAsText(0, 0));
   assertEquals(
       "Main", browseBar.getTableCell(0, 0).getLinkWith("Liste de diffusion").getURLString());
   WebTable tableDescription = activityPage.getTableWithID("description");
   assertNotNull(tableDescription);
   String description = tableDescription.getCellAsText(1, 0);
   assertEquals("Liste de diffusion de test", description);
   WebTable tableAddress = activityPage.getTableWithID("subscribedAddress");
   assertNotNull(tableAddress);
   String subscribedAddress = tableAddress.getCellAsText(1, 0);
   assertEquals("*****@*****.**", subscribedAddress);
   WebTable tableHistory = activityPage.getTableWithID("activities");
   assertNotNull(tableHistory);
   assertEquals("Historique des Messages", tableHistory.getCellAsText(0, 0));
   assertEquals("2007", tableHistory.getCellAsText(2, 0));
   assertEquals("", tableHistory.getCellAsText(2, 1));
   assertEquals("", tableHistory.getCellAsText(2, 2));
   assertEquals("", tableHistory.getCellAsText(2, 3));
   assertEquals("", tableHistory.getCellAsText(2, 4));
   assertEquals("", tableHistory.getCellAsText(2, 5));
   assertEquals("", tableHistory.getCellAsText(2, 6));
   assertEquals("", tableHistory.getCellAsText(2, 7));
   assertEquals("", tableHistory.getCellAsText(2, 8));
   assertEquals("", tableHistory.getCellAsText(2, 9));
   assertEquals("", tableHistory.getCellAsText(2, 10));
   assertEquals("2", tableHistory.getCellAsText(2, 11));
   assertEquals("2", tableHistory.getCellAsText(2, 12));
   assertEquals("1", tableHistory.getCellAsText(3, 1));
   assertEquals("3", tableHistory.getCellAsText(3, 2));
   assertEquals("3", tableHistory.getCellAsText(3, 3));
   assertEquals("", tableHistory.getCellAsText(3, 4));
   assertEquals("", tableHistory.getCellAsText(3, 5));
   assertEquals("", tableHistory.getCellAsText(3, 6));
   assertEquals("", tableHistory.getCellAsText(3, 7));
   assertEquals("", tableHistory.getCellAsText(3, 8));
   assertEquals("", tableHistory.getCellAsText(3, 9));
   assertEquals("", tableHistory.getCellAsText(3, 10));
   assertEquals("", tableHistory.getCellAsText(3, 11));
   assertEquals("", tableHistory.getCellAsText(3, 12));
   assertEquals(
       "list/mailinglist45/currentYear/2007/currentMonth/11",
       tableHistory.getTableCell(2, 12).getLinkWith("2").getURLString());
   assertEquals(
       "list/mailinglist45/currentYear/2008/currentMonth/2",
       tableHistory.getTableCell(3, 3).getLinkWith("3").getURLString());
   WebTable tableMessages = activityPage.getTableWithID("messages");
   assertNotNull(tableMessages);
   assertEquals("Message récents", tableMessages.getCellAsText(0, 0));
   assertEquals("Simple database message 3", tableMessages.getCellAsText(1, 0));
   assertEquals(
       MESSAGE_BASE + 3,
       tableMessages.getTableCell(1, 0).getLinkWith("Simple database message 3").getURLString());
   assertEquals(
       "[email protected] - 02/03/2008 10:34:15", tableMessages.getCellAsText(2, 0));
   assertEquals(
       "Bonjour famille Simpson, j\'espère que vous allez bien. Ici "
           + "tout se passe bien et Krusty est très sympathique. Surtout depuis que "
           + "Tahiti Bob est retourné en prison. Je dois remplacer l\'homme canon "
           + "dans ...",
       tableMessages.getCellAsText(3, 0));
   assertEquals(MESSAGE_BASE + 3, tableMessages.getTableCell(3, 0).getLinks()[0].getURLString());
   assertEquals("Simple database message 4", tableMessages.getCellAsText(4, 0));
   assertEquals(
       MESSAGE_BASE + 4,
       tableMessages.getTableCell(4, 0).getLinkWith("Simple database message 4").getURLString());
   assertEquals(
       "[email protected] - 02/03/2008 10:12:15", tableMessages.getCellAsText(5, 0));
   assertEquals(
       "Bonjour famille Simpson, j\'espère que vous allez bien. Ici "
           + "tout se passe bien et Krusty est très sympathique. Surtout depuis que "
           + "Tahiti Bob est retourné en prison. Je dois remplacer l\'homme canon "
           + "dans ...",
       tableMessages.getCellAsText(6, 0));
   assertEquals(MESSAGE_BASE + 4, tableMessages.getTableCell(6, 0).getLinks()[0].getURLString());
   assertEquals("Simple database message 1", tableMessages.getCellAsText(7, 0));
   assertEquals(
       MESSAGE_BASE + 1,
       tableMessages.getTableCell(7, 0).getLinkWith("Simple database message 1").getURLString());
   assertEquals(
       "[email protected] - 01/03/2008 10:34:15", tableMessages.getCellAsText(8, 0));
   assertEquals(
       "Bonjour famille Simpson, j\'espère que vous allez bien. Ici "
           + "tout se passe bien et Krusty est très sympathique. Surtout depuis que "
           + "Tahiti Bob est retourné en prison. Je dois remplacer l\'homme canon "
           + "dans ...",
       tableMessages.getCellAsText(9, 0));
   assertEquals(MESSAGE_BASE + 1, tableMessages.getTableCell(9, 0).getLinks()[0].getURLString());
   assertEquals("Simple database message 11", tableMessages.getCellAsText(10, 0));
   assertEquals(
       MESSAGE_BASE + 11,
       tableMessages.getTableCell(10, 0).getLinkWith("Simple database message 11").getURLString());
   assertEquals(
       "[email protected] - 21/02/2008 10:34:15", tableMessages.getCellAsText(11, 0));
   assertEquals(
       "Bonjour famille Simpson, j\'espère que vous allez bien. Ici "
           + "tout se passe bien et Krusty est très sympathique. Surtout depuis que "
           + "Tahiti Bob est retourné en prison. Je dois remplacer l\'homme canon "
           + "dans ...",
       tableMessages.getCellAsText(12, 0));
   assertEquals(MESSAGE_BASE + 11, tableMessages.getTableCell(12, 0).getLinks()[0].getURLString());
   WebTable tableTabbedPane = activityPage.getTableWithID("tabbedPane");
   assertNotNull(tableTabbedPane);
   tableTabbedPane = tableTabbedPane.getTableCell(0, 0).getTables()[0];
   assertNotNull(tableTabbedPane);
   assertEquals("Activité", tableTabbedPane.getCellAsText(0, 2));
   assertEquals("Liste des Messages", tableTabbedPane.getCellAsText(0, 5));
   assertFalse(activityPage.getText().indexOf("Modération") > 0);
   assertFalse(activityPage.getText().indexOf("Abonnés Extérieurs") > 0);
 }