Skip to content

Commit

Permalink
fix: Adapt the test running in E2E to new VS Code task pick logic
Browse files Browse the repository at this point in the history
It seems that it will not try to fuzzy match the items anymore but
rather rely on the user to pick the correct task type/group first,
before showing the relevant options.

This fixes the issue by explicitly specifying the "hardhat" task type.
  • Loading branch information
Xanewok authored and kanej committed Apr 17, 2024
1 parent 5b7299f commit ae49ce7
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions test/e2e/tests/commands/clean.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { existsSync, mkdirSync } from "fs";
import path from "path";
import * as vscode from "vscode";
import { waitForUI } from "../../helpers/editor";
import { sleep } from "../../helpers/sleep";
import { getRootPath } from "../../helpers/workspace";

suite("task - clean", function () {
Expand All @@ -20,22 +19,11 @@ suite("task - clean", function () {

// Run clean task
await vscode.commands.executeCommand("workbench.action.tasks.runTask", {
task: "hardhat: clean main",
type: "hardhat",
task: "clean",
});
await waitForUI();

await sleep(1000);

await vscode.commands.executeCommand(
"workbench.action.acceptSelectedQuickOpenItem"
);
await sleep(1000);

await vscode.commands.executeCommand(
"workbench.action.acceptSelectedQuickOpenItem"
);

// Wait for task to finish
await new Promise((resolve) => vscode.tasks.onDidEndTask(resolve));

// Assert the artifacts were removed
Expand Down

0 comments on commit ae49ce7

Please sign in to comment.