1+ # pylint: disable=no-name-in-module
12# pylint: disable=redefined-outer-name
2- # pylint: disable=unused-argument
3- # pylint: disable=unused-variable
43# pylint: disable=too-many-arguments
54# pylint: disable=too-many-statements
6- # pylint: disable=no-name-in-module
5+ # pylint: disable=unused-argument
6+ # pylint: disable=unused-variable
77
8+ from collections .abc import Iterable
89from pathlib import Path
910
1011import pytest
12+ from playwright .sync_api ._generated import BrowserContext , Playwright
13+ from pydantic import AnyUrl
1114
1215
1316@pytest .fixture (scope = "session" )
@@ -17,11 +20,11 @@ def store_browser_context() -> bool:
1720
1821@pytest .fixture
1922def logged_in_context (
20- playwright ,
23+ playwright : Playwright ,
2124 store_browser_context : bool ,
2225 request : pytest .FixtureRequest ,
23- pytestconfig ,
24- ):
26+ pytestconfig : pytest . Config ,
27+ ) -> Iterable [ BrowserContext ] :
2528 is_headed = "--headed" in pytestconfig .invocation_params .args
2629
2730 file_path = Path ("state.json" )
@@ -36,7 +39,7 @@ def logged_in_context(
3639
3740
3841@pytest .fixture (scope = "module" )
39- def test_module_teardown ():
42+ def test_module_teardown () -> Iterable [ None ] :
4043
4144 yield # Run the tests
4245
@@ -45,7 +48,9 @@ def test_module_teardown():
4548 file_path .unlink ()
4649
4750
48- def test_simple_folder_workflow (logged_in_context , product_url , test_module_teardown ):
51+ def test_simple_folder_workflow (
52+ logged_in_context : BrowserContext , product_url : AnyUrl , test_module_teardown : None
53+ ):
4954 page = logged_in_context .new_page ()
5055
5156 page .goto (f"{ product_url } " )
@@ -66,7 +71,7 @@ def test_simple_folder_workflow(logged_in_context, product_url, test_module_tear
6671
6772
6873def test_simple_workspace_workflow (
69- logged_in_context , product_url , test_module_teardown
74+ logged_in_context : BrowserContext , product_url : AnyUrl , test_module_teardown : None
7075):
7176 page = logged_in_context .new_page ()
7277
0 commit comments