public inbox for [email protected]help / color / mirror / Atom feed
Feature Test Fix 8+ messages / 2 participants [nested] [flat]
* Feature Test Fix @ 2021-04-01 06:36 Yogesh Mahajan <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Yogesh Mahajan @ 2021-04-01 06:36 UTC (permalink / raw) To: pgadmin-hackers Hi Team, Please find a patch which asserts the actual result of button click (before it did not). Also changes in locators for query tool & vire/edit data are accommodated. Thanks, Yogesh Mahajan EnterpriseDB Attachments: [application/octet-stream] Feature_Tests_Fix_v3.0.patch (2.8K, 3-Feature_Tests_Fix_v3.0.patch) download | inline diff: diff --git a/web/pgadmin/feature_tests/browser_tool_bar_test.py b/web/pgadmin/feature_tests/browser_tool_bar_test.py index 209323bb3..6ca88c5d0 100644 --- a/web/pgadmin/feature_tests/browser_tool_bar_test.py +++ b/web/pgadmin/feature_tests/browser_tool_bar_test.py @@ -63,10 +63,11 @@ class BrowserToolBarFeatureTest(BaseFeatureTest): self.page.expand_database_node( self.server['name'], self.server['db_password'], self.test_db) - self.page.retry_click( + self.assertTrue(self.page.retry_click( (By.CSS_SELECTOR, BrowserToolBarLocators.open_query_tool_button_css), - (By.CSS_SELECTOR, BrowserToolBarLocators.query_tool_panel_css)) + (By.CSS_SELECTOR, BrowserToolBarLocators.query_tool_panel_css)), + 'Query tool did not open on clicking Query Tool button.') def test_view_data_tool_button(self): self.page.click_a_tree_node( @@ -82,14 +83,16 @@ class BrowserToolBarFeatureTest(BaseFeatureTest): self.test_table_name, TreeAreaLocators.sub_nodes_of_tables_node) - self.page.retry_click( + self.assertTrue(self.page.retry_click( (By.CSS_SELECTOR, BrowserToolBarLocators.view_table_data_button_css), - (By.CSS_SELECTOR, BrowserToolBarLocators.view_data_panel_css)) + (By.CSS_SELECTOR, BrowserToolBarLocators.view_data_panel_css)), + 'View/Edit Data tab did not open after clicking View/Edit button.') def test_filtered_rows_tool_button(self): - self.page.retry_click( + self.assertTrue(self.page.retry_click( (By.CSS_SELECTOR, BrowserToolBarLocators.filter_data_button_css), - (By.CSS_SELECTOR, BrowserToolBarLocators.filter_alertify_box_css)) + (By.CSS_SELECTOR, BrowserToolBarLocators.filter_alertify_box_css)), + 'Filter dialogue did not open on clicking filter button.') self.page.click_modal('Cancel') diff --git a/web/regression/feature_utils/locators.py b/web/regression/feature_utils/locators.py index 297b84086..969a30e6f 100644 --- a/web/regression/feature_utils/locators.py +++ b/web/regression/feature_utils/locators.py @@ -14,12 +14,12 @@ class BrowserToolBarLocators(): ".wcFrameButton[title='Query Tool']:not(.disabled)" query_tool_panel_css = \ - ".wcPanelTab .wcTabIcon.pg-font-icon.icon-query-tool" + ".wcPanelTab .wcTabIcon.pg-font-icon.icon-query_tool" view_table_data_button_css = \ ".wcFrameButton[title='View Data']:not(.disabled)" - view_data_panel_css = ".wcPanelTab .wcTabIcon.fa.fa-table" + view_data_panel_css = ".wcPanelTab .wcTabIcon.pg-font-icon.icon-view_data" filter_data_button_css = \ ".wcFrameButton[title='Filtered Rows']:not(.disabled)" ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Feature Test Fix @ 2021-04-01 06:49 Akshay Joshi <[email protected]> parent: Yogesh Mahajan <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Akshay Joshi @ 2021-04-01 06:49 UTC (permalink / raw) To: Yogesh Mahajan <[email protected]>; +Cc: pgadmin-hackers Thanks, patch applied. On Thu, Apr 1, 2021 at 12:06 PM Yogesh Mahajan < [email protected]> wrote: > Hi Team, > > Please find a patch which asserts the actual result of button click > (before it did not). > Also changes in locators for query tool & vire/edit data are accommodated. > > > Thanks, > Yogesh Mahajan > EnterpriseDB > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Principal Software Architect* *EDB Postgres <http://edbpostgres.com>* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Feature Test Fix @ 2021-04-01 06:57 Yogesh Mahajan <[email protected]> parent: Akshay Joshi <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Yogesh Mahajan @ 2021-04-01 06:57 UTC (permalink / raw) To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers Hello, Please find one more patch which rename nomenclature for video & log file names created by solenoid. Thanks, Yogesh Mahajan EnterpriseDB On Thu, Apr 1, 2021 at 12:19 PM Akshay Joshi <[email protected]> wrote: > Thanks, patch applied. > > On Thu, Apr 1, 2021 at 12:06 PM Yogesh Mahajan < > [email protected]> wrote: > >> Hi Team, >> >> Please find a patch which asserts the actual result of button click >> (before it did not). >> Also changes in locators for query tool & vire/edit data are accommodated. >> >> >> Thanks, >> Yogesh Mahajan >> EnterpriseDB >> > > > -- > *Thanks & Regards* > *Akshay Joshi* > *pgAdmin Hacker | Principal Software Architect* > *EDB Postgres <http://edbpostgres.com>* > > *Mobile: +91 976-788-8246* > Attachments: [application/octet-stream] Feature_Tests_Fix_v4.0.patch (810B, 3-Feature_Tests_Fix_v4.0.patch) download | inline diff: diff --git a/web/regression/python_test_utils/test_utils.py b/web/regression/python_test_utils/test_utils.py index 0a401bf93..106b69189 100644 --- a/web/regression/python_test_utils/test_utils.py +++ b/web/regression/python_test_utils/test_utils.py @@ -1347,8 +1347,8 @@ def get_remote_webdriver(hub_url, browser, browser_ver, test_name): :param test_name: test name :return: remote web-driver instance for specified browser """ - test_name = browser + browser_ver + "_" + test_name + "-" + time.strftime( - "%m_%d_%y_%H_%M_%S", time.localtime()) + test_name = time.strftime("%m_%d_%y_%H_%M_%S_", time.localtime()) + \ + test_name.replace(' ', '_') + '_' + browser + browser_ver driver_local = None desired_capabilities = { "version": browser_ver, ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Feature Test Fix @ 2021-04-01 07:37 Akshay Joshi <[email protected]> parent: Yogesh Mahajan <[email protected]> 0 siblings, 0 replies; 8+ messages in thread From: Akshay Joshi @ 2021-04-01 07:37 UTC (permalink / raw) To: Yogesh Mahajan <[email protected]>; +Cc: pgadmin-hackers Thanks, patch applied. On Thu, Apr 1, 2021 at 12:28 PM Yogesh Mahajan < [email protected]> wrote: > Hello, > > Please find one more patch which rename nomenclature for video & log file > names created by solenoid. > > Thanks, > Yogesh Mahajan > EnterpriseDB > > > On Thu, Apr 1, 2021 at 12:19 PM Akshay Joshi < > [email protected]> wrote: > >> Thanks, patch applied. >> >> On Thu, Apr 1, 2021 at 12:06 PM Yogesh Mahajan < >> [email protected]> wrote: >> >>> Hi Team, >>> >>> Please find a patch which asserts the actual result of button click >>> (before it did not). >>> Also changes in locators for query tool & vire/edit data are >>> accommodated. >>> >>> >>> Thanks, >>> Yogesh Mahajan >>> EnterpriseDB >>> >> >> >> -- >> *Thanks & Regards* >> *Akshay Joshi* >> *pgAdmin Hacker | Principal Software Architect* >> *EDB Postgres <http://edbpostgres.com>* >> >> *Mobile: +91 976-788-8246* >> > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Principal Software Architect* *EDB Postgres <http://edbpostgres.com>* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 8+ messages in thread
* Feature Test Fix @ 2021-04-13 14:05 Yogesh Mahajan <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Yogesh Mahajan @ 2021-04-13 14:05 UTC (permalink / raw) To: pgadmin-hackers Hi, Please find the attached patch which handles the long time taken to launch pgAdmin in debug mode. Feature tests were failing as pgAdmin was tried to reach before it completed initialization.Currently if pgAdmin is launched with Debug=True, then on jenkins job its taking 70+ seconds for completing initialisation. Thanks, Yogesh Mahajan EnterpriseDB Attachments: [application/octet-stream] FeatureTestsFix_longTimeToload_v1.patch (3.4K, 3-FeatureTestsFix_longTimeToload_v1.patch) download | inline diff: diff --git a/web/regression/python_test_utils/test_utils.py b/web/regression/python_test_utils/test_utils.py index 91bdb0d..4de3ad9 100644 --- a/web/regression/python_test_utils/test_utils.py +++ b/web/regression/python_test_utils/test_utils.py @@ -1332,8 +1332,9 @@ def launch_url_in_browser(driver_instance, url, title='pgAdmin 4', timeout=50): if count == 0: print(str(e)) exception_msg = 'Web-page title did not match to {0}. ' \ - 'Please check url {1} accessible on ' \ - 'internet.'.format(title, url) + 'Waited for {1} seconds Please check url {2}' \ + ' accessible on internet.'.\ + format(title, timeout, url) raise WebDriverException(exception_msg) diff --git a/web/regression/runtests.py b/web/regression/runtests.py index f039e58..1142fb9 100644 --- a/web/regression/runtests.py +++ b/web/regression/runtests.py @@ -570,12 +570,12 @@ def run_parallel_tests(url_client, servers_details, parallel_tests_lists, :param max_thread_count: """ driver_object = None - try: - # Thread list - threads_list = [] - # Create thread for each server - for ser in servers_details: - # Logic to add new threads + + # Thread list + threads_list = [] + # Create thread for each server + for ser in servers_details: + try: while True: # If active thread count <= max_thread_count, add new thread if threading.activeCount() <= max_thread_count: @@ -603,16 +603,24 @@ def run_parallel_tests(url_client, servers_details, parallel_tests_lists, else: time.sleep(10) - # Start threads in parallel - for t in threads_list: - t.join() - except Exception as exc: - # Print exception stack trace - traceback.print_exc(file=sys.stderr) - print(str(exc)) - # Clean driver object created - if driver_object is not None: - driver_object.quit() + # Start threads in parallel + for t in threads_list: + t.join() + + except Exception as exc: + # Print exception stack trace + traceback.print_exc(file=sys.stderr) + print('Exception before starting tests for ' + ser['name'], + file=sys.stderr) + print(str(exc), file=sys.stderr) + + # Mark failure as true + global failure + failure = True + + # Clean driver object created + if driver_object is not None: + driver_object.quit() def run_sequential_tests(url_client, servers_details, sequential_tests_lists, @@ -816,6 +824,12 @@ if __name__ == '__main__': app_starter_local = AppStarter(None, config) client_url = app_starter_local.start_app() + if config.DEBUG: + print('pgAdmin is launched with DEBUG=True, ' + 'hence sleeping for 50 seconds.', + file=sys.stderr) + time.sleep(50) + # Running Parallel tests if len(parallel_tests) > 0: parallel_sessions = \ ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Feature Test Fix @ 2021-04-14 06:43 Akshay Joshi <[email protected]> parent: Yogesh Mahajan <[email protected]> 0 siblings, 0 replies; 8+ messages in thread From: Akshay Joshi @ 2021-04-14 06:43 UTC (permalink / raw) To: Yogesh Mahajan <[email protected]>; +Cc: pgadmin-hackers Thanks, patch applied. On Tue, Apr 13, 2021 at 7:36 PM Yogesh Mahajan < [email protected]> wrote: > Hi, > > Please find the attached patch which handles the long time taken to launch > pgAdmin in debug mode. > Feature tests were failing as pgAdmin was tried to reach before it > completed initialization.Currently if pgAdmin is launched with Debug=True, > then on jenkins job its taking 70+ seconds for completing initialisation. > > > Thanks, > Yogesh Mahajan > EnterpriseDB > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Principal Software Architect* *EDB Postgres <http://edbpostgres.com>* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 8+ messages in thread
* [Patch] - Feature Test Fix @ 2022-03-07 10:02 Yogesh Mahajan <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Yogesh Mahajan @ 2022-03-07 10:02 UTC (permalink / raw) To: pgadmin-hackers Hi, Please find the attached patch which fixes the feature test failures. Thanks, Yogesh Mahajan EnterpriseDB Attachments: [application/octet-stream] Feature_Test_Fix_React_Porting_v1.patch (2.2K, 3-Feature_Test_Fix_React_Porting_v1.patch) download | inline diff: diff --git a/web/pgadmin/feature_tests/file_manager_test.py b/web/pgadmin/feature_tests/file_manager_test.py index 83a927a81..63eaa699d 100644 --- a/web/pgadmin/feature_tests/file_manager_test.py +++ b/web/pgadmin/feature_tests/file_manager_test.py @@ -76,7 +76,7 @@ class CheckFileManagerFeatureTest(BaseFeatureTest): self.page.find_by_css_selector(QueryToolLocators.btn_save_file) \ .click() # Set the XSS value in input - WebDriverWait(self.driver, 10).until(EC.presence_of_element_located( + WebDriverWait(self.driver, 15).until(EC.presence_of_element_located( (By.CSS_SELECTOR, ".change_file_types"))) self.page.find_by_css_selector('.change_file_types') self.page.fill_input_by_css_selector( diff --git a/web/pgadmin/feature_tests/pg_utilities_maintenance_test.py b/web/pgadmin/feature_tests/pg_utilities_maintenance_test.py index fd497ea0d..6f40fbc8a 100644 --- a/web/pgadmin/feature_tests/pg_utilities_maintenance_test.py +++ b/web/pgadmin/feature_tests/pg_utilities_maintenance_test.py @@ -82,7 +82,7 @@ class PGUtilitiesMaintenanceFeatureTest(BaseFeatureTest): self.page.click_modal('OK', True) self.page.wait_for_element_to_disappear( lambda driver: driver.find_element( - By.XPATH, NavMenuLocators.maintenance_operation)) + By.XPATH, NavMenuLocators.maintenance_operation), 10) # Wait for the backup status alertfier self.wait.until(EC.visibility_of_element_located( diff --git a/web/pgadmin/feature_tests/xss_checks_pgadmin_debugger_test.py b/web/pgadmin/feature_tests/xss_checks_pgadmin_debugger_test.py index 998c6d8a5..3f54a23c3 100644 --- a/web/pgadmin/feature_tests/xss_checks_pgadmin_debugger_test.py +++ b/web/pgadmin/feature_tests/xss_checks_pgadmin_debugger_test.py @@ -78,7 +78,7 @@ class CheckDebuggerForXssFeatureTest(BaseFeatureTest): try: wait = WebDriverWait(self.page.driver, 2) is_error = wait.until(EC.presence_of_element_located( - (By.XPATH, "//div[@class ='MuiDialogTitle-root']" + (By.XPATH, "//div[contains(@class,'MuiDialogTitle-root')]" "//div[text()='Debugger Error']") )) ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [Patch] - Feature Test Fix @ 2022-03-07 10:11 Akshay Joshi <[email protected]> parent: Yogesh Mahajan <[email protected]> 0 siblings, 0 replies; 8+ messages in thread From: Akshay Joshi @ 2022-03-07 10:11 UTC (permalink / raw) To: Yogesh Mahajan <[email protected]>; +Cc: pgadmin-hackers Thanks, the patch applied. On Mon, Mar 7, 2022 at 3:33 PM Yogesh Mahajan < [email protected]> wrote: > Hi, > > Please find the attached patch which fixes the feature test failures. > Thanks, > Yogesh Mahajan > EnterpriseDB > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Principal Software Architect* *EDB Postgres <http://edbpostgres.com>* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2022-03-07 10:11 UTC | newest] Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-04-01 06:36 Feature Test Fix Yogesh Mahajan <[email protected]> 2021-04-01 06:49 ` Akshay Joshi <[email protected]> 2021-04-01 06:57 ` Yogesh Mahajan <[email protected]> 2021-04-01 07:37 ` Akshay Joshi <[email protected]> 2021-04-13 14:05 Feature Test Fix Yogesh Mahajan <[email protected]> 2021-04-14 06:43 ` Akshay Joshi <[email protected]> 2022-03-07 10:02 [Patch] - Feature Test Fix Yogesh Mahajan <[email protected]> 2022-03-07 10:11 ` Re: [Patch] - Feature Test Fix Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox