Skip to content

Commit

Permalink
Fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
M1troll committed May 16, 2024
1 parent 8c1e2e8 commit b8fe554
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 47 deletions.
28 changes: 5 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,26 @@ The package includes next base classes to create Page Object Model (``POM``) pag

```mermaid
classDiagram
WebView .. Element
WebView <|-- Component
WebView <|-- Page
Component <|-- ListComponent
Element --> WebView
Element --> Locator
Component --> Locator
ListComponent --> Locator
Element .. Locator
Component .. Locator
Page .. Component
class WebView{
-webdriver: Webdriver
-app_root: Url
-wait_timeout: int
-wait: WebDriverWait
}
class Page{
-is_loaded: bool
+open()
}
class Component{
-page: Page
-base_locator: Locator
+ wait_until_visible()
+ wait_until_invisible()
}
class ListComponent{
-item_class: Component
-item_locator: Locator
-count: int
-all: list[Component]
+get_item_by_text()
}
class Locator{
-query: String
}
class Element{
-web_view: WebView
-locator: Locator
}
```

It also includes [classes to locate elements](https://pomcorn.readthedocs.io/en/latest/locators.html) on the web page and a number of additional [waiting conditions](https://pomcorn.readthedocs.io/en/latest/waits_conditions.html>).
Expand Down
27 changes: 4 additions & 23 deletions docs/objects_hierarchy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,20 @@ Pomcorn includes next object hierarchy for Page Object Model (``POM``) page crea
.. mermaid::

classDiagram
WebView .. Element
WebView <|-- Component
WebView <|-- Page
Component <|-- ListComponent
Element --> WebView
Element --> Locator
Component --> Locator
ListComponent --> Locator
Element .. Locator
Component .. Locator
Page .. Component
class WebView{
-webdriver: Webdriver
-app_root: Url
-wait_timeout: int
-wait: WebDriverWait
}
class Page{
-is_loaded: bool
+open()
}
class Component{
-page: Page
-base_locator: Locator
+ wait_until_visible()
+ wait_until_invisible()
}
class ListComponent{
-item_class: Component
-item_locator: Locator
-count: int
-all: list[Component]
+get_item_by_text()
}
class Locator{
-query: String
}
class Element{
-web_view: WebView
Expand Down
2 changes: 1 addition & 1 deletion invocations/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def clear(context: invoke.Context):


@invoke.task
def run_host(context: invoke.Context, host: int = 8000):
def serve(context: invoke.Context, host: int = 8000):
"""Run built docs on localhost."""
print_success("Run docs on localhost")
context.run(f"python -m http.server {host} " f"-d {LOCAL_DOCS_DIR}")
Expand Down

0 comments on commit b8fe554

Please sign in to comment.