@@ -22,6 +22,8 @@ class BIABPage(BasePage):
2222 RETAIL_CUSTOMER_SUCCESS_SELECTED = "//span[.='Retail Customer Success Team']"
2323 PRODUCT_MARKETING = "//div[normalize-space()='Product Marketing Team']"
2424 HR_TEAM = "//div[normalize-space()='Human Resources Team']"
25+ RFP_TEAM = "//div[normalize-space()='RFP Team']"
26+ CONTRACT_COMPLIANCE_TEAM = "//div[normalize-space()='Contract Compliance Review Team']"
2527 CONTINUE_BTN = "//button[normalize-space()='Continue']"
2628 CREATING_PLAN = "//span[normalize-space()='Creating a plan']"
2729 CUSTOMER_DATA_AGENT = "//span[normalize-space()='Customer Data Agent']"
@@ -503,6 +505,22 @@ def input_clarification_and_send(self, clarification_text):
503505 self .page .locator (self .PROCESSING_PLAN ).wait_for (state = "hidden" , timeout = 200000 )
504506 logger .info ("✓ Plan processing completed" )
505507
508+ def input_rai_clarification_and_send (self , clarification_text ):
509+ """Input RAI clarification text and click send button (for RAI testing)."""
510+ logger .info ("Starting RAI clarification input process..." )
511+
512+ logger .info (f"Typing RAI clarification: { clarification_text } " )
513+ self .page .locator (self .INPUT_CLARIFICATION ).fill (clarification_text )
514+ self .page .wait_for_timeout (1000 )
515+ logger .info ("✓ RAI clarification text entered" )
516+
517+ logger .info ("Clicking Send button for RAI clarification..." )
518+ self .page .locator (self .SEND_BUTTON_CLARIFICATION ).click ()
519+ self .page .wait_for_timeout (2000 )
520+ logger .info ("✓ RAI clarification send button clicked" )
521+
522+ logger .info ("RAI clarification input and send completed successfully!" )
523+
506524 def validate_source_text_not_visible (self ):
507525 """Validate that the source text element is not visible."""
508526 logger .info ("Validating that source text is not visible..." )
@@ -542,8 +560,95 @@ def click_cancel_button(self):
542560 self .page .wait_for_timeout (2000 )
543561 logger .info ("✓ 'Cancel' button clicked" )
544562
545-
546-
547-
563+ def select_rfp_team (self ):
564+ """Select RFP team and continue."""
565+ logger .info ("Starting RFP team selection process..." )
566+
567+ logger .info ("Clicking on 'Current Team' button..." )
568+ self .page .locator (self .CURRENT_TEAM ).click ()
569+ self .page .wait_for_timeout (2000 )
570+ logger .info ("✓ 'Current Team' button clicked" )
571+
572+ logger .info ("Selecting 'RFP Team' radio button..." )
573+ self .page .locator (self .RFP_TEAM ).click ()
574+ self .page .wait_for_timeout (1000 )
575+ logger .info ("✓ 'RFP Team' radio button selected" )
576+
577+ logger .info ("Clicking 'Continue' button..." )
578+ self .page .locator (self .CONTINUE_BTN ).click ()
579+ self .page .wait_for_timeout (2000 )
580+ logger .info ("✓ 'Continue' button clicked" )
581+
582+ logger .info ("RFP team selection completed successfully!" )
548583
549-
584+ def select_contract_compliance_team (self ):
585+ """Select Contract Compliance Review team and continue."""
586+ logger .info ("Starting Contract Compliance team selection process..." )
587+
588+ logger .info ("Clicking on 'Current Team' button..." )
589+ self .page .locator (self .CURRENT_TEAM ).click ()
590+ self .page .wait_for_timeout (2000 )
591+ logger .info ("✓ 'Current Team' button clicked" )
592+
593+ logger .info ("Selecting 'Contract Compliance Review Team' radio button..." )
594+ self .page .locator (self .CONTRACT_COMPLIANCE_TEAM ).click ()
595+ self .page .wait_for_timeout (1000 )
596+ logger .info ("✓ 'Contract Compliance Review Team' radio button selected" )
597+
598+ logger .info ("Clicking 'Continue' button..." )
599+ self .page .locator (self .CONTINUE_BTN ).click ()
600+ self .page .wait_for_timeout (2000 )
601+ logger .info ("✓ 'Continue' button clicked" )
602+
603+ logger .info ("Contract Compliance team selection completed successfully!" )
604+
605+ def validate_home_input_visible (self ):
606+ """Validate that user is redirected to home screen with input visible."""
607+ logger .info ("Validating home input is visible..." )
608+ expect (self .page .locator (self .HOME_INPUT_TITLE_WRAPPER )).to_be_visible (timeout = 10000 )
609+ logger .info ("✓ Home input is visible - user redirected to home screen" )
610+
611+ def validate_send_button_disabled (self ):
612+ """Validate that send button is disabled for empty/space inputs."""
613+ logger .info ("Validating send button is disabled..." )
614+ send_button = self .page .locator (self .SEND_BUTTON )
615+ is_disabled = send_button .is_disabled ()
616+ if is_disabled :
617+ logger .info ("✓ Send button is disabled as expected" )
618+ else :
619+ logger .warning ("⚠ Send button is enabled but should be disabled" )
620+ # Check if clicking does nothing
621+ send_button .click ()
622+ self .page .wait_for_timeout (2000 )
623+ # Verify no plan creation started
624+ try :
625+ self .page .locator (self .CREATING_PLAN ).wait_for (state = "visible" , timeout = 3000 )
626+ logger .error ("❌ Plan creation started unexpectedly" )
627+ raise AssertionError ("System accepted empty/space query - test failed" )
628+ except Exception as e :
629+ if "Timeout" in str (e ) or "timeout" in str (e ):
630+ logger .info ("✓ No plan creation started - system correctly rejected query" )
631+ else :
632+ raise
633+
634+ def input_text_only (self , text ):
635+ """Input text without sending."""
636+ logger .info (f"Typing text: { text } " )
637+ self .page .locator (self .PROMPT_INPUT ).fill (text )
638+ self .page .wait_for_timeout (1000 )
639+ logger .info ("✓ Text entered" )
640+
641+ def get_team_list_count (self , team_name ):
642+ """Get the count of a specific team in the team selection list."""
643+ logger .info (f"Counting '{ team_name } ' entries in team list..." )
644+ team_locator = f"//div[normalize-space()='{ team_name } ']"
645+ count = self .page .locator (team_locator ).count ()
646+ logger .info (f"✓ Found { count } entries for '{ team_name } '" )
647+ return count
648+
649+ def open_team_selection (self ):
650+ """Open the team selection dropdown."""
651+ logger .info ("Opening team selection dropdown..." )
652+ self .page .locator (self .CURRENT_TEAM ).click ()
653+ self .page .wait_for_timeout (2000 )
654+ logger .info ("✓ Team selection dropdown opened" )
0 commit comments