2021-05-18 18:46:54 +04:30
|
|
|
describe("Text", () => {
|
|
|
|
|
loadLocalPage("/res/html/misc/blank.html");
|
2020-08-03 20:53:26 +02:00
|
|
|
|
2021-05-18 18:46:54 +04:30
|
|
|
afterInitialPageLoad(page => {
|
|
|
|
|
test("Basic functionality", () => {
|
|
|
|
|
const title = page.document.getElementsByTagName("title")[0];
|
|
|
|
|
expect(title).toBeDefined();
|
2020-08-17 21:04:46 +01:00
|
|
|
|
2021-05-18 18:46:54 +04:30
|
|
|
// FIXME: Add this in once Text's constructor is implemented.
|
|
|
|
|
//expect(title.firstChild).toBeInstanceOf(Text);
|
2020-08-17 21:04:46 +01:00
|
|
|
|
2021-05-18 18:46:54 +04:30
|
|
|
expect(title.firstChild.nodeName).toBe("#text");
|
|
|
|
|
expect(title.firstChild.data).toBe("Blank");
|
|
|
|
|
expect(title.firstChild.length).toBe(5);
|
|
|
|
|
});
|
2020-08-03 20:53:26 +02:00
|
|
|
});
|
2021-05-18 18:46:54 +04:30
|
|
|
waitForPageToLoad();
|
2020-08-03 20:53:26 +02:00
|
|
|
});
|