From bdf90e67a750cb35dc56715a1714beae06cd98a4 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Wed, 10 Oct 2018 11:23:14 +0100 Subject: [PATCH] When an execution is cancelled in query tool, two different messages are encountered at different time. There is no exact pattern for them. So now, the test case will look for any one of following message in the output text box i) canceling statement due to user request ii) Execution cancelled! --- web/pgadmin/feature_tests/query_tool_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/pgadmin/feature_tests/query_tool_tests.py b/web/pgadmin/feature_tests/query_tool_tests.py index 8e0b7cc71..1c379e2da 100644 --- a/web/pgadmin/feature_tests/query_tool_tests.py +++ b/web/pgadmin/feature_tests/query_tool_tests.py @@ -11,14 +11,13 @@ from __future__ import print_function import sys from selenium.common.exceptions import StaleElementReferenceException - -import config from selenium.webdriver import ActionChains from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from regression.python_test_utils import test_utils from regression.feature_utils.base_feature_test import BaseFeatureTest +import config class QueryToolFeatureTest(BaseFeatureTest): @@ -649,7 +648,8 @@ SELECT 1, pg_sleep(300)""" self.page.click_tab('Messages') self.page.find_by_xpath( '//div[contains(@class, "sql-editor-message") and ' - 'contains(string(), "canceling statement due to user request")]' + '(contains(string(), "canceling statement due to user request") ' + 'or contains(string(), "Execution Cancelled!"))]' ) def _supported_server_version(self):