Re: Acceptance Tests against a browser (WIP)

From: Dave Page <dpage(at)pgadmin(dot)org>
To: George Gelashvili <ggelashvili(at)pivotal(dot)io>
Cc: Atira Odhner <aodhner(at)pivotal(dot)io>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Acceptance Tests against a browser (WIP)
Date: 2017-01-20 15:38:21
Message-ID: CA+OCxox0OKK-xKg9rXraQVd+W1Ld0x85RJBmSbmiEyBQ84F_Pg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Thu, Jan 19, 2017 at 11:15 PM, George Gelashvili
<ggelashvili(at)pivotal(dot)io> wrote:
> Here's an updated patch which polls to wait for the app to start instead of
> sleeping for 10 seconds.

I see the browser opening now, and it immediately loads pgAdmin. Then,
it prompts me for a reload whenever the test is run, which fails no
matter how quickly I hit the prompt from what I can see:

======================================================================
ERROR: runTest (pgadmin.acceptance.tests.test_connects_to_database.ConnectsToDatabase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/test_connects_to_database.py",
line 41, in setUp
self._wait_for_app()
File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/test_connects_to_database.py",
line 109, in _wait_for_app
self.__wait_for("app to start", page_shows_app)
File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/test_connects_to_database.py",
line 117, in __wait_for
result = condition_met_function()
File "/Users/dpage/git/pgadmin4/web/pgadmin/acceptance/tests/test_connects_to_database.py",
line 107, in page_shows_app
return self.driver.title == config.APP_NAME
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 257, in title
resp = self.execute(Command.GET_TITLE)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",
line 236, in execute
self.error_handler.check_response(response)
File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py",
line 192, in check_response
raise exception_class(message, screen, stacktrace)
UnexpectedAlertPresentException: Alert Text: None
Message: unexpected alert open: {Alert text : Are you sure you wish to
close the pgAdmin 4 browser?}
(Session info: chrome=55.0.2883.95)
(Driver info: chromedriver=2.27.440174
(e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Mac OS X 10.12.1
x86_64)

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

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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-01-20 15:38:55 Re: Acceptance Tests against a browser (WIP)
Previous Message Dave Page 2017-01-20 15:30:28 Re: [Patch] Python 3 compatibility