Exemplo n.º 1
0
    def test_create(self):
        email, password = signup_teacher_directly()
        create_organisation_directly(email)

        page = self.go_to_homepage() \
            .go_to_teach_page() \
            .login(email, password) \
            .go_to_classes_page()

        assert page.does_not_have_classes()

        page, class_name, access_code = create_class(page)
        assert is_class_created_message_showing(selenium, class_name)

        page = page.go_to_classes_page()
        assert page.have_classes()
        assert page.does_class_exist(class_name, access_code)

        page = page.go_to_class_page(class_name)
        assert page.does_not_have_students()

        page = page.go_to_class_settings_page()
        assert page.check_class_details({
            'name': class_name,
            'classmates_data_viewable': False,
        })
Exemplo n.º 2
0
    def test_create(self):
        email, password = signup_teacher_directly()
        create_organisation_directly(email)

        page = self.go_to_homepage() \
            .go_to_teach_page() \
            .login(email, password) \
            .go_to_classes_page()

        assert page.does_not_have_classes()

        page, class_name, access_code = create_class(page)
        assert is_class_created_message_showing(selenium, class_name)

        page = page.go_to_classes_page()
        assert page.have_classes()
        assert page.does_class_exist(class_name, access_code)

        page = page.go_to_class_page(class_name)
        assert page.does_not_have_students()

        page = page.go_to_class_settings_page()
        assert page.check_class_details({
            'name': class_name,
            'classmates_data_viewable': False,
        })
    def test_create(self):
        email, password = signup_teacher_directly()
        create_organisation_directly(email)

        page = self.go_to_homepage().go_to_login_page().login_no_class(email, password)

        assert page.does_not_have_classes()

        page, class_name = create_class(page)
        assert is_class_created_message_showing(self.selenium, class_name)
Exemplo n.º 4
0
    def test_create_dashboard(self):
        email, password = signup_teacher_directly()
        create_organisation_directly(email)
        klass, name, access_code = create_class_directly(email)
        create_school_student_directly(access_code)

        page = self.go_to_homepage().go_to_login_page().login(email, password)

        page, class_name = create_class(page)

        assert is_class_created_message_showing(self.selenium, class_name)
Exemplo n.º 5
0
    def test_create(self):
        email, password = signup_teacher_directly()
        create_organisation_directly(email)

        page = self.go_to_homepage().go_to_login_page().login_no_class(
            email, password)

        assert page.does_not_have_classes()

        page, class_name = create_class(page)
        assert is_class_created_message_showing(self.selenium, class_name)
    def test_create_dashboard(self):
        email, password = signup_teacher_directly()
        create_organisation_directly(email)
        klass, name, access_code = create_class_directly(email)
        create_school_student_directly(access_code)

        page = self.go_to_homepage().go_to_login_page().login(email, password)

        page, class_name = create_class(page)

        assert is_class_created_message_showing(self.selenium, class_name)
    def test_create_dashboard_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)

        page = self.go_to_homepage().go_to_login_page().login(email_2, password_2)

        page, class_name_3 = create_class(page)

        assert is_class_created_message_showing(self.selenium, class_name_3)
Exemplo n.º 8
0
    def test_create_dashboard_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)

        page = self.go_to_homepage().go_to_login_page().login(
            email_2, password_2)

        page, class_name_3 = create_class(page)

        assert is_class_created_message_showing(self.selenium, class_name_3)