public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dave Page <[email protected]>
To: Aditya Toshniwal <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases
Date: Mon, 28 Jan 2019 12:08:58 +0000
Message-ID: <CA+OCxowUyiAP7rrV1nttj4kpKUednObSkVYoEbhtMvqb0CV8Ng@mail.gmail.com> (raw)
In-Reply-To: <CAM9w-_n=7XEuFW+Vzi+xQgiXoJRdHu5-RrPS1QNwP7Ew9v6qdQ@mail.gmail.com>
References: <CAM9w-_mx9D_W-H3x3HGq_pEcBiT7V65TWrW1B+Vin_VPXp=vEw@mail.gmail.com>
	<CA+OCxozDzm8EpLTux7-C=wy3XZSpUHdCxFKo=9dv+eWKsbJD5A@mail.gmail.com>
	<CAM9w-_n=7XEuFW+Vzi+xQgiXoJRdHu5-RrPS1QNwP7Ew9v6qdQ@mail.gmail.com>

On Mon, Jan 28, 2019 at 12:05 PM Aditya Toshniwal
<[email protected]> wrote:
>
> Hi Dave,
>
> On Mon, Jan 28, 2019 at 5:01 PM Dave Page <[email protected]> wrote:
>>
>> Hi
>>
>> On Mon, Jan 28, 2019 at 7:00 AM Aditya Toshniwal
>> <[email protected]> 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 ....

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

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




view thread (15+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgAdmin4][RM3936] Feature tests failing intermittently for SQL editor related test cases
  In-Reply-To: <CA+OCxowUyiAP7rrV1nttj4kpKUednObSkVYoEbhtMvqb0CV8Ng@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox