more tests
This commit is contained in:
parent
b9c92b5db0
commit
83dedcd6da
1 changed files with 27 additions and 2 deletions
|
|
@ -239,7 +239,7 @@ describe("GUI Test", () => {
|
|||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
});
|
||||
|
||||
describe.only("Chat with tools", () => {
|
||||
describe("Chat with tools", () => {
|
||||
it("should render tool call", async () => {
|
||||
await GUIActions.selectModelFromDropdown(view, "TOOL MOCK LLM");
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ describe("GUI Test", () => {
|
|||
);
|
||||
}).timeout(DEFAULT_TIMEOUT.MD);
|
||||
|
||||
it("should render tool call requiring approval", async () => {
|
||||
it("should call tool after approval", async () => {
|
||||
await GUIActions.toggleToolPolicy(view, "builtin_view_diff", 2);
|
||||
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
|
|
@ -281,6 +281,31 @@ describe("GUI Test", () => {
|
|||
const text = await statusMessage.getText();
|
||||
expect(text).contain("the git diff");
|
||||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
|
||||
it("should cancel tool", async () => {
|
||||
await GUIActions.toggleToolPolicy(view, "builtin_view_diff", 2);
|
||||
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUIActions.selectModelFromDropdown(view, "TOOL MOCK LLM"),
|
||||
);
|
||||
|
||||
const [messageInput] = await GUISelectors.getMessageInputFields(view);
|
||||
await messageInput.sendKeys("Hello");
|
||||
await messageInput.sendKeys(Key.ENTER);
|
||||
|
||||
const cancelToolCallButton = await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getRejectToolCallButton(view),
|
||||
);
|
||||
await cancelToolCallButton.click();
|
||||
|
||||
const statusMessage = await TestUtils.waitForSuccess(
|
||||
() => GUISelectors.getToolCallStatusMessage(view), // Defined in extensions/vscode/e2e/test-continue/config.json's TOOL MOCK LLM that we are calling the exact search tool
|
||||
DEFAULT_TIMEOUT.SM,
|
||||
);
|
||||
|
||||
const text = await statusMessage.getText();
|
||||
expect(text).contain("Continue tried to view the git diff");
|
||||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
});
|
||||
|
||||
describe("Context providers", () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue