⏱️ Duration: 35.93s
❌ Error:
self = <tests.test_chat_based_editor.TestChatBasedEditor object at 0x7f6d4b7303d0>
login_page = <pages.login_page.LoginPage object at 0x7f6d4a9ecd00>
autopilot_page = <pages.autopilot_page.AutopilotPage object at 0x7f6d4a755ae0>
base_url = 'https://promo.com', prompt_key = 'stock_photo'
@pytest.mark.skip_smoke
@pytest.mark.parametrize("prompt_key", [
"stock_video",
"stock_photo",
"uploaded_video",
"uploaded_photo",
])
def test_cbe03_replace_a_clip(
self, login_page, autopilot_page, base_url, prompt_key
):
"""
CBE03 Replace a clip
Login as AI user → open Planner → open the first AI post from #3
onward that still offers CBE → open CBE → send clip-replacement
prompt → verify media library → select first clip → verify discard
popup → save video.
Starts scanning at post #3 rather than assuming it's free: `email_ai`
is a shared/persistent prod account, and once a post is Rated its
chat/regenerate controls disappear from the UI permanently (verified
via DOM inspection) — a hardcoded index would fail deterministically
the moment that specific post gets rated by any run.
"""
login_page.login_directly(base_url, email_ai, get_password())
autopilot_page.go_to_planner(base_url)
autopilot_page.ensure_ai_posts_exist(min_count=3)
autopilot_page.open_first_ai_post_with_cbe(start=3, skip_voice_over=True)
autopilot_page.open_cbe()
autopilot_page.send_cbe_prompt_and_wait(CBE_PROMPTS[prompt_key])
> autopilot_page.select_cbe_clip()
tests/test_chat_based_editor.py:143:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pages/autopilot_page.py:1670: in select_cbe_clip
first_item.wait_for(state="visible", timeout=25_000)
/usr/local/lib/python3.10/dist-packages/playwright/sync_api/_generated.py:20539: in wait_for
self._sync(
/usr/
📸 Failure Screenshot: