From 0ffc49f91dd9e21a6b9917b7841999bf853c3c9f Mon Sep 17 00:00:00 2001 From: mahesh Date: Fri, 18 Aug 2017 02:13:10 +0530 Subject: Adds test cases for yaml - Fixes selenium test cases, test_models, test_views - Fixes create demo question paper --- yaksh/live_server_tests/selenium_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'yaksh/live_server_tests/selenium_test.py') diff --git a/yaksh/live_server_tests/selenium_test.py b/yaksh/live_server_tests/selenium_test.py index 277f08e..aefb724 100644 --- a/yaksh/live_server_tests/selenium_test.py +++ b/yaksh/live_server_tests/selenium_test.py @@ -111,9 +111,9 @@ class SeleniumTest(): ) start_exam_elem.click() - self.test_c_question(question_label=2) - self.test_python_question(question_label=3) - self.test_bash_question(question_label=1) + self.test_c_question(question_label=7) + self.test_python_question(question_label=5) + self.test_bash_question(question_label=4) def close_quiz(self): quit_link_elem = WebDriverWait(self.driver, 5).until( -- cgit From 6ab383c02085936ecc20ffeb4b9f41ca642256c3 Mon Sep 17 00:00:00 2001 From: mahesh Date: Fri, 18 Aug 2017 17:13:02 +0530 Subject: Adds quit quiz function in selenium --- yaksh/live_server_tests/selenium_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'yaksh/live_server_tests/selenium_test.py') diff --git a/yaksh/live_server_tests/selenium_test.py b/yaksh/live_server_tests/selenium_test.py index aefb724..bc400fd 100644 --- a/yaksh/live_server_tests/selenium_test.py +++ b/yaksh/live_server_tests/selenium_test.py @@ -23,6 +23,7 @@ class SeleniumTest(): self.driver.get(self.url) self.login(username, password) self.open_quiz() + self.quit_quiz() self.close_quiz() self.logout() self.driver.close() @@ -115,6 +116,17 @@ class SeleniumTest(): self.test_python_question(question_label=5) self.test_bash_question(question_label=4) + def quit_quiz(self): + quit_link_elem = WebDriverWait(self.driver, 5).until( + EC.presence_of_element_located((By.NAME, "quit")) + ) + quit_link_elem.click() + + quit_link_elem = WebDriverWait(self.driver, 5).until( + EC.presence_of_element_located((By.NAME, "yes")) + ) + quit_link_elem.click() + def close_quiz(self): quit_link_elem = WebDriverWait(self.driver, 5).until( EC.presence_of_element_located((By.ID, "home")) -- cgit