2021-05-18 18:46:54 +04:30
|
|
|
describe("Comments", () => {
|
|
|
|
|
loadLocalPage("Comment.html");
|
|
|
|
|
afterInitialPageLoad(page => {
|
|
|
|
|
test("Basic functionality", () => {
|
|
|
|
|
const comment = page.document.body.firstChild.nextSibling;
|
|
|
|
|
expect(comment).not.toBeNull();
|
2020-08-17 21:04:46 +01:00
|
|
|
|
2021-05-18 18:46:54 +04:30
|
|
|
// FIXME: Add this in once Comment's constructor is implemented.
|
|
|
|
|
//expect(comment).toBeInstanceOf(Comment);
|
2020-08-17 21:04:46 +01:00
|
|
|
|
2021-05-18 18:46:54 +04:30
|
|
|
expect(comment.nodeName).toBe("#comment");
|
|
|
|
|
expect(comment.data).toBe("This is a comment");
|
|
|
|
|
expect(comment).toHaveLength(17);
|
|
|
|
|
});
|
2020-08-17 21:04:46 +01:00
|
|
|
});
|
2021-05-18 18:46:54 +04:30
|
|
|
waitForPageToLoad();
|
2020-08-17 21:04:46 +01:00
|
|
|
});
|