Re: [pgadmin-hackers] [pgAdmin4][Patch][RM_2400]: Columns withdefaults set to NULL when removing contents after pasting in the edit grid

Поиск
Список
Период
Сортировка
От Surinder Kumar
Тема Re: [pgadmin-hackers] [pgAdmin4][Patch][RM_2400]: Columns withdefaults set to NULL when removing contents after pasting in the edit grid
Дата
Msg-id CAM5-9D-WhtWQr+5ZOsv6twB1i52aJdV0m=qxCJv6f47CmK0Q4g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [pgadmin-hackers] [pgAdmin4][Patch][RM_2400]: Columns with defaults set to NULL when removing contents after pasting in the edit grid  (Dave Page <dpage@pgadmin.org>)
Ответы Re: [pgadmin-hackers] [pgAdmin4][Patch][RM_2400]: Columns withdefaults set to NULL when removing contents after pasting in the edit grid  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-hackers
Hi Dave,

Please find updated patch with following changes:

1) Locate grid row by div's style attribute 'top'(i.e. 'top:0px' for first row), instead of by div class-name because the order of rendered rows is not always same.

2) Increase the wait timeout of WebDriverWait to 5 seconds in '_compare_cell_value(...)' method.

3) Add a new utils method 'find_by_css_selector' in pgadmin_page.py to locate css element with wait_for method.

4) Add a new utils method 'wait_for_element_to_stale' in pgadmin_page.py. It is useful when "StaleElementReferenceException" exception is raised and element is not attached to the page while finding element by xpath.

5) Instead of finding each cell value by xpath and compare with actual value, now a row is located using xpath and all of cell values are extracted into an array and then compared with actual values. It eliminates the use of wait_timeout.

Also, I added a print statement for debugging where a TimeoutException was occurred last time.


On Sun, May 28, 2017 at 1:58 AM, Dave Page <dpage@pgadmin.org> wrote:
Here's the screenshot.

On Sat, May 27, 2017 at 4:26 PM, Dave Page <dpage@pgadmin.org> wrote:
> Hi
>
> On Sat, May 27, 2017 at 4:03 PM, Surinder Kumar
> <surinder.kumar@enterprisedb.com> wrote:
>> Hi Dave
>>
>> Please find update Feature test cases patch.
>>
>> On Sun, May 28, 2017 at 12:40 AM, Dave Page <dpage@pgadmin.org> wrote:
>>>
>>> Thanks - I committed the code changes, as they seem to work very well.
>>> The regression tests are failing for me though :-(. Can you take
>>> another look please? Note that I'm running under Python 2.7 on Mal
>>
>> Actually i used the generic close_query_tool method to close view data panel
>> which popup with unsaved changes. but in my case nothing popups as there as
>> no unsaved changes, so clicking on [x] button close the panel. So I write
>> close_data_grid method in pgadmin_page.py file.
>
> It passed with PG 9.4, but then failed (twice) under 9.6:
>
> ======================================================================
> ERROR: runTest (pgadmin.feature_tests.view_data_dml_queries.CheckForViewDataTest)
> Validate Insert, Update operations in View data with given test data
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
> line 105, in runTest
>     self._copy_paste_row()
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
> line 250, in _copy_paste_row
>     self._verify_row_data(False)
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
> line 275, in _verify_row_data
>     self._compare_cell_value(cell_xpath, config_data[str(idx)][1])
>   File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/view_data_dml_queries.py",
> line 142, in _compare_cell_value
>     CheckForViewDataTest.TIMEOUT_STRING
>   File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/support/wait.py",
> line 80, in until
>     raise TimeoutException(message, screen, stacktrace)
> TimeoutException: Message: Timed out waiting for div element to appear
>
>
> ----------------------------------------------------------------------
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



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

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

Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Murtuza Zabuawala
Дата:
Сообщение: [pgadmin-hackers] [pgAdmin4][PATCH] Display Security Labels in SQL (PPAS9.2+)
Следующее
От: Surinder Kumar
Дата:
Сообщение: Re: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React