⏱️ Duration: 85.99s
❌ Error:
self = <tests.publisher_yt_linkedin.test_publisher_yt_linkedin.TestPublisherYtLinkedin object at 0x7f65768d2bc0>
main_page = <pages.main_page.MainPage object at 0x7f65769437c0>
login_page = <pages.login_page.LoginPage object at 0x7f65769437f0>
autopilot_page = <pages.autopilot_page.AutopilotPage object at 0x7f6575b8d360>
planner_page = <pages.planner_page.PlannerPage object at 0x7f6575b8d480>
publisher_page = <pages.publisher_page.PublisherPage object at 0x7f6575d77fa0>
base_url = 'https://promo.com'
def test_pub11_create_new_ratios_for_ai_post(
self, main_page, login_page, autopilot_page, planner_page, publisher_page, base_url
):
"""
Uses the 5th AI post (pinned by title for the rest of the test). If that post already
has a wide/vertical ratio (left over from an interrupted run) it is deleted and the new
5th post is used — the source deleted it too, but then failed and needed a manual re-run.
"""
main_page.go_to_homepage_with_tid(base_url, "200220240")
login_page.login_directly(base_url, email_ai, get_password())
planner_page.go_to_my_calendar(base_url)
planner_page.verify_on_planner()
autopilot_page.ensure_ai_posts_exist(min_count=5)
ai_items = planner_page.page.locator(autopilot_page.PLANNER_AI_SUGGESTED_ITEM)
title = None
def open_5th_ai_post_in_publisher():
item = ai_items.filter(has_text=title).first
item.wait_for(state="visible", timeout=planner_page.T_SLOW)
item.click()
planner_page.page.locator(planner_page.PLAY_PAUSE_VISIBLE).wait_for(
state="visible", timeout=planner_page.T_SLOW
)
# Precondition: the 5th AI post must have neither a wide nor a vertical ratio yet.
# A post left with one by an interrupted run is deleted and the next 5th post is used.
for _ in range(3):
# Pin the post by its title: re-opening "the 5
📸 Failure Screenshot: