⏱️ Duration: 9.61s
❌ Error:
self = <tests.test_active_stock.TestActiveStock object at 0x7fd9c1d859f0>
page = <Page url='https://promo.com/active-cast/generate?imageId=2124945686&imageSource=shutterstock&imageTitle=Self+portrait...lf-portrait-beautiful-young-afro-600nw-2124945686.jpg&term=happy&searchType=category&searchTerm=happy&searchRatio=all'>
base_url = 'https://promo.com'
@pytest.mark.skip_smoke
def test_as04_generate_page_controls_after_image_activation(self, page: Page, base_url: str) -> None:
"""Logged-in user activates an image from the create grid and verifies all generator controls are visible."""
login_page = LoginPage(page)
login_page.login_directly(base_url, general_mail(), get_password())
login_page.assert_logged_in_as(fullname)
active_stock = ActiveStockPage(page)
active_stock.navigate_to_create(base_url)
active_stock.assert_grid_has_at_least_20_items()
active_stock.hover_second_item_and_assert_activate_btn()
> active_stock.activate_image_and_assert_generate_page()
tests/test_active_stock.py:79:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pages.active_stock_page.ActiveStockPage object at 0x7fd9c10cb130>
def activate_image_and_assert_generate_page(self) -> None:
"""Clicks activate-image, then asserts URL, all generator controls visible, and crop/link controls absent."""
with self.page.expect_navigation(timeout=self.T_NETWORK):
self.page.locator(self.ACTIVATE_IMAGE_BTN).first.click(force=True)
# "networkidle" never resolves on this page (continuous analytics/chat-widget
# traffic), so rely on domcontentloaded plus the action-based waits below.
self.page.wait_for_load_state("domcontentloaded")
> assert "/active-stock/generate?imageId=" in self.page.url, (
f"Expected URL to contain '/active-stock/generate?imageId=', got: {self.page.url}"
)
E AssertionError: Expect
📸 Failure Screenshot: