Skip to content

Commit

Permalink
Static tests fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirPodolian committed Jan 28, 2025
1 parent 6e80ac9 commit c40756f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/static_tests/unit/test_selector_synchronizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
("button", "button", By.CSS_SELECTOR, "css=button"),
("tbody tr td span", "tbody tr td span", By.CSS_SELECTOR, "css=tbody tr td span"),
("textarea", "textarea", By.CSS_SELECTOR, "css=textarea"),
("Some text", '//*[contains(text(), "Some text")]', By.XPATH, "xpath=Some text"),
("Some text", '//*[contains(text(), "Some text")]', By.XPATH, 'xpath=//*[contains(text(), "Some text")]'),
("[href='/some/url']", "[href='/some/url']", By.CSS_SELECTOR, "css=[href='/some/url']"),
],
)
def test_set_selenium_selector(locator_input, expected_locator, expected_locator_type, expected_log_locator):
mock_obj = SimpleNamespace()
mock_obj.locator = locator_input
set_selenium_selector(mock_obj)
assert mock_obj.locator == expected_locator
assert mock_obj.log_locator == expected_log_locator
assert expected_locator == mock_obj.locator
assert expected_log_locator == mock_obj.log_locator


@pytest.mark.parametrize(
Expand All @@ -49,6 +49,6 @@ def test_set_playwright_locator(locator_input, expected_locator):
mock_obj = SimpleNamespace()
mock_obj.locator = locator_input
set_playwright_locator(mock_obj)
assert mock_obj.locator == expected_locator
assert mock_obj.log_locator == expected_locator
assert mock_obj.locator_type == expected_locator.partition('=')[0]
assert expected_locator == mock_obj.locator
assert expected_locator == mock_obj.log_locator
assert expected_locator.partition('=')[0] == mock_obj.locator_type

0 comments on commit c40756f

Please sign in to comment.