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 1fXPRh-0007Pz-St for pgadmin-hackers@arkaria.postgresql.org; Mon, 25 Jun 2018 11:14:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fXPRe-0005TH-LT for pgadmin-hackers@arkaria.postgresql.org; Mon, 25 Jun 2018 11:14:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fXPRe-0005TA-CM for pgadmin-hackers@lists.postgresql.org; Mon, 25 Jun 2018 11:14:06 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fXPRa-0000N9-Ke for pgadmin-hackers@postgresql.org; Mon, 25 Jun 2018 11:14:05 +0000 Received: by mail-wm0-x22d.google.com with SMTP id x6-v6so8763359wmc.3 for ; Mon, 25 Jun 2018 04:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Qoe6+9m69nk498RA9us9Ubc28O0KDNkI5Wkf4v+zDP4=; b=taNSQ9BP1cr85KIjbfYALtFFJ12wS84p0GmAPgGqLyuF32+6edb7XzfXY2D1C8ONJ8 Ip5LdrcPEYou6gqe1yjUG6KFi9R84gLRcPgezJrdM/HOtbqj10+4M8W4GaW0A7eWWL94 CLcvCNohILPWU338WEzOJj59R82OuAIvvDMN1s5PgDJ8z8Pjke4StKQlwI8Gu61hYrIj a+GIHJ9PRd251eTwPbUGNXkjNcvk/XFmHnDryWsAImG3RUxdQMcngrR7FdCg0ta6SS+p ulzgFry/Nmq1URBQgkFnPd5P9waG05wzqNv/e9zaI3HcTEQ/KFJ5cQ9K/lFvu3ufzywj 1hhw== 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=Qoe6+9m69nk498RA9us9Ubc28O0KDNkI5Wkf4v+zDP4=; b=BZnFRjgWG83NQZYUwtRWvHX04eGpegPfVrCQqXiCXdcedY59Stv4rjpMYkARX6e7sZ cm2Unu/icpP/eryZIY0qoDI77svBNhcAgZC5z0m0dKCT8olQsLxPppq8kHruinoAgH7E yOAn14VbQAIW0g+Md7NLhWc0BnZh3ShGDmjy7ZoP3X0eTV8vXkFwznh3u2da82vgQjM6 tkePUatVsbIy1fKbenTH/Nos6eBbJfqVkUjVmXZBqQHlMhpf4EMAgCkfkLFWfAGYXfCL OKMMSBpI2qPd5ZufivVGkGxYJV8OUqvkd5GouOKBL/nwbWiB4gFJ0KedhkcubKsWhRu+ 9T5g== X-Gm-Message-State: APt69E0RauyBD87yppkXMFezI+d6Wbe6kqDhHmi1j9Zdu0vE8JuQQfb4 YS1IKd42wtgOMHJxZ3bqXPRJYqEcubvUEqF60bFvQg== X-Google-Smtp-Source: AAOMgpd4eT+OSt7EMlGMaBCA4YymXaQio3L49z8E+Y2o+Fqg/Oh/VHC9tWYjTu1KoEXr06PqsO2TPWyj3CRCoaUcvW0= X-Received: by 2002:a1c:3ac6:: with SMTP id h189-v6mr721267wma.64.1529925240480; Mon, 25 Jun 2018 04:14:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:2907:0:0:0:0:0 with HTTP; Mon, 25 Jun 2018 04:13:59 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 25 Jun 2018 12:13:59 +0100 Message-ID: Subject: Re: [pgadmin4][Patch]: Feature #3273 Add ability to sort in the Select File window when opening a saved query To: Akshay Joshi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000007dfaff056f757aa6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000007dfaff056f757aa6 Content-Type: text/plain; charset="UTF-8" Hi On Fri, Jun 22, 2018 at 6:39 AM, Akshay Joshi 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 -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --0000000000007dfaff056f757aa6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Fri, Jun 22, 2018 at 6:39 AM, Akshay Joshi <<= a href=3D"mailto:akshay.joshi@enterprisedb.com" target=3D"_blank">akshay.jo= shi@enterprisedb.com> wrote:


On Thu, Jun 21, 2018 at 11:57 PM, Dave Page <dpage@pgadmin.org> 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 <dpage@pgadmin.org> wrot= e:
Hi

On Wed, Jun 20, 2018 at 3:13 P= M, 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.<= /span>

I haven't seen any refactoring possibility, patch= contains feature test with time.sleep(0.05). I have spend lot of ti= me to not introduce "time.sleep()" and tried couple of different = ways of WebDriveWait, but didn't get success.=C2=A0

Please review it.

=
I get the following running the feature tests:

invalid syntax= (xss_checks_file_manager_test.py, line 60)

make: *** [che= ck-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
=

<= div class=3D"gmail_extra">I'm seeing the following failure pretty consi= stently:

=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_manag= er_test.CheckFileManagerFeatureTest)

File manager feature test

------------------------------------------------= ----------------------

Traceback (most recent call last):

=C2= =A0 File "/Users/dpage/git/pgadmin4/web/regression/feature_util= s/base_feature_test.py", line 66, in tearDown

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

=C2= =A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/f= ile_manager_test.py", line 48, in after

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

=C2= =A0 File "/Users/dpage/git/pgadmin4/web/regression/feature_util= s/pgadmin_page.py", line 104, in close_query_tool

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

=C2= =A0 File "/Users/dpage/git/pgadmin4/web/regression/feature_util= s/pgadmin_page.py", line 171, in find_by_xpath

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

=C2= =A0 File "/Users/dpage/git/pgadmin4/web/regression/feature_util= s/pgadmin_page.py", line 263, in wait_for_element

=C2= =A0 =C2=A0 return self._wait_for("element to exist", eleme= nt_if_it_exists)

=C2= =A0 File "/Users/dpage/git/pgadmin4/web/regression/feature_util= s/pgadmin_page.py", line 337, in _wait_for

=C2= =A0 =C2=A0 "Timed out waiting for " + waiting_for_message<= /span>

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

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

selenium.common.exceptions.TimeoutException: Mes= sage: Timed out waiting for element to exist



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsna= ke

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Co= mpany
--0000000000007dfaff056f757aa6--