| 1 | import { EditorView, TextEditor } from "vscode-extension-tester"; |
| 2 | |
| 3 | import { AutocompleteActions } from "../actions/Autocomplete.actions"; |
| 4 | import { GlobalActions } from "../actions/Global.actions"; |
| 5 | import { DEFAULT_TIMEOUT } from "../constants"; |
| 6 | |
| 7 | describe("Autocomplete", () => { |
| 8 | let editor: TextEditor; |
| 9 | |
| 10 | beforeEach(async function () { |
| 11 | this.timeout(DEFAULT_TIMEOUT.XL); |
| 12 | |
| 13 | await GlobalActions.openTestWorkspace(); |
| 14 | ({ editor } = await GlobalActions.createAndOpenNewTextFile()); |
| 15 | }); |
| 16 | |
| 17 | afterEach(async function () { |
| 18 | this.timeout(DEFAULT_TIMEOUT.XL); |
| 19 | await editor.clearText(); |
| 20 | await new EditorView().closeAllEditors(); |
| 21 | }); |
| 22 | |
| 23 | it("Should display completions", async () => { |
| 24 | await AutocompleteActions.testCompletions(editor); |
| 25 | }).timeout(DEFAULT_TIMEOUT.XL); |
| 26 | }); |