Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
mreiche committed Dec 14, 2024
1 parent f36b17c commit 8db07a8
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
description="Automation framework for the WebDriver API",
long_description=long_description,
long_description_content_type="text/markdown",
version="0.1.8",
version="0.1.9",
url="https://github.com/mreiche/python-automation-framework",
author="Mike Reiche",
packages=["paf"],
17 changes: 17 additions & 0 deletions test/test_component.py
Original file line number Diff line number Diff line change
@@ -33,6 +33,9 @@ class MyComponent(Component["MyComponent"]):
def type(self):
return self._find(By.id("input"))

def goto_page(self) -> ComponentsPage:
return self._create_page(ComponentsPage).open("https://testpages.herokuapp.com/styled/tag/dynamic-table.html")


class TableCell(Component["TableCell"]):
pass
@@ -103,5 +106,19 @@ def test_component_scrolling(components_page: ComponentsPage):
rows.last.expect.visible(False)


def test_cover_component_api(components_page: ComponentsPage):
component = components_page.custom_component.last
goto_page = component.goto_page()
assert isinstance(goto_page, ComponentsPage)

component.wait_for.displayed(True)

component_name = component.__str__()
assert len(component_name) > 0

path = component.take_screenshot("component.png")
assert path.exists()


def teardown_module():
inject.instance(WebDriverManager).shutdown_all()

0 comments on commit 8db07a8

Please sign in to comment.