public inbox for [email protected]
help / color / mirror / Atom feedFrom: Yogesh Mahajan <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: Feature Test Fix
Date: Thu, 1 Apr 2021 12:06:00 +0530
Message-ID: <CAMa=N=OBx_UVByU2=XmW_3RrhVQgaV1kkaq=Vz_E04y-Zt6uRQ@mail.gmail.com> (raw)
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)"
view thread (8+ 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: Feature Test Fix
In-Reply-To: <CAMa=N=OBx_UVByU2=XmW_3RrhVQgaV1kkaq=Vz_E04y-Zt6uRQ@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