-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#13066] Combine Admin Add Account Request Flow into Instructor Account Request Flow #13124
base: master
Are you sure you want to change the base?
Changes from all commits
0b29350
13f7add
4f24c5e
880278f
86ecbaf
b97b637
105cb50
1132790
63fb244
b81a48f
0223006
49f4ce1
0de6816
c481da4
35471f2
3e6daf8
1030c7e
2dc547f
9e15d2f
66d4a0e
7862935
28e5c97
7a954f7
3cbf5a0
7d5feca
0fa111b
a2f3b4f
266a37e
3351df8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,26 +26,25 @@ public void testAll() { | |
AdminHomePage homePage = loginAdminToPage(url, AdminHomePage.class); | ||
|
||
______TS("Test adding instructors with both valid and invalid details"); | ||
|
||
String name = "AHPUiT Instrúctör WithPlusInEmail"; | ||
String email = "[email protected]"; | ||
String institute = "TEAMMATES Test Institute 1"; | ||
|
||
homePage.queueInstructorForAdding(name, email, institute); | ||
|
||
String singleLineDetails = "Instructor With Invalid Email | invalidemail | TEAMMATES Test Institute 1"; | ||
|
||
homePage.queueInstructorForAdding(singleLineDetails); | ||
|
||
homePage.addAllInstructors(); | ||
|
||
String successMessage = homePage.getMessageForInstructor(0); | ||
assertTrue(successMessage.contains( | ||
"Instructor \"AHPUiT Instrúctör WithPlusInEmail\" has been successfully created")); | ||
|
||
String failureMessage = homePage.getMessageForInstructor(1); | ||
assertTrue(failureMessage.contains( | ||
"\"invalidemail\" is not acceptable to TEAMMATES as a/an email because it is not in the correct format.")); | ||
homePage.verifyStatusMessage("\"invalidemail\" is not acceptable to TEAMMATES as a/an email because it is not " | ||
+ "in the correct format. An email address contains some text followed by one '@' sign followed by some " | ||
+ "more text, and should end with a top level domain address like .com. It cannot be longer than 254 " | ||
+ "characters, cannot be empty and cannot contain spaces."); | ||
|
||
______TS("Verify that newly added instructor appears in account request table"); | ||
homePage.verifyInstructorInAccountRequestTable(name, email, institute); | ||
|
||
______TS("Test approving a valid account request"); | ||
homePage.clickApproveAccountRequestButton(name, email, institute); | ||
homePage.verifyStatusMessage("Account request was successfully approved. Email has been sent to " | ||
+ "[email protected]."); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,33 +23,25 @@ public void testAll() { | |
AdminHomePage homePage = loginAdminToPage(url, AdminHomePage.class); | ||
|
||
______TS("Test adding instructors with both valid and invalid details"); | ||
|
||
String name = "AHPUiT Instrúctör WithPlusInEmail"; | ||
String email = "[email protected]"; | ||
String institute = "TEAMMATES Test Institute 1"; | ||
|
||
homePage.queueInstructorForAdding(name, email, institute); | ||
|
||
String singleLineDetails = "Instructor With Invalid Email | invalidemail | TEAMMATES Test Institute 1"; | ||
|
||
homePage.queueInstructorForAdding(singleLineDetails); | ||
|
||
homePage.addAllInstructors(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As part of our migration to SQL, please keep the E2E tests the same as its non-SQL counterpart as much as possible. The logic here does not represent the same logic in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both tests use the same logic now, the page reload was removed because |
||
|
||
String successMessage = homePage.getMessageForInstructor(0); | ||
assertTrue(successMessage.contains( | ||
"Instructor \"AHPUiT Instrúctör WithPlusInEmail\" has been successfully created")); | ||
|
||
String failureMessage = homePage.getMessageForInstructor(1); | ||
assertTrue(failureMessage.contains( | ||
"\"invalidemail\" is not acceptable to TEAMMATES as a/an email because it is not in the correct format.")); | ||
|
||
homePage.reloadPage(); | ||
homePage.verifyStatusMessage("\"invalidemail\" is not acceptable to TEAMMATES as a/an email because it is not " | ||
+ "in the correct format. An email address contains some text followed by one '@' sign followed by some " | ||
+ "more text, and should end with a top level domain address like .com. It cannot be longer than 254 " | ||
+ "characters, cannot be empty and cannot contain spaces."); | ||
|
||
______TS("Verify that newly added instructor appears in account request table"); | ||
|
||
homePage.verifyInstructorInAccountRequestTable(name, email, institute); | ||
|
||
______TS("Test approving a valid account request"); | ||
homePage.clickApproveAccountRequestButton(name, email, institute); | ||
homePage.verifyStatusMessage("Account request was successfully approved. Email has been sent to " | ||
+ "[email protected]."); | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try not to remove this negative test case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added back an error toast for when a single line request has an invalid email under
validateAndAddInstructorDetails
, it works when I add a request manually but when running the e2e test, no toast is shown.A toast made by the approve account button - under the account request table still works, any ideas why on this is happening?
https://github.com/user-attachments/assets/c985d4dd-5a51-4ca0-90e1-67ee7e48197a
I've tried rerunning the e2e tests after deleting all the postgres data and remaking all docker containers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue was user error, I forgot to build the front-end files after editing.
I've added back in the negative test case with a updated error message.