add global timeout settings
This commit is contained in:
parent
636c39d557
commit
5d3743962f
1 changed files with 12 additions and 1 deletions
|
|
@ -9,11 +9,22 @@ from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from dotenv import dotenv_values
|
from dotenv import dotenv_values
|
||||||
|
from playwright.sync_api import BrowserContext, expect
|
||||||
from pytest import Parser
|
from pytest import Parser
|
||||||
|
|
||||||
from src.dirmanager import DirManager
|
from src.dirmanager import DirManager
|
||||||
|
|
||||||
TIMEOUT = 5000
|
# global timeout and LOCALE
|
||||||
|
LOCALE = {"Accept-Language": "de_DE"}
|
||||||
|
TIMEOUT = 10_000
|
||||||
|
expect.set_options(timeout=TIMEOUT)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def context(context: BrowserContext) -> BrowserContext:
|
||||||
|
context.set_default_timeout(TIMEOUT)
|
||||||
|
context.set_extra_http_headers(LOCALE)
|
||||||
|
return context
|
||||||
|
|
||||||
|
|
||||||
def pytest_addoption(parser: Parser):
|
def pytest_addoption(parser: Parser):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue