Skip to content

Commit

Permalink
refactor: typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhikharevAl committed Nov 22, 2024
1 parent 9b5eee4 commit 12682f0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def test_login(self) -> None:
f"{BASE_URL}{MAIN_URL}"
), "URL does not match expected value"

self.main_page.login(self.data.USERNAME, self.data.PASSWORD) # type: ignore
self.main_page.login(self.data.USERNAME, self.data.PASSWORD)

assert self.main_page.expect_url(
f"{BASE_URL}{OVERVIEW_URL}"
), "Failed to redirect to overview page after login"

assert self.overview_page.is_logged_in, "User is not in logged-in state" # type: ignore
assert self.overview_page.is_logged_in, "User is not in logged-in state"
2 changes: 1 addition & 1 deletion tests/test_main_parabank.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ def test_home_page_loading(self) -> None:
assert self.main_page.expect_url(
f"{BASE_URL}{MAIN_URL}"
), "URL does not match expected value"
assert self.main_page.is_page_loaded, "Page content is not loaded correctly" # type: ignore
assert self.main_page.is_page_loaded, "Page content is not loaded correctly"
2 changes: 1 addition & 1 deletion tests/test_open_new_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_open_new_account(
)

self.open_new_account_page.select_account_type(account_type)
self.open_new_account_page.choose_an_existing_account() # type: ignore
self.open_new_account_page.choose_an_existing_account()
self.open_new_account_page.click_button_open_new_account()

assert (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TestRegistration(BaseTest):
def test_successful_registration(self, random_user_data: UserData) -> None:
"""Test successful user registration with valid data."""
self.register_page.navigate()
registration_success = self.register_page.register_new_user(random_user_data) # type: ignore
registration_success = self.register_page.register_new_user(random_user_data)
assert registration_success, "Registration was not successful"
assert (
self.register_page.is_registration_successful
Expand Down
4 changes: 2 additions & 2 deletions tests/test_transfer_funds.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ def test_transfer_funds(
assert self.transfer_page.expect_url(
f"{BASE_URL}{TRANSFER_FUNDS_URL}"
), "URL does not match expected value"
self.transfer_page.fill_amount(amount_data) # type: ignore
self.transfer_page.click_transfer() # type: ignore
self.transfer_page.fill_amount(amount_data)
self.transfer_page.click_transfer()
assert self.transfer_page.is_transfer_complete, "Transfer is not complete"
2 changes: 1 addition & 1 deletion tests/test_update_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ def test_update_profile(
assert self.update_profile_page.expect_url(
f"{BASE_URL}{UPDATE_PROFILE_URL}"
), "URL does not match expected value"
self.update_profile_page.update_profile(random_user_data) # type: ignore
self.update_profile_page.update_profile(random_user_data)
self.update_profile_page.click_update_button()
assert self.update_profile_page.is_updated, "Profile is not updated"

0 comments on commit 12682f0

Please sign in to comment.