Source:
<code>private void testContent() throws Exception { ______TS("Typical case: Log in with filled profile values"); profilePage.ensureProfileContains("Ben", "i.m.benny@gmail.tmt", "TEAMMATES Test Institute 4", "Singaporean", StudentProfileAttributes.Gender.MALE, "I am just another student :P"); ______TS("Typical case: no picture"); profilePage.editProfileThroughUi("short.name", "e@email.tmt", "inst", "American", StudentProfileAttributes.Gender.FEMALE, "this is enough!$%&*</>"); profilePage.ensureProfileContains("short.name", "e@email.tmt", "inst", "American", StudentProfileAttributes.Gender.FEMALE, "this is enough!$%&*</>"); profilePage.verifyStatusMessage(Const.StatusMessages.STUDENT_PROFILE_EDITED); ______TS("Typical case: picture upload and edit"); profilePage.fillProfilePic("src/test/resources/images/profile_pic.png"); profilePage.uploadPicture(); profilePage.verifyStatusMessage(Const.StatusMessages.STUDENT_PROFILE_PICTURE_SAVED); profilePage.showPictureEditor(); profilePage.waitForUploadEditModalVisible(); <START> profilePage.editProfilePhoto(); <END> profilePage.ensureProfileContains("short.name", "e@email.tmt", "inst", "American", StudentProfileAttributes.Gender.FEMALE, "this is enough!$%&*</>"); profilePage.verifyPhotoSize("295px", "295px"); JSONObject studentProfileAttributes = new JSONObject( BackDoor.getStudentProfile(TestProperties.TEST_STUDENT2_ACCOUNT)); String prevPictureKey = studentProfileAttributes.getJSONObject("studentProfile").getString("pictureKey"); verifyPictureIsPresent(prevPictureKey); }</code><technical_language>fault done this before, is profile photo "edited"? ways edit a photo -- cropping, rotating/flipping, etc</technical_language>

Target:
private void testContent() throws Exception { ______TS("Typical case: Log in with filled profile values"); StudentHomePage shp = getHomePage().clickStudentLogin().loginAsStudent( TestProperties.TEST_STUDENT2_ACCOUNT, TestProperties.TEST_STUDENT2_PASSWORD); StudentProfilePage profilePage = shp.loadProfileTab(); profilePage.ensureProfileContains("Ben", "i.m.benny@gmail.tmt", "TEAMMATES Test Institute 4", "Singaporean", StudentProfileAttributes.Gender.MALE, "I am just another student :P"); ______TS("Typical case: no picture"); profilePage.editProfileThroughUi("short.name", "e@email.tmt", "inst", "American", StudentProfileAttributes.Gender.FEMALE, "this is enough!$%&*</>"); profilePage.ensureProfileContains("short.name", "e@email.tmt", "inst", "American", StudentProfileAttributes.Gender.FEMALE, "this is enough!$%&*</>"); profilePage.verifyStatusMessage(Const.StatusMessages.STUDENT_PROFILE_EDITED); ______TS("Typical case: picture upload and edit"); profilePage.fillProfilePic("src/test/resources/images/profile_pic.png"); profilePage.uploadPicture(); profilePage.verifyStatusMessage(Const.StatusMessages.STUDENT_PROFILE_PICTURE_SAVED); profilePage.showPictureEditor(); profilePage.waitForUploadEditModalVisible(); profilePage.editProfilePhoto(); profilePage.ensureProfileContains("short.name", "e@email.tmt", "inst", "American", StudentProfileAttributes.Gender.FEMALE, "this is enough!$%&*</>"); profilePage.verifyPhotoSize("295px", "295px"); StudentProfileAttributes studentProfileAttributes = BackDoor.getStudentProfile(TestProperties.TEST_STUDENT2_ACCOUNT); assertTrue(profilePage.getProfilePicLink().contains(studentProfileAttributes.pictureKey)); }