@@ -1916,8 +1916,8 @@ async def handle_extensions_demo(self):
19161916 activities_selectors = [
19171917 'button:has-text("Show") >> :has-text("subactivities")' ,
19181918 'button:has-text("subactivities")' ,
1919- ' button >> text=/Show.*subactivities/' ,
1920- ' button >> text=/Show.*activities/' ,
1919+ " button >> text=/Show.*subactivities/" ,
1920+ " button >> text=/Show.*activities/" ,
19211921 'text="Show"' ,
19221922 'button:has-text("Show")' ,
19231923 ':text("Show") >> button' ,
@@ -2008,6 +2008,283 @@ async def run_extensions_demo_test(self, email, mfa_token):
20082008 )
20092009 raise e
20102010
2011+ async def handle_tasks_demo (self ):
2012+ """Handle tasks page demo scenario"""
2013+ # Start at chat screen first for consistent navigation
2014+ await self .navigate_to_chat_first (
2015+ "Let's explore the task management capabilities. This is where you can create, organize, and manage various tasks for your 'A G I X T' agent."
2016+ )
2017+
2018+ # Navigate to tasks page
2019+ await self .test_action (
2020+ "We'll navigate to the tasks page where you can create and manage different types of tasks and workflows." ,
2021+ lambda : self .page .goto (f"{ self .base_uri } /tasks" ),
2022+ )
2023+
2024+ # Wait for tasks page to load
2025+ await self .test_action (
2026+ "The tasks page is loading with all available task management options." ,
2027+ lambda : asyncio .sleep (3 ),
2028+ )
2029+
2030+ await self .take_screenshot (
2031+ "Here's the tasks management interface where you can create and organize different types of tasks for your AI agent."
2032+ )
2033+
2034+ # Look for task creation buttons or interface elements
2035+ try :
2036+ # Check for any task creation buttons
2037+ task_buttons = await self .page .locator ("button" ).all ()
2038+ if task_buttons :
2039+ await self .test_action (
2040+ "We can see various task management options and buttons available for creating new tasks." ,
2041+ lambda : self .page .wait_for_selector (
2042+ "button" , state = "visible" , timeout = 5000
2043+ ),
2044+ )
2045+
2046+ # Try to click the first available task-related button
2047+ await self .test_action (
2048+ "Let's explore the task creation interface by clicking on an available option." ,
2049+ lambda : self .page .click ("button:first-child" ),
2050+ )
2051+
2052+ await self .take_screenshot (
2053+ "The task creation interface shows the available options for setting up automated tasks and workflows."
2054+ )
2055+ except Exception as e :
2056+ logging .info (f"No specific task creation buttons found: { e } " )
2057+
2058+ # Check for any forms or input fields related to task management
2059+ try :
2060+ # Look for any input fields that might be related to task creation
2061+ inputs = await self .page .locator ("input" ).all ()
2062+ if inputs :
2063+ await self .test_action (
2064+ "We can see input fields where you can define task parameters and configurations." ,
2065+ lambda : self .page .wait_for_selector (
2066+ "input" , state = "visible" , timeout = 5000
2067+ ),
2068+ )
2069+ except Exception as e :
2070+ logging .info (f"No task input fields found: { e } " )
2071+
2072+ await self .take_screenshot (
2073+ "This completes our tasks management demo. You can see how this interface allows you to create and manage various automated tasks and workflows."
2074+ )
2075+
2076+ async def run_tasks_test (self , email , mfa_token ):
2077+ """Run tasks test and create video"""
2078+ try :
2079+ # User is already logged in from shared session
2080+ await self .handle_tasks_demo ()
2081+ video_path = self .create_video_report (video_name = "tasks_demo" )
2082+ logging .info (f"Tasks test complete. Video report created at { video_path } " )
2083+ except Exception as e :
2084+ logging .error (f"Tasks test failed: { e } " )
2085+ if not os .path .exists (os .path .join (os .getcwd (), "tests" , "tasks_demo.mp4" )):
2086+ self .create_video_report (
2087+ video_name = "tasks_demo" , test_status = "❌ **TEST FAILURE**"
2088+ )
2089+ raise e
2090+
2091+ async def handle_chains_demo (self ):
2092+ """Handle chains configuration demo scenario"""
2093+ # Start at chat screen first for consistent navigation
2094+ await self .navigate_to_chat_first (
2095+ "Let's explore the chains configuration feature. This is where you can create complex multi-step workflows and processes for your 'A G I X T' agent."
2096+ )
2097+
2098+ # Navigate to Agent Management
2099+ await self .test_action (
2100+ "We'll start by navigating to Agent Management to access the chains configuration options." ,
2101+ lambda : self .page .click ('span:has-text("Agent Management")' ),
2102+ )
2103+
2104+ await self .take_screenshot (
2105+ "The Agent Management menu is open, showing various configuration options including chains."
2106+ )
2107+
2108+ # Navigate to Chains from the dropdown
2109+ await self .test_action (
2110+ "Now we'll click on 'Chains' to access the workflow configuration interface." ,
2111+ lambda : self .page .click ('a:has-text("Chains")' ),
2112+ )
2113+
2114+ # Wait for the chains page to load
2115+ await self .test_action (
2116+ "The chains page is loading with all available workflow configuration options." ,
2117+ lambda : asyncio .sleep (3 ),
2118+ )
2119+
2120+ await self .take_screenshot (
2121+ "Here's the chains configuration interface where you can create and manage multi-step workflows and processes."
2122+ )
2123+
2124+ # Look for chain creation or management elements
2125+ try :
2126+ # Check for any chain creation buttons
2127+ chain_buttons = await self .page .locator ("button" ).all ()
2128+ if chain_buttons :
2129+ await self .test_action (
2130+ "We can see various chain management options and buttons available for creating new workflows." ,
2131+ lambda : self .page .wait_for_selector (
2132+ "button" , state = "visible" , timeout = 5000
2133+ ),
2134+ )
2135+
2136+ # Try to interact with available chain management elements
2137+ await self .test_action (
2138+ "Let's explore the chain creation interface by examining the available workflow options." ,
2139+ lambda : asyncio .sleep (2 ),
2140+ )
2141+
2142+ await self .take_screenshot (
2143+ "The chain creation interface shows the available options for setting up complex multi-step workflows."
2144+ )
2145+ except Exception as e :
2146+ logging .info (f"No specific chain creation buttons found: { e } " )
2147+
2148+ # Check for any forms or configuration areas
2149+ try :
2150+ # Look for any configuration areas or forms
2151+ forms = await self .page .locator ("form" ).all ()
2152+ if forms :
2153+ await self .test_action (
2154+ "We can see configuration forms where you can define chain parameters and workflow steps." ,
2155+ lambda : self .page .wait_for_selector (
2156+ "form" , state = "visible" , timeout = 5000
2157+ ),
2158+ )
2159+ except Exception as e :
2160+ logging .info (f"No chain configuration forms found: { e } " )
2161+
2162+ await self .take_screenshot (
2163+ "This completes our chains configuration demo. You can see how this interface allows you to create and manage complex multi-step workflows and automated processes."
2164+ )
2165+
2166+ async def run_chains_test (self , email , mfa_token ):
2167+ """Run chains test and create video"""
2168+ try :
2169+ # User is already logged in from shared session
2170+ await self .handle_chains_demo ()
2171+ video_path = self .create_video_report (video_name = "chains_demo" )
2172+ logging .info (f"Chains test complete. Video report created at { video_path } " )
2173+ except Exception as e :
2174+ logging .error (f"Chains test failed: { e } " )
2175+ if not os .path .exists (
2176+ os .path .join (os .getcwd (), "tests" , "chains_demo.mp4" )
2177+ ):
2178+ self .create_video_report (
2179+ video_name = "chains_demo" , test_status = "❌ **TEST FAILURE**"
2180+ )
2181+ raise e
2182+
2183+ async def handle_prompts_demo (self ):
2184+ """Handle full prompts management demo scenario"""
2185+ # Start at chat screen first for consistent navigation
2186+ await self .navigate_to_chat_first (
2187+ "Let's explore the comprehensive prompts management system. This is where you can create, edit, and manage custom prompts for your 'A G I X T' agent."
2188+ )
2189+
2190+ # Navigate to Agent Management
2191+ await self .test_action (
2192+ "We'll start by navigating to Agent Management to access the prompts configuration options." ,
2193+ lambda : self .page .click ('span:has-text("Agent Management")' ),
2194+ )
2195+
2196+ await self .take_screenshot (
2197+ "The Agent Management menu is open, showing various configuration options including prompts management."
2198+ )
2199+
2200+ # Navigate to Prompts from the dropdown
2201+ await self .test_action (
2202+ "Now we'll click on 'Prompts' to access the full prompts management interface." ,
2203+ lambda : self .page .click ('a:has-text("Prompts")' ),
2204+ )
2205+
2206+ # Wait for the prompts page to load
2207+ await self .test_action (
2208+ "The prompts page is loading with all available prompt management options." ,
2209+ lambda : asyncio .sleep (3 ),
2210+ )
2211+
2212+ await self .take_screenshot (
2213+ "Here's the comprehensive prompts management interface where you can create, edit, and organize custom prompts."
2214+ )
2215+
2216+ # Look for prompt creation or management elements
2217+ try :
2218+ # Check for any prompt creation buttons
2219+ prompt_buttons = await self .page .locator ("button" ).all ()
2220+ if prompt_buttons :
2221+ await self .test_action (
2222+ "We can see various prompt management options and buttons available for creating new prompts." ,
2223+ lambda : self .page .wait_for_selector (
2224+ "button" , state = "visible" , timeout = 5000
2225+ ),
2226+ )
2227+
2228+ # Try to interact with available prompt management elements
2229+ await self .test_action (
2230+ "Let's explore the prompt creation interface by examining the available options." ,
2231+ lambda : asyncio .sleep (2 ),
2232+ )
2233+
2234+ await self .take_screenshot (
2235+ "The prompt creation interface shows the available options for setting up custom prompts and templates."
2236+ )
2237+ except Exception as e :
2238+ logging .info (f"No specific prompt creation buttons found: { e } " )
2239+
2240+ # Check for any text areas or input fields for prompt editing
2241+ try :
2242+ # Look for any text areas that might be for prompt editing
2243+ textareas = await self .page .locator ("textarea" ).all ()
2244+ if textareas :
2245+ await self .test_action (
2246+ "We can see text areas where you can write and edit custom prompts and instructions." ,
2247+ lambda : self .page .wait_for_selector (
2248+ "textarea" , state = "visible" , timeout = 5000
2249+ ),
2250+ )
2251+
2252+ # Try to interact with the first textarea if available
2253+ await self .test_action (
2254+ "Let's demonstrate how to create a custom prompt by entering some sample text." ,
2255+ lambda : self .page .fill (
2256+ "textarea" ,
2257+ "This is a sample custom prompt for demonstration purposes." ,
2258+ ),
2259+ )
2260+
2261+ await self .take_screenshot (
2262+ "We've entered sample text to show how you can create and edit custom prompts in this interface."
2263+ )
2264+ except Exception as e :
2265+ logging .info (f"No prompt text areas found: { e } " )
2266+
2267+ await self .take_screenshot (
2268+ "This completes our comprehensive prompts management demo. You can see how this interface allows you to create, edit, and manage custom prompts and templates for your AI agent."
2269+ )
2270+
2271+ async def run_prompts_test (self , email , mfa_token ):
2272+ """Run expanded prompts test and create video"""
2273+ try :
2274+ # User is already logged in from shared session
2275+ await self .handle_prompts_demo ()
2276+ video_path = self .create_video_report (video_name = "prompts_demo" )
2277+ logging .info (f"Prompts test complete. Video report created at { video_path } " )
2278+ except Exception as e :
2279+ logging .error (f"Prompts test failed: { e } " )
2280+ if not os .path .exists (
2281+ os .path .join (os .getcwd (), "tests" , "prompts_demo.mp4" )
2282+ ):
2283+ self .create_video_report (
2284+ video_name = "prompts_demo" , test_status = "❌ **TEST FAILURE**"
2285+ )
2286+ raise e
2287+
20112288 async def run (self , headless = not is_desktop ()):
20122289 """Run all tests: registration in its own browser, then all others in a shared browser"""
20132290 email = None
@@ -2083,6 +2360,24 @@ async def run(self, headless=not is_desktop()):
20832360 # Team management test
20842361 await self .run_team_management_test (email , mfa_token )
20852362
2363+ # Clear screenshots for next video
2364+ self .screenshots_with_actions = []
2365+
2366+ # Tasks test
2367+ await self .run_tasks_test (email , mfa_token )
2368+
2369+ # Clear screenshots for next video
2370+ self .screenshots_with_actions = []
2371+
2372+ # Chains test
2373+ await self .run_chains_test (email , mfa_token )
2374+
2375+ # Clear screenshots for next video
2376+ self .screenshots_with_actions = []
2377+
2378+ # Prompts test (expanded beyond mandatory context)
2379+ await self .run_prompts_test (email , mfa_token )
2380+
20862381 # Training test
20872382 # await self.run_training_test(email, mfa_token)
20882383
0 commit comments