Thread: [pgadmin4][Patch]: Feature #3273 Add ability to sort in the SelectFile window when opening a saved query
[pgadmin4][Patch]: Feature #3273 Add ability to sort in the SelectFile window when opening a saved query

Mobile: +91 976-788-8246
Attachment
Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in theSelect File window when opening a saved query
Hi Hackers,Attached is the patch for Feature #3273 Add ability to sort in the Select File window when opening a saved query.I haven't seen any refactoring possibility, patch contains feature test with time.sleep(0.05). I have spend lot of time to not introduce "time.sleep()" and tried couple of different ways of WebDriveWait, but didn't get success.Please review it.
invalid syntax (xss_checks_file_manager_test.py, line 60)
make: *** [check-feature] Error 1
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in theSelect File window when opening a saved query
HiOn Wed, Jun 20, 2018 at 3:13 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Attached is the patch for Feature #3273 Add ability to sort in the Select File window when opening a saved query.I haven't seen any refactoring possibility, patch contains feature test with time.sleep(0.05). I have spend lot of time to not introduce "time.sleep()" and tried couple of different ways of WebDriveWait, but didn't get success.Please review it.I get the following running the feature tests:invalid syntax (xss_checks_file_manager_test.
py, line 60) make: *** [check-feature] Error 1
Also; should that file be renamed now, to reflect that it tests more than just XSS?
--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Mobile: +91 976-788-8246
Attachment
Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in theSelect File window when opening a saved query
On Thu, Jun 21, 2018 at 6:20 AM, Dave Page <dpage@pgadmin.org> wrote:HiOn Wed, Jun 20, 2018 at 3:13 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Attached is the patch for Feature #3273 Add ability to sort in the Select File window when opening a saved query.I haven't seen any refactoring possibility, patch contains feature test with time.sleep(0.05). I have spend lot of time to not introduce "time.sleep()" and tried couple of different ways of WebDriveWait, but didn't get success.Please review it.I get the following running the feature tests:invalid syntax (xss_checks_file_manager_test.
py, line 60) make: *** [check-feature] Error 1
Fixed.Also; should that file be renamed now, to reflect that it tests more than just XSS?Done. Attached is the modified patch.
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in theSelect File window when opening a saved query
HiOn Thu, Jun 21, 2018 at 6:27 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: On Thu, Jun 21, 2018 at 6:20 AM, Dave Page <dpage@pgadmin.org> wrote:HiOn Wed, Jun 20, 2018 at 3:13 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Attached is the patch for Feature #3273 Add ability to sort in the Select File window when opening a saved query.I haven't seen any refactoring possibility, patch contains feature test with time.sleep(0.05). I have spend lot of time to not introduce "time.sleep()" and tried couple of different ways of WebDriveWait, but didn't get success.Please review it.I get the following running the feature tests:invalid syntax (xss_checks_file_manager_test.
py, line 60) make: *** [check-feature] Error 1
Fixed.Also; should that file be renamed now, to reflect that it tests more than just XSS?Done. Attached is the modified patch.This seems to work for the most part, however, when sorting on the Modified column, it is sorting alphabetically, not by date. This doesn't seem like it's what users would expect.
--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Mobile: +91 976-788-8246
Attachment
Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in theSelect File window when opening a saved query
On Thu, Jun 21, 2018 at 11:57 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Thu, Jun 21, 2018 at 6:27 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: On Thu, Jun 21, 2018 at 6:20 AM, Dave Page <dpage@pgadmin.org> wrote:HiOn Wed, Jun 20, 2018 at 3:13 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Attached is the patch for Feature #3273 Add ability to sort in the Select File window when opening a saved query.I haven't seen any refactoring possibility, patch contains feature test with time.sleep(0.05). I have spend lot of time to not introduce "time.sleep()" and tried couple of different ways of WebDriveWait, but didn't get success.Please review it.I get the following running the feature tests:invalid syntax (xss_checks_file_manager_test.
py, line 60) make: *** [check-feature] Error 1
Fixed.Also; should that file be renamed now, to reflect that it tests more than just XSS?Done. Attached is the modified patch.This seems to work for the most part, however, when sorting on the Modified column, it is sorting alphabetically, not by date. This doesn't seem like it's what users would expect.Attached is the modified patch with the above fix.
======================================================================
ERROR: runTest (pgadmin.feature_tests.file_manager_test.CheckFileManagerFeatureTest)
File manager feature test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_test.py", line 66, in tearDown
self.after()
File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/file_manager_test.py", line 48, in after
self.page.close_query_tool('sql', False)
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 104, in close_query_tool
"//li[contains(@class, 'context-menu-item')]/span[contains(text(),"
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 171, in find_by_xpath
lambda driver: driver.find_element_by_xpath(xpath)
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 263, in wait_for_element
return self._wait_for("element to exist", element_if_it_exists)
File "/Users/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.py", line 337, in _wait_for
"Timed out waiting for " + waiting_for_message
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-packages/selenium/webdriver/support/wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: Timed out waiting for element to exist
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in theSelect File window when opening a saved query
HiOn Fri, Jun 22, 2018 at 6:39 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: On Thu, Jun 21, 2018 at 11:57 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Thu, Jun 21, 2018 at 6:27 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: On Thu, Jun 21, 2018 at 6:20 AM, Dave Page <dpage@pgadmin.org> wrote:HiOn Wed, Jun 20, 2018 at 3:13 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Attached is the patch for Feature #3273 Add ability to sort in the Select File window when opening a saved query.I haven't seen any refactoring possibility, patch contains feature test with time.sleep(0.05). I have spend lot of time to not introduce "time.sleep()" and tried couple of different ways of WebDriveWait, but didn't get success.Please review it.I get the following running the feature tests:invalid syntax (xss_checks_file_manager_test.
py, line 60) make: *** [check-feature] Error 1
Fixed.Also; should that file be renamed now, to reflect that it tests more than just XSS?Done. Attached is the modified patch.This seems to work for the most part, however, when sorting on the Modified column, it is sorting alphabetically, not by date. This doesn't seem like it's what users would expect.Attached is the modified patch with the above fix.I'm seeing the following failure pretty consistently:==============================
============================== ========== ERROR: runTest (pgadmin.feature_tests.file_
manager_test. CheckFileManagerFeatureTest) File manager feature test
------------------------------
------------------------------ ---------- Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/
web/regression/feature_utils/ base_feature_test.py", line 66, in tearDown self.after()
File "/Users/dpage/git/pgadmin4/
web/pgadmin/feature_tests/ file_manager_test.py", line 48, in after self.page.close_query_tool('
sql', False) File "/Users/dpage/git/pgadmin4/
web/regression/feature_utils/ pgadmin_page.py", line 104, in close_query_tool "//li[contains(@class, 'context-menu-item')]/span[
contains(text()," File "/Users/dpage/git/pgadmin4/
web/regression/feature_utils/ pgadmin_page.py", line 171, in find_by_xpath lambda driver: driver.find_element_by_xpath(
xpath) File "/Users/dpage/git/pgadmin4/
web/regression/feature_utils/ pgadmin_page.py", line 263, in wait_for_element return self._wait_for("element to exist", element_if_it_exists)
File "/Users/dpage/git/pgadmin4/
web/regression/feature_utils/ pgadmin_page.py", line 337, in _wait_for "Timed out waiting for " + waiting_for_message
File "/Users/dpage/.virtualenvs/
pgadmin4/lib/python3.6/site- packages/selenium/webdriver/ support/wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.
TimeoutException: Message: Timed out waiting for element to exist
--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Mobile: +91 976-788-8246
Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in theSelect File window when opening a saved query
On Mon, Jun 25, 2018 at 4:43 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Fri, Jun 22, 2018 at 6:39 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: On Thu, Jun 21, 2018 at 11:57 PM, Dave Page <dpage@pgadmin.org> wrote:HiOn Thu, Jun 21, 2018 at 6:27 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: On Thu, Jun 21, 2018 at 6:20 AM, Dave Page <dpage@pgadmin.org> wrote:HiOn Wed, Jun 20, 2018 at 3:13 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Attached is the patch for Feature #3273 Add ability to sort in the Select File window when opening a saved query.I haven't seen any refactoring possibility, patch contains feature test with time.sleep(0.05). I have spend lot of time to not introduce "time.sleep()" and tried couple of different ways of WebDriveWait, but didn't get success.Please review it.I get the following running the feature tests:invalid syntax (xss_checks_file_manager_test.
py, line 60) make: *** [check-feature] Error 1
Fixed.Also; should that file be renamed now, to reflect that it tests more than just XSS?Done. Attached is the modified patch.This seems to work for the most part, however, when sorting on the Modified column, it is sorting alphabetically, not by date. This doesn't seem like it's what users would expect.Attached is the modified patch with the above fix.I'm seeing the following failure pretty consistently:==============================
============================== ========== ERROR: runTest (pgadmin.feature_tests.file_ma
nager_test.CheckFileManagerFea tureTest) File manager feature test
------------------------------
------------------------------ ---------- Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web
/regression/feature_utils/base _feature_test.py", line 66, in tearDown self.after()
File "/Users/dpage/git/pgadmin4/web
/pgadmin/feature_tests/file_ manager_test.py", line 48, in after self.page.close_query_tool('sq
l', False) File "/Users/dpage/git/pgadmin4/web
/regression/feature_utils/pgad min_page.py", line 104, in close_query_tool "//li[contains(@class, 'context-menu-item')]/span[con
tains(text()," File "/Users/dpage/git/pgadmin4/web
/regression/feature_utils/pgad min_page.py", line 171, in find_by_xpath lambda driver: driver.find_element_by_xpath(x
path) File "/Users/dpage/git/pgadmin4/web
/regression/feature_utils/pgad min_page.py", line 263, in wait_for_element return self._wait_for("element to exist", element_if_it_exists)
File "/Users/dpage/git/pgadmin4/web
/regression/feature_utils/pgad min_page.py", line 337, in _wait_for "Timed out waiting for " + waiting_for_message
File "/Users/dpage/.virtualenvs/pga
dmin4/lib/python3.6/site-packa ges/selenium/webdriver/support /wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.Tim
eoutException: Message: Timed out waiting for element to exist It's a Timed out issue and I haven't faced this on my machine. As per above traceback it is failing on "self.page.close_query_tool()" which is not the part of this patch and not reproducible either on my machine.
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company