diff options
author | adityacp | 2020-12-15 22:22:13 +0530 |
---|---|---|
committer | adityacp | 2020-12-15 22:22:13 +0530 |
commit | 892972229c3952b5ba9a77bef2ce2e0cece5677f (patch) | |
tree | 24c011313577a250d745a99fe1414bec9f292fbb | |
parent | 8ee692457729cf50abfdb260073b4f59feb0bfa1 (diff) | |
download | online_test-892972229c3952b5ba9a77bef2ce2e0cece5677f.tar.gz online_test-892972229c3952b5ba9a77bef2ce2e0cece5677f.tar.bz2 online_test-892972229c3952b5ba9a77bef2ce2e0cece5677f.zip |
Fix tests and quiz template
-rw-r--r-- | yaksh/live_server_tests/selenium_test.py | 13 | ||||
-rw-r--r-- | yaksh/templates/exam.html | 6 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 2 | ||||
-rw-r--r-- | 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 @@ </div> <br> <div> - <table class="table table-bordered table-responsive-sm"> - <thead> + <table class="table table-dark table-responsive-sm"> + <thead class="thead-dark"> <tr> <th>Category</th> <th>Question No.</th> </tr> </thead> - <tbody> + <tbody class="list"> {% for category, question_number in paper.get_categorized_question_indices.items %} <tr> <td> 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 }}"; <div> <h2>{{ question.summary }}</h2> </div> - <div> + <div style="font-size: 20px"> {% if question.language == "other" %} <small class="text text-muted"><strong>Topic:</strong> <span class="badge badge-primary">{{question.topic}}</small></span> {% 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) |