continue-custom/extensions/vscode/e2e/tests/Autocomplete.test.ts
Tomasz Stefaniak f7412ba627
Fetch CA certificate tests (#6803)
* test: certificates

* fix: failing tests

* test: e2e

* fix: prettier

* improv: clean up code

* chore: update dependencies

* fix: type errors

* fix: formatting
2025-07-31 15:37:36 -07:00

35 lines
1.1 KiB
TypeScript

import { expect } from "chai";
import { EditorView, TextEditor } from "vscode-extension-tester";
import { AutocompleteActions } from "../actions/Autocomplete.actions";
import { GlobalActions } from "../actions/Global.actions";
import { DEFAULT_TIMEOUT } from "../constants";
describe("Autocomplete", () => {
let editor: TextEditor;
before(async function () {
process.env.NEXT_EDIT_TEST_ENABLED = "false";
});
beforeEach(async function () {
this.timeout(DEFAULT_TIMEOUT.XL);
await GlobalActions.openTestWorkspace();
({ editor } = await GlobalActions.createAndOpenNewTextFile());
});
afterEach(async function () {
this.timeout(DEFAULT_TIMEOUT.XL);
await editor.clearText();
await new EditorView().closeAllEditors();
});
it("Should display completions", async () => {
await AutocompleteActions.testCompletions(editor);
}).timeout(DEFAULT_TIMEOUT.XL);
it("Should force a completion using the command", async () => {
const ghostText = await AutocompleteActions.forceCompletion(editor);
expect(ghostText).to.not.be.empty;
}).timeout(DEFAULT_TIMEOUT.XL);
});