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 1fXRkj-0000Sf-4A for pgadmin-hackers@arkaria.postgresql.org; Mon, 25 Jun 2018 13:41:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fXRkh-0006lL-G8 for pgadmin-hackers@arkaria.postgresql.org; Mon, 25 Jun 2018 13:41:55 +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 1fXRkh-0006lE-AJ for pgadmin-hackers@lists.postgresql.org; Mon, 25 Jun 2018 13:41:55 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fXRkd-0003ZX-6q for pgadmin-hackers@postgresql.org; Mon, 25 Jun 2018 13:41:54 +0000 Received: by mail-wr0-x243.google.com with SMTP id p12-v6so12107773wrn.11 for ; Mon, 25 Jun 2018 06:41:51 -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=O/6Ft1RYA55Kr6jdW1WBZY5jFs8yy1QzeygyN+I8LDY=; b=G04uyVmXncKRDFvuhxGZUL85YQshFaRwcCbfBSYDE84bSOy7j/zKzvQC1QsIR5Qxrf YEGF4xfciO9ywkUcK1d6iGcKq1/MLKGtj4JH55IMIsQB54cU5c/9qQnZRpWMuoR8+o4C 0GZj05u2mYIt8w0FCbWBhOe0eglCTFONi+5Ff6DI0Uo2RyEdeptrFXjYdVpq9pQyK2MD o/z8d/H3E9TXN/j/52Pv6qmV+zcJ9rLV/UIgOGeRUscfVuTq7mNj0qgz01aG51G4ExHZ l6DbdWRs/KBG7xiWWry2m6h1ekFPzOByWztYSBFLq5GiKyYQl5uRa8fLv4ZZXCdqYtM0 armA== 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=O/6Ft1RYA55Kr6jdW1WBZY5jFs8yy1QzeygyN+I8LDY=; b=S2lhH4PxQ8Ogdlzofi6bL9pZTE5XQtwzT2OreMkesomMgHSzS09QzHte8pGdcPDldT 697hkHRTi+EW18uMdpSuREBzZffLZenKVUg3DWkKxuFrM++tNhQNt16uGD/fJaVSyLM3 RY54fnFsayHe8j2ppyz3FF/b46RwO2axyoo0QYsSVMahGf2yM3s2ESXlYVGAfz5o4OSw h3J9KuxZ3GAnv5V/1FjOf0QP4AgjsFnK6TOASCbfboFEFFql/Ef8iSCJTlWVKcU4/E2I FxzbjhZm6wQwndCIz/k21XEb7XDRyiX3OEiXu60wqS4G29VvhlgntVfgUBTx2Pih2YVj y0mg== X-Gm-Message-State: APt69E3dKaym4YF06EWXKs/sOj0noIvvIA2upahFT8alwXEPCAuS9yHl qMNsIxyZXb1/0KR3Il7TK0tf4bJN9YJzjXY949r8og== X-Google-Smtp-Source: AAOMgpe8S9fT31bYvTW2/uLwNtBYWqkW0qmeWAxfA+Q6wB4P1ACq2jQBEgjOQ8WuiIeU+hQPCA6hN2un2jbb8q6VI3A= X-Received: by 2002:adf:e590:: with SMTP id l16-v6mr9511091wrm.190.1529934110535; Mon, 25 Jun 2018 06:41:50 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:2907:0:0:0:0:0 with HTTP; Mon, 25 Jun 2018 06:41:49 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Mon, 25 Jun 2018 14:41:49 +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="000000000000304552056f778bbd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000304552056f778bbd Content-Type: text/plain; charset="UTF-8" On Mon, Jun 25, 2018 at 12:23 PM, Akshay Joshi < akshay.joshi@enterprisedb.com> wrote: > > > 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_ma >> nager_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-packa >> ges/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. > True. I've pushed the patch, and will setup a call to figure out how to resolve these issues as they are becoming a real pain. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --000000000000304552056f778bbd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Jun 25, 2018 at 12:23 PM, Akshay Joshi <akshay.jos= hi@enterprisedb.com> wrote:




=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.f= ile_manager_test.CheckFileManagerFeatureTest)

File manager feature test

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

Traceback (most recent call last):

=C2=A0 File "/Us= ers/dpage/git/pgadmin4/web/regression/feature_utils/base_feature_= test.py", line 66, in tearDown

=C2=A0 =C2=A0 self.af= ter()

=C2=A0 File "/Us= ers/dpage/git/pgadmin4/web/pgadmin/feature_tests/file_manager_tes= t.py", line 48, in after

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

=C2=A0 File "/Us= ers/dpage/git/pgadmin4/web/regression/feature_utils/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 "/Us= ers/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.= py", line 171, in find_by_xpath

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

=C2=A0 File "/Us= ers/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.= py", line 263, in wait_for_element

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

=C2=A0 File "/Us= ers/dpage/git/pgadmin4/web/regression/feature_utils/pgadmin_page.= py", line 337, in _wait_for

=C2=A0 =C2=A0 "T= imed out waiting for " + waiting_for_message

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

=C2=A0 =C2=A0 raise T= imeoutException(message, screen, stacktrace)

selenium.common.exceptions.Timeout= Exception: Message: Timed out waiting for element to exist



=C2=A0--
Dave Page
Blog:
http://pgsnake.blogspot.com
Twitter: @pgsnake=

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Compan= y
--000000000000304552056f778bbd--