public inbox for [email protected]  
help / color / mirror / Atom feed
From: Shubham Agarwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: Re: Fixes for pgAdmin feature tests
Date: Thu, 21 Nov 2019 15:39:42 +0530
Message-ID: <CAKbCA9TG_rAh9N1_zEw7QAfz8h66S_NPJ8GCkh-PYEAt3aqVaw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDeqgEb0x-wW=MADn2B0gqoU-=A23CwsyGk2aY_yczW4ag@mail.gmail.com>
References: <CAKbCA9QmGWkR4rZEYFa_CYoWvSvDes6smUtjBHkpYDUCrBn09w@mail.gmail.com>
	<CANxoLDdhJht3Dzsuyakst9t4UVrUwrGYbE+M_-xichAJpfAkvg@mail.gmail.com>
	<CAKbCA9RQ8ebH4+XMZphrUfex4XfMfBZj2xGogUNyBqva2yPh4Q@mail.gmail.com>
	<CANxoLDf49CjXGrU2Rg-wRcNLONEEMwbqqBM27uRT1NuRWb+cOg@mail.gmail.com>
	<CAKbCA9TM0VsmjvEFtw-e2Tr77jCvPFx2ep=eXf49-1pkPZU9kA@mail.gmail.com>
	<CANxoLDcYoAA8=0picZuccgfqXmyKVaT34iQRQjihtPoihb=nXQ@mail.gmail.com>
	<CAKbCA9RyJzhmTW_7dMiSgMumjDx3tXQ3aJT2nHYeuT9FKJpO7A@mail.gmail.com>
	<CANxoLDeqgEb0x-wW=MADn2B0gqoU-=A23CwsyGk2aY_yczW4ag@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


Attachments:

  [application/octet-stream] feature_test_fix_v5.patch (2.6K, 3-feature_test_fix_v5.patch)
  download | inline diff:
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


view thread (12+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Fixes for pgAdmin feature tests
  In-Reply-To: <CAKbCA9TG_rAh9N1_zEw7QAfz8h66S_NPJ8GCkh-PYEAt3aqVaw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox