Skip to content

Commit c755156

Browse files
author
rpobotin
committed
Refactor page object structure and add base components for Playwright tests
1 parent 21acebe commit c755156

30 files changed

+9609
-113
lines changed

html_reporter/report_handler.py

Lines changed: 764 additions & 0 deletions
Large diffs are not rendered by default.

html_reporter/report_template.html

Lines changed: 388 additions & 0 deletions
Large diffs are not rendered by default.

html_reporter/result_handler.py

Lines changed: 644 additions & 0 deletions
Large diffs are not rendered by default.

html_reporter/static/css/styles.css

Lines changed: 1846 additions & 0 deletions
Large diffs are not rendered by default.

html_reporter/static/js/report.js

Lines changed: 2705 additions & 0 deletions
Large diffs are not rendered by default.

html_reporter/test_report_handler.py

Lines changed: 1048 additions & 0 deletions
Large diffs are not rendered by default.

html_reporter/test_result_handler.py

Lines changed: 706 additions & 0 deletions
Large diffs are not rendered by default.

page_objects/base_page.py

Lines changed: 0 additions & 53 deletions
This file was deleted.

pages/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from functools import cached_property
2+
3+
from playwright.sync_api import Page
4+
5+
from pages.registation.registration_object import RegistrationPage
6+
from pages.shop.shop_object import ShopPage
7+
8+
9+
class Pages:
10+
"""
11+
Provides access to all pages and components, grouped by logical sections.
12+
"""
13+
14+
def __init__(self, page: Page):
15+
self.page = page
16+
17+
# Top-level pages
18+
@cached_property
19+
def shop_page(self) -> ShopPage:
20+
return ShopPage(self.page)
21+
22+
@cached_property
23+
def registration_page(self) -> RegistrationPage:
24+
return RegistrationPage(self.page)

0 commit comments

Comments
 (0)