def test_changePassword(self): myProfilePage = MyProfilePageSS(self.driver, self.wait) changePassPage = myProfilePage.clickChangePsswordLink() confirmPage = changePassPage.fillForm(self.superuser_password, "%s1" %self.superuser_password) profilePage = confirmPage.clickContinueButton() changePassPage = profilePage.clickChangePasswordButton() confirmPage = changePassPage.fillForm("%s1" %self.superuser_password, self.superuser_password) self.assertEquals(confirmPage.getConfirmationMessage(), "Your password was successfully changed","Password not changed!")
def test_selectUserRolePreferredSubjectsGradeRangeSchool(self): role = "Informal Educator" gradeRange = "6-8" school = "KING COVE SCHOOL" subject = "Science" postalCode = "99612" editProfilePage = self.goToEditProfilePage() editProfilePage.selectUserRoleByVisibleText(role) editProfilePage.selectGradeRange(gradeRange) editProfilePage.selectSchool(school) editProfilePage.selectFirstPreferredSubject() homePage = editProfilePage.clickSubmit() myProfilePage = MyProfilePageSS(self.driver, self.wait) self.assertTrue(role in myProfilePage.getProfileDetails(), "User role not updated") self.assertTrue(subject in myProfilePage.getProfileDetails(), "Preferred subjects not updated") self.assertTrue(gradeRange in myProfilePage.getProfileDetails(), "Grade range not updated") self.assertTrue(school in myProfilePage.getProfileDetails(), "School not updated")
def goToEditProfilePage(self): myProfilePage = MyProfilePageSS(self.driver, self.wait) editProfilePage = myProfilePage.clickEditProfileLink() return editProfilePage