File tree 3 files changed +26
-1
lines changed
3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,20 @@ export class GUIActions {
91
91
await dropdownOption . click ( ) ;
92
92
} ;
93
93
94
+ public static selectModeFromDropdown = async (
95
+ view : WebView ,
96
+ option : string ,
97
+ ) => {
98
+ const dropdownButton = await GUISelectors . getModeDropdownButton ( view ) ;
99
+ await dropdownButton . click ( ) ;
100
+
101
+ const dropdownOption = await TestUtils . waitForSuccess ( ( ) => {
102
+ return GUISelectors . getModeDropdownOption ( view , option ) ;
103
+ } ) ;
104
+
105
+ await dropdownOption . click ( ) ;
106
+ } ;
107
+
94
108
public static async sendMessage ( {
95
109
view,
96
110
message,
Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ export class GUISelectors {
67
67
return SelectorUtils . getElementByDataTestId ( view , "model-select-button" ) ;
68
68
}
69
69
70
+ public static getModeDropdownButton ( view : WebView ) {
71
+ return SelectorUtils . getElementByDataTestId ( view , "mode-select-button" ) ;
72
+ }
73
+
70
74
public static getFirstContextProviderDropdownItem ( view : WebView ) {
71
75
return SelectorUtils . getElementByDataTestId (
72
76
view ,
@@ -104,6 +108,12 @@ export class GUISelectors {
104
108
) ;
105
109
}
106
110
111
+ public static getModeDropdownOption ( view : WebView , option : string ) {
112
+ return view . findWebElement (
113
+ By . xpath ( `//*[@role="listbox"]//*[contains(text(), "${ option } ")]` ) ,
114
+ ) ;
115
+ }
116
+
107
117
public static getOnboardingTabButton ( view : WebView , title : string ) {
108
118
return SelectorUtils . getElementByDataTestId (
109
119
view ,
Original file line number Diff line number Diff line change @@ -239,9 +239,10 @@ describe("GUI Test", () => {
239
239
} ) . timeout ( DEFAULT_TIMEOUT . XL ) ;
240
240
} ) ;
241
241
242
- describe ( "Chat with tools" , ( ) => {
242
+ describe ( "Agent with tools" , ( ) => {
243
243
it ( "should render tool call" , async ( ) => {
244
244
await GUIActions . selectModelFromDropdown ( view , "TOOL MOCK LLM" ) ;
245
+ await GUIActions . selectModeFromDropdown ( view , "Agent" ) ;
245
246
246
247
const [ messageInput ] = await GUISelectors . getMessageInputFields ( view ) ;
247
248
await messageInput . sendKeys ( "Hello" ) ;
You can’t perform that action at this time.
0 commit comments