Add failing e2e test
This commit is contained in:
committed by
Josh Gross
parent
60db45e6c8
commit
d1baf65c18
@@ -0,0 +1,28 @@
|
||||
import {complete} from "./complete";
|
||||
import {hover} from "./hover";
|
||||
import {registerLogger} from "./log";
|
||||
import {getPositionFromCursor} from "./test-utils/cursor-position";
|
||||
import {TestLogger} from "./test-utils/logger";
|
||||
import {clearCache} from "./utils/workflow-cache";
|
||||
|
||||
registerLogger(new TestLogger());
|
||||
|
||||
beforeEach(() => {
|
||||
clearCache();
|
||||
});
|
||||
|
||||
describe("end-to-end", () => {
|
||||
it("empty workflow completion after hover", async () => {
|
||||
const input = "|";
|
||||
|
||||
// Issue hover first to fill the cache
|
||||
await hover(...getPositionFromCursor(input));
|
||||
|
||||
const result = await complete(...getPositionFromCursor(input));
|
||||
|
||||
expect(result).not.toBeUndefined();
|
||||
expect(result.length).toEqual(8);
|
||||
const labels = result.map(x => x.label);
|
||||
expect(labels).toEqual(["concurrency", "defaults", "env", "jobs", "name", "on", "permissions", "run-name"]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user