Re: Fixes for pgAdmin feature tests
Shubham Agarwal <[email protected]> Thu, 21 Nov 2019 15:39:42 +0530
| Newsgroups | gmane.comp.db.postgresql.pgadmin.devel |
|---|---|
| Message-ID | <CAKbCA9TG_rAh9N1_zEw7QAfz8h66S_NPJ8GCkh-PYEAt3aqVaw@mail.gmail.com> |
Hi Team, Attach is the patch for feature test fix containing the following: 1. Handled click event in query tool due to intermediate clicking issue. 2. Observed that the database is not getting created in a test case, so failed the test case there only. On Wed, Nov 20, 2019 at 1:09 PM Akshay Joshi <[email protected]> wrote: > Thanks, patch applied. > > On Wed, Nov 20, 2019 at 12:34 PM Shubham Agarwal < > [email protected]> wrote: > >> Hi Team, >> PFA feature test fixture patch containing the following things: >> >> 1. Added an attribute 'data-click-counter' in query execute button which >> gets incremented once query button is clicked up to 9 and then reset to 0. >> This is added just to support automation. >> 2. Locator for login_group_role is added and used to expand tree. >> 3. Functions for enabling and disable auto_commit and auto_rollback are >> made more precise. >> 4. Some scrolling problem is addressed in view_data_dml_query test. >> 5. Handled the stale element reference exception in >> query_tool_journey_test >> >> Regards, >> Shubham Agarwal >> >> On Fri, Nov 15, 2019 at 6:03 PM Akshay Joshi < >> [email protected]> wrote: >> >>> Thanks, patch applied >>> >>> On Fri, Nov 15, 2019 at 5:59 PM Shubham Agarwal < >>> [email protected]> wrote: >>> >>>> Hi Team, >>>> >>>> PFA feature test fixture patch containing the following fixes: >>>> 1. Process watcher loading logs fix >>>> 2. Auto commit/rollback issue in query_tool_tests >>>> 3. Fixed the scrolling issue while verifying values in a table. >>>> 4. Modified some functions in pgadmin_page.py >>>> >>>> On Wed, Nov 13, 2019 at 11:19 AM Akshay Joshi < >>>> [email protected]> wrote: >>>> >>>>> Thanks, patch applied. >>>>> >>>>> On Tue, Nov 12, 2019 at 6:27 PM Shubham Agarwal < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi Team, >>>>>> PFA patch containing some more fixes for random feature test failures. >>>>>> >>>>>> Thanks and regards, >>>>>> Shubham Agarwal >>>>>> >>>>>> On Mon, Nov 11, 2019 at 10:55 AM Akshay Joshi < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Thanks, patch applied with a minor change. Menu for 'Delete Drop' >>>>>>> server has been changed to 'Remove Server' which causes all the test cases >>>>>>> failing on my machine. >>>>>>> >>>>>>> On Mon, Nov 11, 2019 at 10:18 AM Shubham Agarwal < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> Hi Team, >>>>>>>> >>>>>>>> Attached is the patch containing fixes for the failed feature test >>>>>>>> cases. >>>>>>>> This patch contains- >>>>>>>> 1. Newly created function for traversing the browser tree. >>>>>>>> 2. Some synchronization issue fixes. >>>>>>>> 3. Modified locators. >>>>>>>> 4. Test cases fix for the recent commits. >>>>>>>> >>>>>>>> -- >>>>>>>> Thanks & Regards, >>>>>>>> Shubham Agarwal >>>>>>>> EnterpriseDB Corporation >>>>>>>> >>>>>>>> The Postgres Database Company >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Thanks & Regards* >>>>>>> *Akshay Joshi* >>>>>>> >>>>>>> *Sr. Software Architect* >>>>>>> *EnterpriseDB Software India Private Limited* >>>>>>> *Mobile: +91 976-788-8246* >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Thanks & Regards, >>>>>> Shubham Agarwal >>>>>> EnterpriseDB Corporation >>>>>> >>>>>> The Postgres Database Company >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Thanks & Regards* >>>>> *Akshay Joshi* >>>>> >>>>> *Sr. Software Architect* >>>>> *EnterpriseDB Software India Private Limited* >>>>> *Mobile: +91 976-788-8246* >>>>> >>>> >>>> >>>> -- >>>> Thanks & Regards, >>>> Shubham Agarwal >>>> EnterpriseDB Corporation >>>> >>>> The Postgres Database Company >>>> >>> >>> >>> -- >>> *Thanks & Regards* >>> *Akshay Joshi* >>> >>> *Sr. Software Architect* >>> *EnterpriseDB Software India Private Limited* >>> *Mobile: +91 976-788-8246* >>> >> >> >> -- >> Thanks & Regards, >> Shubham Agarwal >> EnterpriseDB Corporation >> >> The Postgres Database Company >> > > > -- > *Thanks & Regards* > *Akshay Joshi* > > *Sr. Software Architect* > *EnterpriseDB Software India Private Limited* > *Mobile: +91 976-788-8246* > -- Thanks & Regards, Shubham Agarwal EnterpriseDB Corporation The Postgres Database Company
feature_test_fix_v5.patch
(application/octet-stream, 2.6 KB)
diff --git a/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py b/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py
index 5ae86734c..22c4a99df 100644
--- a/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py
+++ b/web/pgadmin/feature_tests/pg_utilities_backup_restore_test.py
@@ -17,6 +17,7 @@ from regression.feature_utils.base_feature_test import BaseFeatureTest
from regression.python_test_utils import test_utils
from regression.python_test_utils import test_gui_helper
from regression.feature_utils.locators import NavMenuLocators
+from regression.feature_utils.tree_area_locators import TreeAreaLocators
class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
@@ -55,7 +56,10 @@ class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
self.server['sslmode']
)
test_utils.drop_database(connection, self.database_name)
- test_utils.create_database(self.server, self.database_name)
+ db_id = test_utils.create_database(self.server, self.database_name)
+ if not db_id:
+ self.assertTrue(False, "Database {} is not "
+ "created".format(self.database_name))
test_gui_helper.close_bgprocess_popup(self)
self.page.add_server(self.server)
diff --git a/web/pgadmin/feature_tests/view_data_dml_queries.py b/web/pgadmin/feature_tests/view_data_dml_queries.py
index 381be22dc..62aa09858 100644
--- a/web/pgadmin/feature_tests/view_data_dml_queries.py
+++ b/web/pgadmin/feature_tests/view_data_dml_queries.py
@@ -338,9 +338,7 @@ CREATE TABLE public.nonintpkey
self.assertEquals(text, messages_ele.text)
def _verify_row_data(self, is_new_row, config_check_data):
- self.page.find_by_css_selector(
- QueryToolLocators.btn_execute_query_css).click()
-
+ self.page.click_execute_query_button()
# First row if row height = 0, second row if its 25
row_height = 0 if is_new_row else 25
diff --git a/web/regression/feature_utils/pgadmin_page.py b/web/regression/feature_utils/pgadmin_page.py
index a754a3e25..8bec1a74b 100644
--- a/web/regression/feature_utils/pgadmin_page.py
+++ b/web/regression/feature_utils/pgadmin_page.py
@@ -171,10 +171,7 @@ class PgadminPage:
def execute_query(self, query):
self.fill_codemirror_area_with(query)
- execute_button = self.find_by_css_selector(
- QueryToolLocators.btn_execute_query_css)
- execute_button.click()
- self.wait_for_query_tool_loading_indicator_to_disappear()
+ self.click_execute_query_button()
def click_execute_query_button(self):
retry = 5