def test_view_resources(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) page = page.go_to_login_page() page = page.login(email, password) assert self.is_dashboard_page(page) page = page.go_to_resources_page().go_to_materials_page() assert self.is_materials_page(page) page = page.click_pdf_link() assert self.is_pdf_viewer_page(page) page = page.click_resources_button_link().go_to_materials_page() assert self.is_materials_page(page) keystages = ['ks1', 'lks2', 'uks2', 'ks3'] for ks in keystages: page = page.click_keystage_link(ks) assert self.is_materials_page(page)
def test_login_failure(self): selenium.get(self.live_server_url) page = HomePage(selenium) page = page.go_to_login_page() page = page.login_failure('*****@*****.**', 'Incorrect password') assert page.has_login_failed()
def test_login_success(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) page = page.go_to_login_page() page = page.login(email, password) assert self.is_dashboard_page(page)
def test_login_failure(self): self.selenium.get(self.live_server_url) page = HomePage(self.selenium) page = page.go_to_login_page() page = page.login_failure( "*****@*****.**", "Incorrect password" ) assert page.has_login_failed( "form-login-teacher", "Incorrect email address or password" )
def test_view_resources(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) page = page.go_to_login_page() page = page.login(email, password) assert self.is_dashboard_page(page) page = page.go_to_resources_page().go_to_materials_page() assert self.is_materials_page(page) page = page.click_pdf_link() assert self.is_pdf_viewer_page(page) page = page.click_resources_button_link().go_to_materials_page() assert self.is_materials_page(page)