Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goU3u-0007Hx-GH for pgadmin-hackers@arkaria.postgresql.org; Tue, 29 Jan 2019 14:08:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goU3t-0000mI-6o for pgadmin-hackers@arkaria.postgresql.org; Tue, 29 Jan 2019 14:08:25 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1goU3s-0000mB-U7 for pgadmin-hackers@lists.postgresql.org; Tue, 29 Jan 2019 14:08:25 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goU3n-0005A7-RR for pgadmin-hackers@postgresql.org; Tue, 29 Jan 2019 14:08:24 +0000 Received: by mail-qt1-x843.google.com with SMTP id v11so22325099qtc.2 for ; Tue, 29 Jan 2019 06:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mMdusMlU6Y0G7nPaiXYck34eiQCN+k8fuzSnAg9GrG0=; b=w7TcU5+nOX/h20Z/WLGsmXYQqC+NTrO29UNtH97Mv+2nPqwSfOcCbi6JN7PWnLLmJP Q2alvEB3+2EW2EQD8tfmkemjEHSDZ+lkrGBK2KI+h4mVO+Iom2zMIG1IDE2K/k6OLV/j FhIz2DSOM4dmvG7t0qdrBD6AU6Owa+DMvk4PpLMaocIRcSchL7IKQtcDPz/kAGULihn4 MwpZ5Fe3gdGNGDamY7EFzDFdYyUtjB5UiKF320Gbo0L55afRShEpeEkFWqSMsZ8P6EXf NTzCHon5FfosMotNpPKWqGE43/gt2hT26cuy5OAfymHVtlENXj461d16SGV3bG4gBzDu cekw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mMdusMlU6Y0G7nPaiXYck34eiQCN+k8fuzSnAg9GrG0=; b=lFyxkOjxUMc3jWq+U6JX7Ntwhyf0uXrDtz+3qz+r4n4MPyUmLoadz2B9/bp6Km3j94 8euEylzBd4XmPYon9MBY6VLn2JipgaBehnyz0XGSKuWxK0o20rxDMg+DH1Gjen8sGDMl xAvByazQLHr3CD4s46/PcjU+1CtHavfngAkFTmnZwIpa1uqgXLDjME+1bV8XgiqLBBmI oStF2OzTnyTnH+iqW4Cn2p53nePB2fFygY1bH0hWq6GUYTwDskfp+GOom0CR2P8Bh8dj +Go+ExN5dhjvAoESkX2jvFX12Mfjz68qbpAW4WXN8JgHpGWX0orCfdNss6wijJOvB+1/ sBJw== X-Gm-Message-State: AJcUukeFM01l3xF5TXYb76V65uLwbmfgMTv0LjKZ1jrK+tutw3nQe6/p a6y1KCaKxCXULaFST36BWfM3KJAI8U2VBgXH5TFchQ== X-Google-Smtp-Source: ALg8bN4DEp4E4ArXw/9HGoI0mKrDG4OoKl563TLnx8uNwYrYXJiDHTytT4pGg1K1bOG0X/OBRekj9/vkfHcvQAGLbhM= X-Received: by 2002:a0c:8a29:: with SMTP id 38mr24089418qvt.222.1548770896883; Tue, 29 Jan 2019 06:08:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Tue, 29 Jan 2019 19:38:05 +0530 Message-ID: Subject: Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases To: Dave Page Cc: Aditya Toshniwal , pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000025ca0c058099530e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000025ca0c058099530e Content-Type: text/plain; charset="UTF-8" On Tue, 29 Jan 2019, 19:09 Dave Page Akshay, can you look at this please? > Sure. > > On Tue, Jan 29, 2019 at 1:36 PM Aditya Toshniwal > wrote: > > > > Hi Hackers, > > > > Attached is the updated patch. I have changed fill_input_by_field_name > function to use javascript to set values of text boxes and the selector is > changed from xpath to CSS with a :not(:disabled) clause. With this, test > case will fail if tried to set the value of a disabled input. > > > > Kindly review. > > > > > > On Mon, Jan 28, 2019 at 5:44 PM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> > >> > >> > >> On Mon, Jan 28, 2019 at 5:39 PM Dave Page wrote: > >>> > >>> On Mon, Jan 28, 2019 at 12:05 PM Aditya Toshniwal > >>> wrote: > >>> > > >>> > Hi Dave, > >>> > > >>> > On Mon, Jan 28, 2019 at 5:01 PM Dave Page wrote: > >>> >> > >>> >> Hi > >>> >> > >>> >> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal > >>> >> wrote: > >>> >> > > >>> >> > Hi Hackers, > >>> >> > > >>> >> > Attached is the patch to fix failing SQL editor related feature > tests. > >>> >> > The failure is occurring mostly because of send_keys function of > selenium which sometimes does not input the complete text. The change will > use Codemirror javascript object to set the text. > >>> >> > > >>> >> > I have also added new args flag "--modules" which can be used > after --pkg where you can test a specific module file under the pkg. This > is not so useful for build but definitely helpful for the developers. > >>> >> > >>> >> One of the most common failures I see is failure to fill in the > >>> >> details on the Add Server dialogue (it might type half of an entry, > >>> >> then just hang). Should we get rid of all uses of send_keys? > >>> > > >>> > Setting the text using javascript executor can be done. send_keys > simulate an actual person, so if you try to set a disabled text box using > send_keys, it won't. Places where disabled fields doesn't matter, send_keys > can be removed. > >>> > >>> Can't we just do something like: > >>> > >>> if input.disabled == false: > >>> input.value = 'Foo'; > >>> else: > >>> raise exception .... > >> > >> I'll check if this can be done. Will get back. > >>> > >>> > >>> -- > >>> Dave Page > >>> Blog: http://pgsnake.blogspot.com > >>> Twitter: @pgsnake > >>> > >>> EnterpriseDB UK: http://www.enterprisedb.com > >>> The Enterprise PostgreSQL Company > >> > >> > >> > >> -- > >> Thanks and Regards, > >> Aditya Toshniwal > >> Software Engineer | EnterpriseDB Software Solutions | Pune > >> "Don't Complain about Heat, Plant a tree" > > > > > > > > -- > > Thanks and Regards, > > Aditya Toshniwal > > Software Engineer | EnterpriseDB Software Solutions | Pune > > "Don't Complain about Heat, Plant a tree" > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --00000000000025ca0c058099530e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


= On Tue, 29 Jan 2019, 19:09 Dave Page <dpage@pgadmin.org wrote:
Aks= hay, can you look at this please?

=C2=A0 =C2=A0 Sure.

On Tue, Jan 29, 2019 at 1:36 PM Aditya Toshniwal
<aditya.toshniwal@enterprisedb.com> wrote:
>
> Hi Hackers,
>
> Attached is the updated patch. I have changed fill_input_by_field_name= function to use javascript to set values of text boxes and the selector is= changed from xpath to CSS with a :not(:disabled) clause. With this, test c= ase will fail if tried to set the value of a disabled input.
>
> Kindly review.
>
>
> On Mon, Jan 28, 2019 at 5:44 PM Aditya Toshniwal <ad= itya.toshniwal@enterprisedb.com> wrote:
>>
>>
>>
>> On Mon, Jan 28, 2019 at 5:39 PM Dave Page <dpage@pgadmin.org= > wrote:
>>>
>>> On Mon, Jan 28, 2019 at 12:05 PM Aditya Toshniwal
>>> <aditya.toshniwal@enterprisedb.com> w= rote:
>>> >
>>> > Hi Dave,
>>> >
>>> > On Mon, Jan 28, 2019 at 5:01 PM Dave Page <dpage@pgadmi= n.org> wrote:
>>> >>
>>> >> Hi
>>> >>
>>> >> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal
>>> >> <aditya.toshniwal@enterprisedb.com<= /a>> wrote:
>>> >> >
>>> >> > Hi Hackers,
>>> >> >
>>> >> > Attached is the patch to fix failing SQL editor = related feature tests.
>>> >> > The failure is occurring mostly because of send_= keys function of selenium which sometimes does not input the complete text.= The change will use Codemirror javascript object to set the text.
>>> >> >
>>> >> > I have also added new args flag "--modules&= quot; which can be used after --pkg where you can test a specific module fi= le under the pkg. This is not so useful for build but definitely helpful fo= r the developers.
>>> >>
>>> >> One of the most common failures I see is failure to f= ill in the
>>> >> details on the Add Server dialogue (it might type hal= f of an entry,
>>> >> then just hang). Should we get rid of all uses of sen= d_keys?
>>> >
>>> > Setting the text using javascript executor can be done. s= end_keys simulate an actual person,=C2=A0 so if you try to set a disabled t= ext box using send_keys, it won't. Places where disabled fields doesn&#= 39;t matter, send_keys can be removed.
>>>
>>> Can't we just do something like:
>>>
>>> if input.disabled =3D=3D false:
>>>=C2=A0 =C2=A0input.value =3D 'Foo';
>>> else:
>>>=C2=A0 =C2=A0raise exception ....
>>
>> I'll check if this can be done. Will get back.
>>>
>>>
>>> --
>>> Dave Page
>>> Blog:
http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>
>>
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> Software Engineer | EnterpriseDB Software Solutions | Pune
>> "Don't Complain about Heat, Plant a tree"
>
>
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"



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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--00000000000025ca0c058099530e--