mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow feature tests to run in Chrome headless mode.
This commit is contained in:
parent
f0b6fb0e5d
commit
59d8f6fb84
@ -41,7 +41,6 @@ class AppStarter:
|
|||||||
env=env
|
env=env
|
||||||
)
|
)
|
||||||
|
|
||||||
self.driver.set_window_size(1280, 1024)
|
|
||||||
self.driver.get(
|
self.driver.get(
|
||||||
"http://" + self.app_config.DEFAULT_SERVER + ":" +
|
"http://" + self.app_config.DEFAULT_SERVER + ":" +
|
||||||
random_server_port
|
random_server_port
|
||||||
|
@ -21,6 +21,7 @@ import traceback
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
|
from selenium.webdriver.chrome.options import Options
|
||||||
|
|
||||||
if sys.version_info < (2, 7):
|
if sys.version_info < (2, 7):
|
||||||
import unittest2 as unit_test
|
import unittest2 as unit_test
|
||||||
@ -180,7 +181,13 @@ def get_test_modules(arguments):
|
|||||||
exclude_pkgs += arguments['exclude'].split(',')
|
exclude_pkgs += arguments['exclude'].split(',')
|
||||||
|
|
||||||
if 'feature_tests' not in exclude_pkgs:
|
if 'feature_tests' not in exclude_pkgs:
|
||||||
driver = webdriver.Chrome()
|
options = Options()
|
||||||
|
if test_setup.config_data:
|
||||||
|
if 'headless_chrome' in test_setup.config_data:
|
||||||
|
if test_setup.config_data['headless_chrome']:
|
||||||
|
options.add_argument("--headless")
|
||||||
|
options.add_argument("--window-size=1280x1024")
|
||||||
|
driver = webdriver.Chrome(chrome_options=options)
|
||||||
app_starter = AppStarter(driver, config)
|
app_starter = AppStarter(driver, config)
|
||||||
app_starter.start_app()
|
app_starter.start_app()
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"headless_chrome": false,
|
||||||
"pgAdmin4_login_credentials": {
|
"pgAdmin4_login_credentials": {
|
||||||
"new_password": "NEWPASSWORD",
|
"new_password": "NEWPASSWORD",
|
||||||
"login_password": "PASSWORD",
|
"login_password": "PASSWORD",
|
||||||
|
Loading…
Reference in New Issue
Block a user