add-resume (#12)
* add functionality to --resume flag. latest test will resume by running failed tests again * fix nextcloud setup -> all tests passing * fix expect timeout by moving it to its own fixture Reviewed-on: local-it-infrastructure/e2e_tests#12 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
parent
0b4e0a0c16
commit
41a042f07d
6 changed files with 33 additions and 6 deletions
|
|
@ -23,6 +23,12 @@ def pytest_addoption(parser: Parser):
|
|||
parser.addoption("--timeout", action="store", type=int, default=20_000)
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def set_expect_timeout(request):
|
||||
TIMEOUT = request.config.getoption("--timeout")
|
||||
expect.set_options(timeout=TIMEOUT)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def context(context: BrowserContext, request) -> BrowserContext:
|
||||
# note: because this has the existing context fixture as an argument, it is ensured
|
||||
|
|
@ -33,7 +39,6 @@ def context(context: BrowserContext, request) -> BrowserContext:
|
|||
|
||||
context.set_default_timeout(TIMEOUT)
|
||||
context.set_extra_http_headers(LOCALE)
|
||||
expect.set_options(timeout=TIMEOUT)
|
||||
return context
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue