def test_edit_details_non_admin(self): email_1, _ = signup_teacher_directly() email_2, password_2 = signup_teacher_directly() name, postcode = create_organisation_directly(email_1) _, _, access_code_1 = create_class_directly(email_1) create_school_student_directly(access_code_1) join_teacher_to_organisation(email_2, name, postcode) _, _, access_code_2 = create_class_directly(email_2) create_school_student_directly(access_code_2) self.selenium.get(self.live_server_url) page = HomePage(self.selenium).go_to_login_page().login(email_2, password_2) page = page.change_teacher_details( { "title": "Mr", "first_name": "Florian", "last_name": "Aucomte", "current_password": "******", } ) assert self.is_dashboard_page(page) assert is_teacher_details_updated_message_showing(self.selenium) assert page.check_account_details( {"title": "Mr", "first_name": "Florian", "last_name": "Aucomte"} )
def test_edit_details_non_admin(self): email_1, password_1 = signup_teacher_directly() email_2, password_2 = signup_teacher_directly() name, postcode = create_organisation_directly(email_1) klass_1, class_name_1, access_code_1 = create_class_directly(email_1) create_school_student_directly(access_code_1) join_teacher_to_organisation(email_2, name, postcode) klass_2, class_name_2, access_code_2 = create_class_directly(email_2) create_school_student_directly(access_code_2) selenium.get(self.live_server_url) page = HomePage(selenium).go_to_login_page().login(email_2, password_2) page = page.change_teacher_details({ 'title': 'Mr', 'first_name': 'Florian', 'last_name': 'Aucomte', 'current_password': '******', }) assert self.is_dashboard_page(page) assert is_teacher_details_updated_message_showing(selenium) assert page.check_account_details({ 'title': 'Mr', 'first_name': 'Florian', 'last_name': 'Aucomte', })
def test_change_password(self): email, password = signup_teacher_directly() selenium.get(self.live_server_url) page = HomePage(selenium).go_to_teach_page().login(email, password) page = page.go_to_account_page() new_password = '******' page = page.change_teacher_details({ 'password': new_password, 'confirm_password': new_password, 'current_password': password, }) assert self.is_teacher_dashboard(page) assert is_teacher_details_updated_message_showing(selenium) page = page.logout().go_to_teach_page().login(email, new_password) assert self.is_teacher_dashboard(page)
def test_edit_details(self): email, password = signup_teacher_directly() selenium.get(self.live_server_url) page = HomePage(selenium).go_to_teach_page().login(email, password) page = page.go_to_account_page() page = page.change_teacher_details({ 'title': 'Mrs', 'first_name': 'Paulina', 'last_name': 'Koch', 'current_password': '******', }) assert self.is_teacher_dashboard(page) assert is_teacher_details_updated_message_showing(selenium) page = page.go_to_account_page() assert page.check_account_details({ 'title': 'Mrs', 'first_name': 'Paulina', 'last_name': 'Koch', })
def test_edit_details(self): email, password = signup_teacher_directly() create_organisation_directly(email) _, _, access_code = create_class_directly(email) create_school_student_directly(access_code) self.selenium.get(self.live_server_url) page = HomePage(self.selenium).go_to_login_page().login(email, password) page = page.change_teacher_details( { "title": "Mrs", "first_name": "Paulina", "last_name": "Koch", "current_password": "******", } ) assert self.is_dashboard_page(page) assert is_teacher_details_updated_message_showing(self.selenium) assert page.check_account_details( {"title": "Mrs", "first_name": "Paulina", "last_name": "Koch"} )
def test_edit_details(self): email, password = signup_teacher_directly() create_organisation_directly(email) klass, name, access_code = create_class_directly(email) create_school_student_directly(access_code) selenium.get(self.live_server_url) page = HomePage(selenium).go_to_login_page().login(email, password) page = page.change_teacher_details({ 'title': 'Mrs', 'first_name': 'Paulina', 'last_name': 'Koch', 'current_password': '******', }) assert self.is_dashboard_page(page) assert is_teacher_details_updated_message_showing(selenium) assert page.check_account_details({ 'title': 'Mrs', 'first_name': 'Paulina', 'last_name': 'Koch', })