Skip to content

Commit 8c3805c

Browse files
committed
fix tests that now only work in Agent Mode
1 parent 9b7ee72 commit 8c3805c

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

extensions/vscode/e2e/actions/GUI.actions.ts

+14
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,20 @@ export class GUIActions {
9191
await dropdownOption.click();
9292
};
9393

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+
94108
public static async sendMessage({
95109
view,
96110
message,

extensions/vscode/e2e/selectors/GUI.selectors.ts

+10
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export class GUISelectors {
6767
return SelectorUtils.getElementByDataTestId(view, "model-select-button");
6868
}
6969

70+
public static getModeDropdownButton(view: WebView) {
71+
return SelectorUtils.getElementByDataTestId(view, "mode-select-button");
72+
}
73+
7074
public static getFirstContextProviderDropdownItem(view: WebView) {
7175
return SelectorUtils.getElementByDataTestId(
7276
view,
@@ -104,6 +108,12 @@ export class GUISelectors {
104108
);
105109
}
106110

111+
public static getModeDropdownOption(view: WebView, option: string) {
112+
return view.findWebElement(
113+
By.xpath(`//*[@role="listbox"]//*[contains(text(), "${option}")]`),
114+
);
115+
}
116+
107117
public static getOnboardingTabButton(view: WebView, title: string) {
108118
return SelectorUtils.getElementByDataTestId(
109119
view,

extensions/vscode/e2e/tests/GUI.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,10 @@ describe("GUI Test", () => {
239239
}).timeout(DEFAULT_TIMEOUT.XL);
240240
});
241241

242-
describe("Chat with tools", () => {
242+
describe("Agent with tools", () => {
243243
it("should render tool call", async () => {
244244
await GUIActions.selectModelFromDropdown(view, "TOOL MOCK LLM");
245+
await GUIActions.selectModeFromDropdown(view, "Agent");
245246

246247
const [messageInput] = await GUISelectors.getMessageInputFields(view);
247248
await messageInput.sendKeys("Hello");

0 commit comments

Comments
 (0)