mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-23 23:13:38 -06:00
e89c54c15d
- don't spin up app and chromedriver between each test - catching signals also tears down the app - do layout reset between tests, but assume that tests will not leave a modal opened. Use selenium built-in waiting function and fix flakiness around clicking the alertify OK button - we think the OK button does not have its event bound when it is created. If you see more flakiness around clicking the alertify OK button, let us know. The element is clickable but we have to arbitrarily wait for the event to be bound and that timing may vary system to system. The feature tests are about 7 seconds faster now. Tira & Joao
23 lines
863 B
Python
23 lines
863 B
Python
import config as app_config
|
|
from pgadmin.utils.route import BaseTestGenerator
|
|
from regression.feature_utils.pgadmin_page import PgadminPage
|
|
|
|
|
|
class BaseFeatureTest(BaseTestGenerator):
|
|
def setUp(self):
|
|
if app_config.SERVER_MODE:
|
|
self.skipTest("Currently, config is set to start pgadmin in server mode. "
|
|
"This test doesn't know username and password so doesn't work in server mode")
|
|
|
|
self.page = PgadminPage(self.driver, app_config)
|
|
self.page.wait_for_app()
|
|
self.page.wait_for_spinner_to_disappear()
|
|
self.page.reset_layout()
|
|
self.page.wait_for_spinner_to_disappear()
|
|
|
|
def failureException(self, *args, **kwargs):
|
|
self.page.driver.save_screenshot('/tmp/feature_test_failure.png')
|
|
return AssertionError(*args, **kwargs)
|
|
|
|
def runTest(self):
|
|
pass |