⏱️ Duration: 26.24s
❌ Error:
self = <tests.test_web_general.TestWebPhase1 object at 0x7f9e2f93f040>
login_page = <pages.login_page.LoginPage object at 0x7f9e2fbf39d0>
my_account_page = <pages.my_account_page.MyAccountPage object at 0x7f9e2f946ce0>
base_url = 'https://promo.com'
def test_w22_verify_password_changes(
self, login_page, my_account_page, base_url
):
"""
W22 Verify password changes
Uses a dedicated account (email_pass_change) to avoid disrupting main
test accounts. Flow:
1. Login → change password to random_password
2. Sign out → login with random_password (should succeed)
3. Change password back to original
4. Sign out → try to login with random_password (should fail)
"""
original_password = get_password()
page = login_page.page
# Step 1: Change password to random_password
login_page.login_directly(base_url, email_pass_change, original_password)
my_account_page.change_password(
current_pass=original_password,
new_pass=random_password,
)
# Step 2: Sign out, then verify login works with new password
> login_page.sign_out()
tests/test_web_general.py:161:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/login_page.py:180: in sign_out
self.page.locator(self.SIGN_OUT_BTN).first.click()
/usr/local/lib/python3.10/dist-packages/playwright/sync_api/_generated.py:17876: in click
self._sync(
/usr/local/lib/python3.10/dist-packages/playwright/_impl/_locator.py:165: in click
return await self._frame._click(self._selector, strict=True, **params)
/usr/local/lib/python3.10/dist-packages/playwright/_impl/_frame.py:593: in _click
await self._channel.send("click", self._timeout, locals_to_params(locals()))
/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py:76: in send
return await self._connection.wrap_api_call(
_ _ _ _ _ _ _ _ _ _ _
📸 Failure Screenshot:
⏱️ Duration: 92.70s
❌ Error:
self = <tests.test_web_general.TestWebPhase1 object at 0x7f9e2f93d240>
main_page = <pages.main_page.MainPage object at 0x7f9e2dc47520>
@pytest.mark.skip_testenv
@pytest.mark.skip_smoke
@pytest.mark.skip_sanity
def test_w26_promo_performance_tests(self, main_page):
"""
W26 Promo Performance Tests
Navigates to key prod URLs and asserts that server response and DOM
processing times are within acceptable limits.
"""
> main_page.check_performance(_PERF_URLS)
tests/test_web_general.py:206:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pages.main_page.MainPage object at 0x7f9e2dc47520>
urls = ['https://promo.com/login', 'https://promo.com/tools/calendar/march', 'https://promo.com/templates', 'https://promo.com/go/base-lp-no-search', 'https://promo.com/go/base-lp-with-search']
def check_performance(self, urls: list):
for url in urls:
server_avg, dom_avg = self.measure_page_performance(url)
print(f"{url}: server={server_avg}s, DOM={dom_avg}s")
> assert server_avg <= 3, f"Server response too slow for {url}: {server_avg}s"
E AssertionError: Server response too slow for https://promo.com/tools/calendar/march: 3.19s
pages/main_page.py:265: AssertionError
📸 Failure Screenshot: