diff --git a/web/pgadmin/authenticate/oauth2.py b/web/pgadmin/authenticate/oauth2.py index 853be9c96ee..3db3a854d0b 100644 --- a/web/pgadmin/authenticate/oauth2.py +++ b/web/pgadmin/authenticate/oauth2.py @@ -76,10 +76,13 @@ def oauth_logout(): if not current_user.is_authenticated: return redirect(get_safe_post_logout_redirect()) + + # Logout the user first to avoid crypt key issue while + # cancelling existing query tool transactions + logout_user() for key in list(session.keys()): session.pop(key) - logout_user() if logout_url: return redirect(logout_url.format( redirect_uri=request.url_root, diff --git a/web/regression/feature_tests/pg_datatype_validation_test.py b/web/regression/feature_tests/pg_datatype_validation_test.py index 6792223c221..6550e9cd6f2 100644 --- a/web/regression/feature_tests/pg_datatype_validation_test.py +++ b/web/regression/feature_tests/pg_datatype_validation_test.py @@ -75,7 +75,7 @@ def before(self): # For this test case we need to set "Insert bracket pairs?" # SQL Editor preference to 'false' to avoid codemirror # to add matching closing bracket by it self. - self._update_preferences() + # self._update_preferences() # close the db connection connection.close() diff --git a/web/regression/feature_utils/locators.py b/web/regression/feature_utils/locators.py index a1d8bcafbbf..8ecf45a6a10 100644 --- a/web/regression/feature_utils/locators.py +++ b/web/regression/feature_utils/locators.py @@ -63,8 +63,10 @@ class NavMenuLocators: specified_sub_node_of_pref_tree_node = \ "//*[@id='treeContainer']//div//span[text()='{1}']" + insert_bracket_pair_switch_btn = \ - "//label[text()='Insert bracket pairs?']//following::div[1]//span" + ("//div[label[text()='Insert bracket pairs?']]/" + "following-sibling::div//input") copy_sql_to_query_tool_switch_btn = \ "//label[text()='Copy SQL from main window to query tool?']" \