InvitationGuestActionsPage.gotoPage(htmlMessage, InvitationGuestActionsPage.Action.ACCEPT);
Assert.assertTrue("There was an error message when accepting the invitation message:\n"
+ guestPage.getMessage(),
guestPage.getMessage().equals(""));
// Register a new user.
RegistrationPage rp = new RegistrationPage();
rp.fillRegisterForm(null, null, "InvitedMember", "WeakPassword", "WeakPassword", null);
rp.clickRegister();
Assert.assertTrue("There were failure messages when registering.",
rp.getValidationFailureMessages().isEmpty());
getDriver().get(getUtil().getURLToLoginAs("InvitedMember", "WeakPassword"));
Assert.assertTrue("Failed to log user in after registering from invitation.", rp.isAuthenticated());
// Now switch to guest again and try to accept the invitation again.
getUtil().forceGuestUser();
guestPage = InvitationGuestActionsPage.gotoPage(htmlMessage, InvitationGuestActionsPage.Action.ACCEPT);
Assert.assertTrue("After the invitation was accepted a user was allowed to accept it again.",