Skip to content

Commit efacbe7

Browse files
committed
uv
1 parent 3d24b90 commit efacbe7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pages/login_page.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from dataclasses import dataclass
2+
from typing import Union
23

34
import allure
45
from playwright.sync_api import Page
@@ -18,7 +19,7 @@ def __init__(self, page: Page):
1819
self.error_message = page.get_by_test_id("error")
1920

2021
@allure.step("Login with username {username} and password {password}")
21-
def login(self, username: User | str, password: str):
22+
def login(self, username: Union[User, str], password: str):
2223
if hasattr(username, "value"):
2324
self.user_name_field.fill(username.value)
2425
else:

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def axe_playwright():
4848

4949

5050
@pytest.fixture(scope="function")
51-
def browser_context_args(browser_context_args: dict, base_url: str, request: SubRequest):
51+
def browser_context_args(browser_context_args: dict, base_url: str, request: SubRequest) -> dict:
5252
"""This fixture allows setting browser context arguments for Playwright.
5353
5454
Args:
@@ -86,7 +86,7 @@ def browser_context_args(browser_context_args: dict, base_url: str, request: Sub
8686

8787

8888
@pytest.fixture(scope="session")
89-
def browser_type_launch_args(browser_type_launch_args: dict, playwright: Playwright):
89+
def browser_type_launch_args(browser_type_launch_args: dict, playwright: Playwright) -> dict:
9090
"""Fixture to set browser launch arguments.
9191
9292
This fixture updates the browser launch arguments to start the browser maximized

0 commit comments

Comments
 (0)