@@ -28,13 +28,13 @@ class HomePage(BasePage):
2828
2929 # Response and status locators
3030 TYPING_INDICATOR = "//div[@class='typing-indicator']"
31- AGENT = "//div[.= 'PlanningAgent']"
31+ AGENT = "//*[contains(text(), 'PlanningAgent') ]"
3232 CONFIRM_BRIEF_BUTTON = "//button[normalize-space()='Confirm brief']"
3333 BRIEF_CONFIRMED_TEXT = "//div[contains(text(),'Brief Confirmed')]"
3434 OLIVE_STONE_TEXT = "(//span[normalize-space()='Olive Stone'])[last()]"
3535 OBSIDIAN_TEXT = "(//span[normalize-space()='Obsidian Pearl'])[last()]"
3636 GENERATE_CONTENT_BUTTON = "//button[normalize-space()='Generate Content']"
37- ANALYZING_BRIEF_TEXT = "//span[contains(text(),'Analyzing creative brief.. ')]"
37+ ANALYZING_BRIEF_TEXT = "//span[contains(text(),'Processing your request ')]"
3838 GENERATED_CONTENT_TEXT_OLIVE = "//span[contains(.,'✨ Discover the serene elegance of Olive Stone.')]"
3939 GENERATED_CONTENT_TEXT_OBSIDIAN = "//span[contains(.,'✨ Discover the serene elegance of Obsidian Pearl.')]"
4040 PAINT_LIST = "//span[.='Here is the list of available paints:']"
@@ -1039,8 +1039,8 @@ def assert_no_error_in_response(self, context=""):
10391039
10401040 def validate_planning_agent_response_quality (self , extra_keywords = None ):
10411041 """
1042- Validate that the PlanningAgent response is present and contains meaningful
1043- brief-related content (mentions objectives, key message, tone, etc.).
1042+ Validate that the response contains meaningful brief-related content
1043+ (mentions objectives, key message, tone, etc.).
10441044
10451045 Hard assertion: At least 2 baseline brief keywords must be present.
10461046 Soft assertion: If extra_keywords are provided, logs warnings for missing ones.
@@ -1050,15 +1050,11 @@ def validate_planning_agent_response_quality(self, extra_keywords=None):
10501050 (e.g., ["social media", "back to school"] for Obsidian Pearl).
10511051
10521052 Raises:
1053- AssertionError: If PlanningAgent response is missing or lacks baseline content.
1053+ AssertionError: If response lacks baseline brief content.
10541054 """
10551055 logger .info ("🔍 Validating PlanningAgent response quality..." )
10561056
10571057 try :
1058- agent_label = self .page .locator (self .AGENT )
1059- expect (agent_label ).to_be_visible (timeout = 15000 )
1060- logger .info ("✓ PlanningAgent label is visible" )
1061-
10621058 page_text = self .page .inner_text ("body" )
10631059 page_text_lower = page_text .lower ()
10641060
0 commit comments