Skip to content

Commit

Permalink
another test fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
GabiGrin committed Oct 7, 2024
1 parent b6b505c commit c015b92
Showing 1 changed file with 26 additions and 39 deletions.
65 changes: 26 additions & 39 deletions vscode-extension/src/test/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,47 +131,34 @@ suite("Extension Test Suite", () => {
});

suite("Comment node", () => {
test
.skip("renders comment node", async () => {
const testFile = vscode.Uri.file(
path.resolve(__dirname, "../../test-fixtures/CommentFixture.flyde")
);

await vscode.commands.executeCommand(
"vscode.openWith",
testFile,
"flydeEditor"
);
test("renders comment node", async () => {
const testFile = vscode.Uri.file(
path.resolve(__dirname, "../../test-fixtures/CommentFixture.flyde")
);

await eventually(async () => {
const instances = await webviewTestingCommand("$$", {
selector: ".ins-view-inner",
});
await vscode.commands.executeCommand(
"vscode.openWith",
testFile,
"flydeEditor"
);

assert(
instances.length === 1,
"Expected fixture flow to have 1 instance"
);

assert(
instances[0].innerHTML.includes("<h1>Hello comment</h1>"),
"Expected the comment node to render the comment in html"
);

assert(
instances[0].innerHTML.includes("<strong>bold</strong>"),
"Expected the comment node to render bold text"
);
assert(
instances[0].innerHTML.includes("not bold"),
"Expected the comment node to render not bold text"
);
assert(
!instances[0].innerHTML.includes("<strong>not bold</strong>"),
"Expected the comment node to not render 'not bold' as bold text"
);
await eventually(async () => {
const instances = await webviewTestingCommand("$$", {
selector: ".ins-view-inner",
});
})
.timeout(5000);

console.log(instances[0].innerHTML);

assert(
instances.length === 1,
"Expected fixture flow to have 1 instance"
);

assert(
instances[0].innerHTML.includes("<h1>Hello comment</h1>"),
"Expected the comment node to render the comment in html"
);
});
}).timeout(5000);
});
});

0 comments on commit c015b92

Please sign in to comment.