44
55WEBDRIVER_INI_NAME = 'webdriver'
66BASE_ADDRESS_OPTION_NAME = 'base_address'
7+ FRONTEND_ADDRESS_OPTION_NAME = 'frontend_address'
78
89
910def pytest_addoption (parser ):
@@ -16,10 +17,16 @@ def pytest_addoption(parser):
1617 )
1718 parser .addoption (
1819 '--base-address' ,
19- default = 'http://localhost:4200 /' ,
20- help = 'specifies the base address where the application is running' ,
20+ default = 'http://localhost:8000 /' ,
21+ help = 'specifies the base address where the backend of the application is running' ,
2122 dest = BASE_ADDRESS_OPTION_NAME ,
2223 )
24+ parser .addoption (
25+ '--frontend-address' ,
26+ default = 'http://localhost:4200/' ,
27+ help = 'specifies the base address where the frontend of the application is running' ,
28+ dest = FRONTEND_ADDRESS_OPTION_NAME ,
29+ )
2330
2431
2532def pytest_generate_tests (metafunc ):
@@ -66,6 +73,12 @@ def browser(webdriver_instance):
6673def base_address (pytestconfig ):
6774 return pytestconfig .getoption (BASE_ADDRESS_OPTION_NAME )
6875
76+ @pytest .fixture (scope = 'session' )
77+ def frontend_address (pytestconfig ):
78+ return pytestconfig .getoption (FRONTEND_ADDRESS_OPTION_NAME )
79+
80+
81+
6982@pytest .fixture
7083def api_address (base_address ):
7184 return base_address + 'api/'
0 commit comments