Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fXPao-00082B-SL for pgadmin-hackers@arkaria.postgresql.org; Mon, 25 Jun 2018 11:23:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fXPam-00063Z-VM for pgadmin-hackers@arkaria.postgresql.org; Mon, 25 Jun 2018 11:23:32 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fXPam-00063S-Ds for pgadmin-hackers@lists.postgresql.org; Mon, 25 Jun 2018 11:23:32 +0000 Received: from mail-pg0-x233.google.com ([2607:f8b0:400e:c05::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fXPai-0005Ox-I7 for pgadmin-hackers@postgresql.org; Mon, 25 Jun 2018 11:23:30 +0000 Received: by mail-pg0-x233.google.com with SMTP id q14-v6so2155566pgt.13 for ; Mon, 25 Jun 2018 04:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VlZK+FgyotuQyr/LI9MYycUnClJhjuz3qWqbxP2pAKM=; b=yfCn4iYoXXIb7jbdmgi49zApyF0Ohejeg8Kte+boxY1zuCD2i/zw37Awws5vo1HvHN q/RD8d5IJMUUPLHNMbTFFE8ZcM2J29Zaa0WNLoWZJSYyCPt41uxm/WH7YHp3tsdvcYBz hDKNoUHYMusg/Z3KCgUtlIlTk8i7agM7FEfS7q+2QEyCI9MGdEhtVVEGGh4Rz2pSuRQK HPbFrnknZz17z4bX0T5S4q4Km1DGLK3uZOtxa6G+I4Q5tiDy+0i+OmjkY8y6GkkeELnI axOs1KLAfZmkTTuG11P03130b4zBSJoxas+lDZHoKQVD2z7yMU04bJrUPbUzwjw7V3z1 sUGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VlZK+FgyotuQyr/LI9MYycUnClJhjuz3qWqbxP2pAKM=; b=EANIQ0cw29ROs2GdArq4olTwPCmmdBZlVaPr4LTd/3wMNiPAGoKCehYCiIjsWitiRj P5xgiRlJemqZ3f1soZKLiESCGvgJR4mn/avXyHi5PXPEgyk8HXlUBe9CbRF7EG2OBEAH ZZCeTckDFO8EBvOARxUgErW+yQvkWPQOV/CZKa+C56bzbOffUekfLfDf3aHlqoJkJhnA VWmLacf5N7cWM2GkRCiwWOPhkOw3Qif020CpurhoTDcOZKoklcYdnntZt1bryTlNqyVF 8HUa1uLPwIeVR1kFdNqmXyxsznNmy1AEf46p0DG+yWNx1dfi1I3eUFmY9p27yt7wN8KN PhTA== X-Gm-Message-State: APt69E0qoxKXZ9Ejz56hkEUiJhsNFlbpNmLkHP+b7lf44JnilUgy/nH5 SjDffXfgkhh8wxgpeuCPZ0bKlvE3Q9g0n/EAHM3FpQ== X-Google-Smtp-Source: ADUXVKLZZn6cuxJB5yaGiyBdHmfCoM5E4mjVdUXBekkhPt3yYabESfjPgrziTkx+lcZW52BK345s4y12x/+WqX3RX3c= X-Received: by 2002:a62:1c43:: with SMTP id c64-v6mr12581497pfc.176.1529925806467; Mon, 25 Jun 2018 04:23:26 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:8c86:0:0:0:0 with HTTP; Mon, 25 Jun 2018 04:23:25 -0700 (PDT) In-Reply-To: References: From: Akshay Joshi Date: Mon, 25 Jun 2018 16:53:25 +0530 Message-ID: Subject: Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in the Select File window when opening a saved query To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000003a497b056f759ca9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000003a497b056f759ca9 Content-Type: text/plain; charset="UTF-8" On Mon, Jun 25, 2018 at 4:43 PM, Dave Page wrote: > Hi > > On 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 wrote: >> >>> Hi >>> >>> On 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 wrote: >>>> >>>>> Hi >>>>> >>>>> On 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 > > 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. > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- *Akshay Joshi* *Sr. Software Architect * *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* --0000000000003a497b056f759ca9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jun 25, 2018 at 4:43 PM, Dave Page <dpage@pgadmin.org><= /span> wrote:
Hi

On F= ri, Jun 22, 2018 at 6:39 AM, Akshay Joshi <akshay.joshi@enterp= risedb.com> wrote:


On Thu, Jun 21, 2018 at 11:57 PM, Dave Page <dpage@pgadmin.org> wro= te:
Hi

On Thu, Jun 21, 2018 at 6= :27 AM, Akshay Joshi <akshay.joshi@enterprisedb.com&g= t; wrote:


On Thu, Jun 21= , 2018 at 6:20 AM, Dave Page <dpage@pgadmin.org> wrote:
Hi
On 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 abilit= y to sort in the Select File window when opening a saved query.

I haven't seen any refactoring possibility, patch contains fea= ture test with time.sleep(0.05). I have spend lot of time to not int= roduce "time.sleep()" and tried couple of different ways of WebDriveW= ait, but didn't get success.=C2=A0

Please review it.

I get the following running the feature tests:

<= /div>

invalid syntax (xss_checks_file_manager_test.py, line 60)

make: *** [check-feature] Error 1


=C2=A0 =C2= =A0Fixed.
=C2=A0
=
Also; should that file be renamed now, to reflect that it tests more = than just XSS?=C2=A0

=C2=A0 =C2=A0 Done. Attached is the modified patch.=C2=A0

This seems to work f= or the most part, however, when sorting on the Modified column, it is sorti= ng alphabetically, not by date. This doesn't seem like it's what us= ers would expect.=C2=A0

=
=C2=A0 =C2=A0 Attached is the modified patch with the above fix= .=C2=A0

I'm seeing the following failure pretty consisten= tly:

=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

ERROR:= runTest (pgadmin.feature_tests.file_manager_test.CheckFileManage= rFeatureTest)

File m= anager feature test

------= ----------------------------------------------------------------<= /span>

Traceb= ack (most recent call last):

=C2=A0 Fi= le "/Users/dpage/git/pgadmin4/web/regression/feature_utils/b= ase_feature_test.py", line 66, in tearDown

=C2=A0 =C2=A0 self.after()

=C2=A0 Fi= le "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/file= _manager_test.py", line 48, in after

=C2=A0 =C2=A0 self.page.close_query_tool('sql', False)

=C2=A0 Fi= le "/Users/dpage/git/pgadmin4/web/regression/feature_utils/p= gadmin_page.py", line 104, in close_query_tool

=C2=A0 =C2=A0 "//li[contains(@class, 'context-menu-item')]/span[co= ntains(text(),"

=C2=A0 Fi= le "/Users/dpage/git/pgadmin4/web/regression/feature_utils/p= gadmin_page.py", line 171, in find_by_xpath

=C2=A0 =C2=A0 lambda driver: driver.find_element_by_xpath(xpath)

=C2=A0 Fi= le "/Users/dpage/git/pgadmin4/web/regression/feature_utils/p= gadmin_page.py", line 263, in wait_for_element

=C2=A0 =C2=A0 return self._wait_for("element to exist", element_if_it_exis= ts)

=C2=A0 Fi= le "/Users/dpage/git/pgadmin4/web/regression/feature_utils/p= gadmin_page.py", line 337, in _wait_for

=C2=A0 =C2=A0 "Timed out waiting for " + waiting_for_message

=C2=A0 Fi= le "/Users/dpage/.virtualenvs/pgadmin4/lib/python3.6/site-pa= ckages/selenium/webdriver/support/wait.py", line 80, in until

=C2=A0 =C2=A0 raise TimeoutException(message, screen, stacktrace)

seleni= um.common.exceptions.TimeoutException: Message: Timed out waiting for = element to exist



=C2=A0 =C2=A0It'= s a Timed out issue and I haven't faced this on my machine. As per abov= e 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.= =C2=A0 =C2=A0=C2=A0
=

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twit= ter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Post= greSQL Company



--
Akshay Joshi
Sr. Software Architect
=

<= /font>

Phone: +91 20-3058-9517
Mob= ile: +91 976-788-8246
--0000000000003a497b056f759ca9--