Skip to content

Commit

Permalink
[#12048] Migrate StudentCourseJoinConfirmationPageE2ETest (#12815)
Browse files Browse the repository at this point in the history
* migrate test

* Update src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java

Co-authored-by: Cedric Ong <[email protected]>

---------

Co-authored-by: Wei Qing <[email protected]>
Co-authored-by: Cedric Ong <[email protected]>
  • Loading branch information
3 people authored Mar 6, 2024
1 parent e3da52f commit b0a8caf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.testng.annotations.Test;

import teammates.common.datatransfer.SqlDataBundle;
import teammates.common.datatransfer.attributes.StudentAttributes;
import teammates.common.util.AppUrl;
import teammates.common.util.Const;
Expand All @@ -19,8 +20,11 @@ protected void prepareTestData() {
testData = loadDataBundle("/StudentCourseJoinConfirmationPageE2ETest.json");
removeAndRestoreDataBundle(testData);

SqlDataBundle sqlTestData = loadSqlDataBundle("/StudentCourseJoinConfirmationPageE2ETest_SqlEntities.json");
removeAndRestoreSqlDataBundle(sqlTestData);

newStudent = testData.students.get("[email protected]");
newStudent.setGoogleId(testData.accounts.get("alice.tmms").getGoogleId());
newStudent.setGoogleId(sqlTestData.accounts.get("alice.tmms").getGoogleId());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
{
"accounts": {
"SCJoinConf.instr": {
"googleId": "tm.e2e.SCJoinConf.instr",
"name": "Teammates Test",
"email": "[email protected]",
"readNotifications": {}
},
"alice.tmms": {
"googleId": "tm.e2e.SCJoinConf.alice",
"name": "Alice B",
"email": "[email protected]",
"readNotifications": {}
}
},
"courses": {
"SCJoinConf.CS2104": {
"id": "tm.e2e.SCJoinConf.CS2104",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"accounts": {
"SCJoinConf.instr": {
"googleId": "tm.e2e.SCJoinConf.instr",
"name": "Teammates Test",
"email": "[email protected]",
"id": "00000000-0000-4000-8000-000000000001"
},
"alice.tmms": {
"googleId": "tm.e2e.SCJoinConf.alice",
"name": "Alice B",
"email": "[email protected]",
"id": "00000000-0000-4000-8000-000000000002"
}
}
}

0 comments on commit b0a8caf

Please sign in to comment.