From 892972229c3952b5ba9a77bef2ce2e0cece5677f Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 15 Dec 2020 22:22:13 +0530 Subject: Fix tests and quiz template --- yaksh/live_server_tests/selenium_test.py | 13 ++++++++++--- yaksh/templates/exam.html | 6 +++--- yaksh/templates/yaksh/question.html | 2 +- yaksh/test_views.py | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/yaksh/live_server_tests/selenium_test.py b/yaksh/live_server_tests/selenium_test.py index 6d9117d..0c9cfcc 100644 --- a/yaksh/live_server_tests/selenium_test.py +++ b/yaksh/live_server_tests/selenium_test.py @@ -126,9 +126,16 @@ class SeleniumTest(): def open_quiz(self): # open module link - self.driver.find_elements_by_partial_link_text( - 'START')[0].click() - self.driver.find_element_by_link_text('START').click() + try: + self.driver.find_elements_by_partial_link_text( + 'Start')[0].click() + except IndexError: + self.driver.find_elements_by_partial_link_text( + 'Continue')[0].click() + try: + self.driver.find_element_by_link_text('Start').click() + except Exception: + self.driver.find_element_by_link_text('Continue').click() # open quiz link self.driver.find_element_by_link_text(self.quiz_name).click() diff --git a/yaksh/templates/exam.html b/yaksh/templates/exam.html index a773076..2290ca4 100644 --- a/yaksh/templates/exam.html +++ b/yaksh/templates/exam.html @@ -88,14 +88,14 @@
- - +
+ - + {% for category, question_number in paper.get_categorized_question_indices.items %}
Category Question No.
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index 2dbfeed..67bbf3f 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -152,7 +152,7 @@ question_type = "{{ question.type }}";

{{ question.summary }}

-
+
{% if question.language == "other" %} Topic: {{question.topic}} {% else %} diff --git a/yaksh/test_views.py b/yaksh/test_views.py index 4e1343e..c2fa4ac 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -3780,7 +3780,7 @@ class TestCourseDetail(TestCase): self.assertEqual(response.status_code, 200) data = response.json()['user_data'] self.assertIn("Student_First_Name Student_Last_Name", data) - self.assertIn("Overall Course Progress", data) + self.assertIn("Course completed", data) self.assertIn("Per Module Progress", data) -- cgit