Example #1
0
 def test_create_group(self, one_group, one_testtaker):
     login_page.make_login(self.admin_name, self.admin_pass)
     main_page.open_groups()
     group_page.create_new_group(one_group.label)
     assert main_page.is_object_in_list(one_group.label)
     group_page.add_testtaker_to_group(one_testtaker.label)
     assert group_page.is_testaker_selected(one_testtaker.label)
Example #2
0
 def test_pass_test_as_testtaker(self, one_testtaker, one_delivery):
     login_page.make_login(one_testtaker.label, one_testtaker.password)
     test_passing_page.select_delivery_for_passing(one_delivery)
     test_passing_page.choose_answer()
     test_passing_page.choose_answer(1)
     test_passing_page.choose_answer(2)
     assert test_passing_page.is_delivery_availiable(one_delivery)
Example #3
0
 def test_create_delivery(self, one_delivery):
     login_page.make_login(self.admin_name, self.admin_pass)
     main_page.open_delivery()
     # TODO: realise delivery object as class, instead of namedtuple
     # self.suite_delivery.group = self.suite_group
     # self.suite_delivery.test = self.suite_test
     admin_steps.create_new_delivery(one_delivery)
     assert delivery_page.is_object_in_list(one_delivery.label)
Example #4
0
 def test_view_results_as_administrator(self, one_testtaker, one_delivery):
     login_page.make_login(self.admin_name, self.admin_pass)
     main_page.open_results()
     results_page.select_target_result(one_delivery, one_testtaker)
     assert one_testtaker.label == results_page.get_testtaker_label()
     assert one_testtaker.login == results_page.get_testtaker_login()
     assert 0 == results_page.get_item_score_by_index(0)
     assert 1 == results_page.get_item_score_by_index(1)
     assert 0 == results_page.get_item_score_by_index(2)
Example #5
0
 def test_install_proctoring(self):
     login_page.make_login(self.admin_name, self.admin_pass)
     main_page.open_settings()
     plugin_name = "taoProctoring"
     if settings_page.is_plugin_installed(plugin_name):
         pytest.skip("{} plugin already installed".format(plugin_name))
     settings_page.install_plugin(plugin_name)
     main_page.open_settings()
     assert settings_page.is_plugin_installed(plugin_name)
Example #6
0
 def test_launch_test_via_lti(self, additional_tab, one_delivery, one_lti):
     login_page.make_login(self.admin_name, self.admin_pass)
     main_page.open_delivery()
     lti_link = delivery_page.get_lti_link(one_delivery)
     external_lti_page.open()
     external_lti_page.fill_launch_url(lti_link)
     external_lti_page.fill_lti_key(one_lti.key)
     external_lti_page.fill_lti_secret(one_lti.secret)
     external_lti_page.set_learner_role()
     external_lti_page.save_and_launch()
     additional_tab(2)
     assert test_passing_page.is_delivery_availiable(one_delivery)
Example #7
0
 def test_able_to_authorize_session(self, additional_tab, one_proctor, one_testtaker, one_delivery):
     # Try to start test as TestTaker
     login_page.make_login(one_testtaker.label, one_testtaker.password)
     test_passing_page.select_delivery_for_passing(one_delivery)
     assert test_passing_page.get_delivery_popup_message(
         one_delivery) == "Please wait, authorization in process ..."
     # Authorize test as Proctor
     additional_tab(1)
     login_page.make_login(one_proctor.label, one_proctor.password)
     test_passing_page.open_delivery_monitor(one_delivery)
     test_passing_page.authorize_delivery(one_delivery)
     assert test_passing_page.get_delivery_status(one_delivery) == "Authorized but not started"
     # Check that test authorized
     additional_tab(0)
     browser.driver().refresh()
     login_page.make_login(one_testtaker.label, one_testtaker.password)
     assert test_passing_page.get_delivery_popup_message(one_delivery) == "Authorized, you may proceed"
Example #8
0
 def test_loggin_as_administrator(self):
     login_page.make_login(self.admin_name, self.admin_pass)
     assert self.admin_name == main_page.get_loggined_username()
Example #9
0
 def test_create_lti(self, one_lti):
     login_page.make_login(self.admin_name, self.admin_pass)
     admin_steps.create_new_lti(one_lti)
     assert main_page.is_object_in_list(one_lti.label)
Example #10
0
 def test_enable_proctoring_for_delivery(self, one_delivery):
     login_page.make_login(self.admin_name, self.admin_pass)
     main_page.open_delivery()
     delivery_page.open_target_delivery(one_delivery)
     delivery_page.set_proctoring(enabled=True)
     delivery_page.check_popup_message("Delivery saved")  # instead of assert
Example #11
0
 def test_login_as_proctor(self, one_proctor, one_delivery):
     login_page.make_login(one_proctor.label, one_proctor.password)
     assert test_passing_page.is_delivery_availiable(one_delivery)
Example #12
0
 def test_add_interaction_to_item(self, four_items):
     login_page.make_login(self.admin_name, self.admin_pass)
     for item in four_items:
         admin_steps.add_interaction_to_item(item, choice=1)
         assert item_page.is_interaction_on_item()
Example #13
0
 def test_create_proctor(self, one_proctor):
     login_page.make_login(self.admin_name, self.admin_pass)
     main_page.open_users()
     admin_steps.create_new_user(one_proctor)
     assert main_page.is_user_in_list(one_proctor.login, one_proctor.role)
Example #14
0
 def test_remove_interaction_from_item(self, four_items):
     login_page.make_login(self.admin_name, self.admin_pass)
     # Last item used for remove interaction and delete them
     admin_steps.remove_interaction_from_item(four_items[-1])
     assert not item_page.is_interaction_on_item()
Example #15
0
 def test_create_items(self, four_items):
     login_page.make_login(self.admin_name, self.admin_pass)
     for item in four_items:
         admin_steps.create_new_item(item)
         assert item_page.is_object_in_list(item.label)
Example #16
0
 def test_delete_item(self, four_items):
     login_page.make_login(self.admin_name, self.admin_pass)
     # Last item used for remove interaction and delete them
     admin_steps.delete_target_item(four_items[-1])
     assert not item_page.is_object_in_list(four_items[-1].label)
Example #17
0
 def test_create_test(self, four_items, one_test):
     login_page.make_login(self.admin_name, self.admin_pass)
     # Last item deleted in test_delete_item
     admin_steps.create_new_test(one_test, four_items[:-1])
     main_page.open_tests()
     assert test_creation_page.is_object_in_list(one_test.label)
Example #18
0
 def test_create_testtaker(self, one_testtaker):
     login_page.make_login(self.admin_name, self.admin_pass)
     admin_steps.create_new_testtaker(one_testtaker)
     assert main_page.is_object_in_list(one_testtaker.label)