Skip to content
Open
22 changes: 11 additions & 11 deletions src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public void testAll() {
studentHomePageLink);
searchPage.verifyStudentExpandedLinks(student, numExpandedRows);

______TS("Typical case: Reset student google id");
searchPage.resetStudentGoogleId(student);
student.setGoogleId(null);
______TS("Typical case: Reset student account id");
searchPage.resetStudentAccountId(student);
student.setAccountId(null);
searchPage.verifyStudentRowContentAfterReset(student, course);

______TS("Typical case: Regenerate registration key for a course student");
Expand All @@ -73,8 +73,8 @@ public void testAll() {
instructorHomePageLink);
searchPage.verifyInstructorExpandedLinks(instructor);

______TS("Typical case: Reset instructor google id");
searchPage.resetInstructorGoogleId(instructor);
______TS("Typical case: Reset instructor account id");
searchPage.resetInstructorAccountId(instructor);
searchPage.verifyInstructorRowContentAfterReset(instructor, course);

______TS("Typical case: Regenerate registration key for an instructor");
Expand Down Expand Up @@ -225,14 +225,14 @@ private String getExpectedStudentDetails(Student student) {

private String getExpectedStudentHomePageLink(Student student) {
return student.isRegistered() ? createFrontendUrl(Const.WebPageURIs.STUDENT_HOME_PAGE)
.withUserId(student.getGoogleId())
.withUserId(student.getAccountId())
.toAbsoluteString()
: "";
}

private String getExpectedStudentManageAccountLink(Student student) {
return student.isRegistered() ? createFrontendUrl(Const.WebPageURIs.ADMIN_ACCOUNTS_PAGE)
.withParam(Const.ParamsNames.INSTRUCTOR_ID, student.getGoogleId())
.withParam(Const.ParamsNames.INSTRUCTOR_ID, student.getAccountId())
.toAbsoluteString()
: "";
}
Expand All @@ -251,16 +251,16 @@ private int getExpectedNumExpandedRows(Student student) {
}

private String getExpectedInstructorHomePageLink(Instructor instructor) {
String googleId = instructor.isRegistered() ? instructor.getGoogleId() : "";
String accountId = instructor.isRegistered() ? instructor.getAccountId() : "";
return createFrontendUrl(Const.WebPageURIs.INSTRUCTOR_HOME_PAGE)
.withUserId(googleId)
.withUserId(accountId)
.toAbsoluteString();
}

private String getExpectedInstructorManageAccountLink(Instructor instructor) {
String googleId = instructor.isRegistered() ? instructor.getGoogleId() : "";
String accountId = instructor.isRegistered() ? instructor.getAccountId() : "";
return createFrontendUrl(Const.WebPageURIs.ADMIN_ACCOUNTS_PAGE)
.withParam(Const.ParamsNames.INSTRUCTOR_ID, googleId)
.withParam(Const.ParamsNames.INSTRUCTOR_ID, accountId)
.toAbsoluteString();
}

Expand Down
4 changes: 2 additions & 2 deletions src/e2e/java/teammates/e2e/pageobjects/AdminAccountsPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
public class AdminAccountsPage extends AppPage {

@FindBy(id = "account-google-id")
@FindBy(id = "account-id")
private WebElement accountId;

@FindBy(id = "account-name")
Expand Down Expand Up @@ -44,7 +44,7 @@ protected boolean containsExpectedPageContents() {
}

public void verifyAccountDetails(AccountData account) {
assertEquals(account.getGoogleId(), accountId.getText());
assertEquals(account.getAccountId(), accountId.getText());
assertEquals(account.getName(), accountName.getText());
assertEquals(account.getEmail(), accountEmail.getText());
}
Expand Down
40 changes: 20 additions & 20 deletions src/e2e/java/teammates/e2e/pageobjects/AdminSearchPageSql.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
public class AdminSearchPageSql extends AppPage {
private static final int STUDENT_COL_DETAILS = 1;
private static final int STUDENT_COL_NAME = 2;
private static final int STUDENT_COL_GOOGLE_ID = 3;
private static final int STUDENT_COL_ACCOUNT_ID = 3;
private static final int STUDENT_COL_INSTITUTE = 4;
private static final int STUDENT_COL_COMMENTS = 5;
private static final int STUDENT_COL_OPTIONS = 6;

private static final int INSTRUCTOR_COL_COURSE_ID = 1;
private static final int INSTRUCTOR_COL_NAME = 2;
private static final int INSTRUCTOR_COL_GOOGLE_ID = 3;
private static final int INSTRUCTOR_COL_ACCOUNT_ID = 3;
private static final int INSTRUCTOR_COL_INSTITUTE = 4;
private static final int INSTRUCTOR_COL_OPTIONS = 5;

Expand All @@ -44,7 +44,7 @@ public class AdminSearchPageSql extends AppPage {
private static final String EXPANDED_ROWS_HEADER_EMAIL = "Email";
private static final String EXPANDED_ROWS_HEADER_COURSE_JOIN_LINK = "Course Join Link";
private static final String EXPANDED_ROWS_HEADER_ACCOUNT_REGISTRATION_LINK = "Account Registration Link";
private static final String LINK_TEXT_RESET_GOOGLE_ID = "Reset Google ID";
private static final String LINK_TEXT_RESET_ACCOUNT_ID = "Reset Account ID";

@FindBy(id = "search-box")
private WebElement inputBox;
Expand Down Expand Up @@ -177,12 +177,12 @@ public String getStudentName(WebElement studentRow) {
return getColumnText(studentRow, STUDENT_COL_NAME);
}

public String getStudentGoogleId(WebElement studentRow) {
return getColumnText(studentRow, STUDENT_COL_GOOGLE_ID);
public String getStudentAccountId(WebElement studentRow) {
return getColumnText(studentRow, STUDENT_COL_ACCOUNT_ID);
}

public String getStudentHomeLink(WebElement studentRow) {
return getColumnLink(studentRow, STUDENT_COL_GOOGLE_ID);
return getColumnLink(studentRow, STUDENT_COL_ACCOUNT_ID);
}

public String getStudentInstitute(WebElement studentRow) {
Expand Down Expand Up @@ -210,9 +210,9 @@ public String getStudentJoinLink(Student student) {
return getStudentJoinLink(studentRow);
}

public void resetStudentGoogleId(Student student) {
public void resetStudentAccountId(Student student) {
WebElement studentRow = getStudentRow(student);
WebElement link = studentRow.findElement(By.linkText(LINK_TEXT_RESET_GOOGLE_ID));
WebElement link = studentRow.findElement(By.linkText(LINK_TEXT_RESET_ACCOUNT_ID));
link.click();

waitForConfirmationModalAndClickOk();
Expand All @@ -225,7 +225,7 @@ public WebElement getInstructorRow(Instructor instructor) {
for (WebElement row : rows) {
List<WebElement> columns = row.findElements(By.tagName("td"));
if (columns.size() >= 3 && (removeSpanFromText(columns.get(2)
.getAttribute("innerHTML")).contains(instructor.getGoogleId())
.getAttribute("innerHTML")).contains(instructor.getAccountId())
|| removeSpanFromText(columns.get(1)
.getAttribute("innerHTML")).contains(instructor.getName()))) {
return row;
Expand All @@ -242,12 +242,12 @@ public String getInstructorName(WebElement instructorRow) {
return getColumnText(instructorRow, INSTRUCTOR_COL_NAME);
}

public String getInstructorGoogleId(WebElement instructorRow) {
return getColumnText(instructorRow, INSTRUCTOR_COL_GOOGLE_ID);
public String getInstructorAccountId(WebElement instructorRow) {
return getColumnText(instructorRow, INSTRUCTOR_COL_ACCOUNT_ID);
}

public String getInstructorHomePageLink(WebElement instructorRow) {
return getColumnLink(instructorRow, INSTRUCTOR_COL_GOOGLE_ID);
return getColumnLink(instructorRow, INSTRUCTOR_COL_ACCOUNT_ID);
}

public String getInstructorInstitute(WebElement instructorRow) {
Expand All @@ -271,9 +271,9 @@ public String getInstructorJoinLink(Instructor instructor) {
return getInstructorJoinLink(instructorRow);
}

public void resetInstructorGoogleId(Instructor instructor) {
public void resetInstructorAccountId(Instructor instructor) {
WebElement instructorRow = getInstructorRow(instructor);
WebElement link = instructorRow.findElement(By.linkText(LINK_TEXT_RESET_GOOGLE_ID));
WebElement link = instructorRow.findElement(By.linkText(LINK_TEXT_RESET_ACCOUNT_ID));
link.click();

waitForConfirmationModalAndClickOk();
Expand Down Expand Up @@ -477,20 +477,20 @@ public void verifyStudentRowContent(Student student, Course course,
WebElement studentRow = getStudentRow(student);
String actualDetails = getStudentDetails(studentRow);
String actualName = getStudentName(studentRow);
String actualGoogleId = getStudentGoogleId(studentRow);
String actualAccountId = getStudentAccountId(studentRow);
String actualHomepageLink = getStudentHomeLink(studentRow);
String actualInstitute = getStudentInstitute(studentRow);
String actualComment = getStudentComments(studentRow);
String actualManageAccountLink = getStudentManageAccountLink(studentRow);

String expectedName = student.getName();
String expectedGoogleId = StringHelper.convertToEmptyStringIfNull(student.getGoogleId());
String expectedAccountId = StringHelper.convertToEmptyStringIfNull(student.getAccountId());
String expectedInstitute = StringHelper.convertToEmptyStringIfNull(course.getInstitute());
String expectedComment = StringHelper.convertToEmptyStringIfNull(student.getComments());

assertEquals(expectedDetails, actualDetails);
assertEquals(expectedName, actualName);
assertEquals(expectedGoogleId, actualGoogleId);
assertEquals(expectedAccountId, actualAccountId);
assertEquals(expectedInstitute, actualInstitute);
assertEquals(expectedComment, actualComment);
assertEquals(expectedManageAccountLink, actualManageAccountLink);
Expand Down Expand Up @@ -531,19 +531,19 @@ public void verifyInstructorRowContent(Instructor instructor, Course course,
WebElement instructorRow = getInstructorRow(instructor);
String actualCourseId = getInstructorCourseId(instructorRow);
String actualName = getInstructorName(instructorRow);
String actualGoogleId = getInstructorGoogleId(instructorRow);
String actualAccountId = getInstructorAccountId(instructorRow);
String actualHomePageLink = getInstructorHomePageLink(instructorRow);
String actualInstitute = getInstructorInstitute(instructorRow);
String actualManageAccountLink = getInstructorManageAccountLink(instructorRow);

String expectedCourseId = instructor.getCourseId();
String expectedName = instructor.getName();
String expectedGoogleId = StringHelper.convertToEmptyStringIfNull(instructor.getGoogleId());
String expectedAccountId = StringHelper.convertToEmptyStringIfNull(instructor.getAccountId());
String expectedInstitute = StringHelper.convertToEmptyStringIfNull(course.getInstitute());

assertEquals(expectedCourseId, actualCourseId);
assertEquals(expectedName, actualName);
assertEquals(expectedGoogleId, actualGoogleId);
assertEquals(expectedAccountId, actualAccountId);
assertEquals(expectedHomePageLink, actualHomePageLink);
assertEquals(expectedInstitute, actualInstitute);
assertEquals(expectedManageAccountLink, actualManageAccountLink);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private String[][] getExpectedStudentValues(List<Student> students) {
expected[i][0] = student.getSectionName();
expected[i][1] = student.getTeamName();
expected[i][2] = student.getName();
expected[i][3] = (student.getGoogleId() == null || student.getGoogleId().isEmpty()) ? "Yet to Join" : "Joined";
expected[i][3] = (student.getAccountId() == null || student.getAccountId().isEmpty()) ? "Yet to Join" : "Joined";
expected[i][4] = student.getEmail();
}
return expected;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public void verifyCourseDetails(Course course) {

public void verifyInstructorDetails(Instructor instructor) {
int instrNum = getIntrNum(instructor.getEmail());
if (instructor.getGoogleId() != null) {
assertEquals(instructor.getGoogleId(), getInstructorGoogleId(instrNum));
if (instructor.getAccountId() != null) {
assertEquals(instructor.getAccountId(), getInstructorAccountId(instrNum));
}
assertEquals(instructor.getName(), getInstructorName(instrNum));
assertEquals(instructor.getEmail(), getInstructorEmail(instrNum));
Expand Down Expand Up @@ -465,8 +465,8 @@ private WebElement getDisplayNameField(int instrNum) {
return browser.driver.findElement(By.id("displayed-name-instructor-" + instrNum));
}

public String getInstructorGoogleId(int instrNum) {
return browser.driver.findElement(By.id("google-id-instructor-" + instrNum)).getAttribute("value");
public String getInstructorAccountId(int instrNum) {
return browser.driver.findElement(By.id("account-id-instructor-" + instrNum)).getAttribute("value");
}

public String getInstructorName(int instrNum) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private String[][] getExpectedStudentValues(Student[] students) {
expected[i][0] = student.getSectionName();
expected[i][1] = student.getTeamName();
expected[i][2] = student.getName();
expected[i][3] = (student.getGoogleId() == null || student.getGoogleId().isEmpty()) ? "Yet to Join" : "Joined";
expected[i][3] = (student.getAccountId() == null || student.getAccountId().isEmpty()) ? "Yet to Join" : "Joined";
expected[i][4] = student.getEmail();
}
return expected;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private String[][] getExpectedStudentValues(Student[] students) {
expected[i][0] = student.getSectionName();
expected[i][1] = student.getTeamName();
expected[i][2] = student.getName();
expected[i][3] = (student.getGoogleId() == null || student.getGoogleId().isEmpty()) ? "Yet to Join" : "Joined";
expected[i][3] = (student.getAccountId() == null || student.getAccountId().isEmpty()) ? "Yet to Join" : "Joined";
expected[i][4] = student.getEmail();
}
return expected;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/teammates/common/util/EmailType.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ public enum EmailType {
INSTRUCTOR_COURSE_LINKS_REGENERATED("TEAMMATES: Your updated links for course [%s][Course ID: %s]"),
NEW_INSTRUCTOR_ACCOUNT("TEAMMATES: Welcome to TEAMMATES! %s"),
STUDENT_COURSE_JOIN("TEAMMATES: Invitation to join course [%s][Course ID: %s]"),
STUDENT_COURSE_REJOIN_AFTER_GOOGLE_ID_RESET("TEAMMATES: Your account has been reset for course [%s][Course ID: %s]"),
STUDENT_COURSE_REJOIN_AFTER_ACCOUNT_ID_RESET("TEAMMATES: Your account has been reset for course [%s][Course ID: %s]"),
NEW_ACCOUNT_REQUEST_ADMIN_ALERT("TEAMMATES (Action Needed): New Account Request Received"),
NEW_ACCOUNT_REQUEST_ACKNOWLEDGEMENT("TEAMMATES: Acknowledgement of Instructor Account Request"),
ACCOUNT_REQUEST_REJECTION("TEAMMATES: %s"),
INSTRUCTOR_COURSE_JOIN("TEAMMATES: Invitation to join course as an instructor [%s][Course ID: %s]"),
INSTRUCTOR_COURSE_REJOIN_AFTER_GOOGLE_ID_RESET("TEAMMATES: Your account has been reset for course [%s][Course ID: %s]"),
INSTRUCTOR_COURSE_REJOIN_AFTER_ACCOUNT_ID_RESET("TEAMMATES: Your account has been reset for course [%s][Course ID: %s]"),
USER_COURSE_REGISTER("TEAMMATES: Registered for Course [%s][Course ID: %s]"),
SEVERE_LOGS_COMPILATION("TEAMMATES (%s): Severe Error Logs Compilation"),
SESSION_LINKS_RECOVERY("TEAMMATES: Access links for recent feedback sessions"),
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/teammates/common/util/Templates.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ public static class EmailTemplates {
FileHelper.readResourceFile("userEmailTemplate-userRegisterForCourse.html");
public static final String FRAGMENT_STUDENT_COURSE_JOIN =
FileHelper.readResourceFile("studentEmailFragment-courseJoin.html");
public static final String FRAGMENT_STUDENT_COURSE_REJOIN_AFTER_GOOGLE_ID_RESET =
FileHelper.readResourceFile("studentEmailFragment-googleIdReset.html");
public static final String FRAGMENT_STUDENT_COURSE_REJOIN_AFTER_ACCOUNT_ID_RESET =
FileHelper.readResourceFile("studentEmailFragment-accountIdReset.html");
public static final String FRAGMENT_STUDENT_COURSE_REJOIN_AFTER_REGKEY_RESET =
FileHelper.readResourceFile("studentEmailFragment-registrationKeyReset.html");
public static final String FRAGMENT_INSTRUCTOR_COPY_PREAMBLE =
FileHelper.readResourceFile("instructorEmailFragment-instructorCopyPreamble.html");
public static final String FRAGMENT_INSTRUCTOR_COURSE_JOIN =
FileHelper.readResourceFile("instructorEmailFragment-courseJoin.html");
public static final String FRAGMENT_INSTRUCTOR_COURSE_REJOIN_AFTER_GOOGLE_ID_RESET =
FileHelper.readResourceFile("instructorEmailFragment-googleIdReset.html");
public static final String FRAGMENT_INSTRUCTOR_COURSE_REJOIN_AFTER_ACCOUNT_ID_RESET =
FileHelper.readResourceFile("instructorEmailFragment-accountIdReset.html");
public static final String FRAGMENT_INSTRUCTOR_COURSE_REJOIN_AFTER_REGKEY_RESET =
FileHelper.readResourceFile("instructorEmailFragment-registrationKeyReset.html");
public static final String USER_FEEDBACK_SESSION =
Expand Down
Loading