Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change browser_context_args back to session fixture #85

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pytest_playwright/pytest_playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _build_artifact_test_folder(
return os.path.join(output_dir, slugify(request.node.nodeid), folder_or_file_name)


@pytest.fixture()
@pytest.fixture(scope="session")
def browser_context_args(
pytestconfig: Any,
playwright: Playwright,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_browser_context_args(testdir: pytest.Testdir) -> None:
"""
import pytest

@pytest.fixture()
@pytest.fixture(scope="session")
def browser_context_args():
return {"user_agent": "foobar"}
"""
Expand Down Expand Up @@ -323,7 +323,7 @@ def test_browser_context_args_device(testdir: pytest.Testdir) -> None:
"""
import pytest

@pytest.fixture()
@pytest.fixture(scope="session")
def browser_context_args(browser_context_args, playwright):
iphone_11 = playwright.devices['iPhone 11 Pro']
return {**browser_context_args, **iphone_11}
Expand Down