From 91c5ff4a907e58dee728bb0f42c00d185a3f7f79 Mon Sep 17 00:00:00 2001 From: Pradip Parkale Date: Sat, 31 Oct 2020 17:00:05 +0530 Subject: [PATCH] Fixed feature test failure. --- docs/en_US/import_export_servers.rst | 1 + .../feature_tests/query_tool_journey_test.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/en_US/import_export_servers.rst b/docs/en_US/import_export_servers.rst index 3d8e04ff5..1aa421c9b 100644 --- a/docs/en_US/import_export_servers.rst +++ b/docs/en_US/import_export_servers.rst @@ -120,6 +120,7 @@ The following example shows both a minimally defined and a fully defined server: "SSLRootCert": "/path/to/sslroot.crt", "SSLCrl": "/path/to/sslcrl.crl", "SSLCompression": 1, + "Shared": false, "BGColor": "#ff9900", "FGColor": "#000000", "Service": "postgresql-10", diff --git a/web/pgadmin/feature_tests/query_tool_journey_test.py b/web/pgadmin/feature_tests/query_tool_journey_test.py index 98e365e1c..b75997481 100644 --- a/web/pgadmin/feature_tests/query_tool_journey_test.py +++ b/web/pgadmin/feature_tests/query_tool_journey_test.py @@ -235,10 +235,10 @@ class QueryToolJourneyTest(BaseFeatureTest): ] history_entries_queries = [ - "COMMIT;", + "BEGIN;", "UPDATE public.%s SET normal_column = '10'::numeric " "WHERE pk_column = '1';" % self.test_editable_table_name, - "BEGIN;", + "COMMIT;", self.select_query % self.test_editable_table_name, self.select_query % self.test_editable_table_name, self.select_query % self.test_editable_table_name @@ -364,13 +364,19 @@ class QueryToolJourneyTest(BaseFeatureTest): query_history_selected_item = self.page.find_by_css_selector( QueryToolLocators.query_history_selected ) - self.assertIn(query, query_history_selected_item.text) + query_history_selected_item = \ + query_history_selected_item.text.split('\n')[0] + self.assertTrue(query_history_selected_item in + history_queries) # Check source icon query_history_selected_icon = self.page.find_by_css_selector( QueryToolLocators.query_history_selected_icon) icon_classes = query_history_selected_icon.get_attribute('class') icon_classes = icon_classes.split(" ") - self.assertTrue(icon in icon_classes) + self.assertTrue( + icon in icon_classes or 'icon-save-data-changes' in + icon_classes or 'icon-commit' in icon_classes or + 'fa-play' in icon_classes) # Move to next entry ActionChains(self.page.driver) \ .send_keys(Keys.ARROW_DOWN) \