Skip to content

Commit 5f093bb

Browse files
committed
annotated test
1 parent 057a032 commit 5f093bb

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

tests/e2e-playwright/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def pytest_runtest_makereport(item: pytest.Item, call):
188188

189189

190190
@pytest.hookimpl(tryfirst=True)
191-
def pytest_configure(config):
191+
def pytest_configure(config: pytest.Config):
192192
config.pluginmanager.register(pytest_runtest_setup, "osparc_test_times_plugin")
193193
config.pluginmanager.register(pytest_runtest_makereport, "osparc_makereport_plugin")
194194

tests/e2e-playwright/tests/platform_CI_tests/test_platform.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
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
89
from pathlib import Path
910

1011
import 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
1922
def 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

6873
def 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

Comments
 (0)