Skip to content

Commit 074c701

Browse files
Merge pull request #1 from Vamshi-Microsoft/vk-deploy-st
Merge Smoke Testing into Main
2 parents 1e3269f + 80f1c08 commit 074c701

6 files changed

Lines changed: 906 additions & 66 deletions

File tree

tests/e2e-test/base/base.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
1+
"""
2+
Base page module providing common functionality for all page objects.
3+
"""
4+
5+
16
class BasePage:
7+
"""Base class for all page objects with common methods."""
8+
29
def __init__(self, page):
10+
"""
11+
Initialize the BasePage with a Playwright page instance.
12+
13+
Args:
14+
page: Playwright page object
15+
"""
316
self.page = page
417

518
def scroll_into_view(self, locator):
19+
"""
20+
Scroll the last element matching the locator into view.
21+
22+
Args:
23+
locator: Playwright locator object
24+
"""
625
reference_list = locator
726
locator.nth(reference_list.count() - 1).scroll_into_view_if_needed()
827

928
def is_visible(self, locator):
10-
locator.is_visible()
29+
"""
30+
Check if an element is visible on the page.
31+
32+
Args:
33+
locator: Playwright locator object
34+
35+
Returns:
36+
bool: True if visible, False otherwise
37+
"""
38+
return locator.is_visible()

tests/e2e-test/config/constants.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
"""
2+
Configuration constants module for test environment settings.
3+
"""
4+
15
import os
26

37
from dotenv import load_dotenv
48

59
load_dotenv()
610
URL = os.getenv("url")
7-
if URL.endswith("/"):
11+
if URL and URL.endswith("/"):
812
URL = URL[:-1]

0 commit comments

Comments
 (0)