⏱️ Duration: 7.19s
❌ Error:
self = <tests.test_active_stock.TestActiveStock object at 0x7f1395939f90>
page = <Page url='https://promo.com/active-stock/create'>
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."""
LoginPage(page).login_directly(base_url, general_mail(), get_password())
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:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pages.active_stock_page.ActiveStockPage object at 0x7f139593b370>
def activate_image_and_assert_generate_page(self) -> None:
"""Clicks activate-image, then asserts URL, all generator controls visible, and crop/link controls absent."""
self.page.locator(self.ACTIVATE_IMAGE_BTN).first.click(force=True)
self.page.wait_for_load_state("networkidle", timeout=self.T_NETWORK)
> assert "/active-stock/generate?imageId=" in self.page.url, (
f"Expected URL to contain '/active-stock/generate?imageId=', got: {self.page.url}"
)
E AssertionError: Expected URL to contain '/active-stock/generate?imageId=', got: https://promo.com/active-stock/create
pages/active_stock_page.py:145: AssertionError
📸 Failure Screenshot: