⏱️ Duration: 300.77s
❌ Error:
self = <tests.test_web_general.TestWebPhase1 object at 0x7f7b32e54400>
main_page = <pages.main_page.MainPage object at 0x7f7b32e54730>
@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:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/main_page.py:263: in check_performance
server_avg, dom_avg = self.measure_page_performance(url)
pages/main_page.py:256: in measure_page_performance
round(statistics.mean(server_times), 2),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = []
def mean(data):
"""Return the sample arithmetic mean of data.
>>> mean([1, 2, 3, 4, 4])
2.8
>>> from fractions import Fraction as F
>>> mean([F(3, 7), F(1, 21), F(5, 3), F(1, 3)])
Fraction(13, 21)
>>> from decimal import Decimal as D
>>> mean([D("0.5"), D("0.75"), D("0.625"), D("0.375")])
Decimal('0.5625')
If ``data`` is empty, StatisticsError will be raised.
"""
if iter(data) is data:
data = list(data)
n = len(data)
if n < 1:
> raise StatisticsError('mean requires at least one data point')
E statistics.StatisticsError: mean requires at least one data point
/usr/lib/python3.10/statistics.py:328: StatisticsError
📸 Failure Screenshot:
⏱️ Duration: 41.07s
❌ Error:
self = <tests.test_web_general.TestWebPhase1 object at 0x7f7b32e54040>
login_page = <pages.login_page.LoginPage object at 0x7f7b32e7c0a0>
main_page = <pages.main_page.MainPage object at 0x7f7b32e7e740>
pricing_page = <pages.pricing_page.PricingPage object at 0x7f7b32e7c8e0>
base_url = 'https://promo.com'
def test_w27_verify_header_for_logged_and_not_logged(
self, login_page, main_page, pricing_page, base_url
):
"""
W27 Verify header for logged and not logged
Pricing and PromoAI nav links should appear for guests and disappear
once the user is authenticated.
"""
page = login_page.page
# Unauthenticated: links should be present
main_page.go_to_homepage(base_url)
login_page.skip_cookies()
main_page.verify_header_links_visible()
page.goto(f"{base_url}/pricing")
page.wait_for_load_state("domcontentloaded")
main_page.verify_header_links_visible()
# Log in
login_page.login_directly(base_url, general_mail(), get_password())
# Authenticated: links should be gone
page.goto(f"{base_url}/create")
page.wait_for_load_state("domcontentloaded")
main_page.verify_header_links_not_visible()
> page.goto(f"{base_url}/templates")
tests/test_web_general.py:235:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.10/dist-packages/playwright/sync_api/_generated.py:9875: in goto
self._sync(
/usr/local/lib/python3.10/dist-packages/playwright/_impl/_page.py:560: in goto
return await self._main_frame.goto(**locals_to_params(locals()))
/usr/local/lib/python3.10/dist-packages/playwright/_impl/_frame.py:156: in goto
await self._channel.send(
/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py:76: in send
return await self._connection.wrap_api_call(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
📸 Failure Screenshot: