From e2c65655dcdc5558cfb4ab668c3012024d27ac75 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Fri, 1 Sep 2017 16:51:37 +0530 Subject: Removed all the checkpoints set for selenium tests on travis javascript strings includes method changed to indexOf, as includes belongs to ES6. This was the main reason for failure of selenium tests on travis. --- yaksh/live_server_tests/selenium_test.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'yaksh/live_server_tests') diff --git a/yaksh/live_server_tests/selenium_test.py b/yaksh/live_server_tests/selenium_test.py index d9ae9cd..21a9e42 100644 --- a/yaksh/live_server_tests/selenium_test.py +++ b/yaksh/live_server_tests/selenium_test.py @@ -17,11 +17,8 @@ class ElementDisplay(object): def __call__(self, driver): try: element = EC._find_element(driver, self.locator) - a = element.value_of_css_property("display") == "none" - print(a) - return a + return element.value_of_css_property("display") == "none" except Exception as e: - print(e) return False @@ -65,7 +62,6 @@ class SeleniumTest(): def submit_answer(self, question_label, answer, loop_count=1): self.driver.implicitly_wait(2) for count in range(loop_count): - print("in") self.driver.find_element_by_link_text(question_label).click() submit_answer_elem = self.driver.find_element_by_id("check") self.driver.execute_script('global_editor.editor.setValue({});'.format(answer)) @@ -75,7 +71,7 @@ class SeleniumTest(): def test_c_question(self, question_label): # Incorrect Answer - loop_count = 3 + loop_count = 10 answer = '\"int add(int a, int b, int c)\\n{return;}\"' self.submit_answer(question_label, answer, loop_count) @@ -91,7 +87,7 @@ class SeleniumTest(): def test_python_question(self, question_label): # Incorrect Answer - loop_count = 3 + loop_count = 10 answer = '\"def is_palindrome(s):\\n return s\"' self.submit_answer(question_label, answer, loop_count) @@ -107,7 +103,7 @@ class SeleniumTest(): def test_bash_question(self, question_label): # Incorrect Answer - loop_count = 3 + loop_count = 10 answer = '\"#!/bin/bash\\nls\"' self.submit_answer(question_label, answer, loop_count) -- cgit