mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
LibWeb: Implement test-web in terms of LibTest/JavaScriptTestRunner
This deduplicates the test-js copy-ism :^)
This commit is contained in:
parent
f137c1bfaa
commit
d897abf4c2
26 changed files with 643 additions and 1159 deletions
|
@ -1,19 +1,22 @@
|
|||
loadPage("file:///home/anon/web-tests/Pages/ParentNode.html");
|
||||
describe("NonElementParentNode", () => {
|
||||
loadLocalPage("ParentNode.html");
|
||||
|
||||
afterInitialPageLoad(() => {
|
||||
test("getElementById basics", () => {
|
||||
const unique = document.getElementById("unique");
|
||||
expect(unique).not.toBeNull();
|
||||
expect(unique.nodeName).toBe("DIV");
|
||||
expect(unique.id).toBe("unique");
|
||||
afterInitialPageLoad(page => {
|
||||
test("getElementById basics", () => {
|
||||
const unique = page.document.getElementById("unique");
|
||||
expect(unique).not.toBeNull();
|
||||
expect(unique.nodeName).toBe("DIV");
|
||||
expect(unique.id).toBe("unique");
|
||||
|
||||
const caseSensitive = document.getElementById("Unique");
|
||||
expect(caseSensitive).toBeNull();
|
||||
const caseSensitive = page.document.getElementById("Unique");
|
||||
expect(caseSensitive).toBeNull();
|
||||
|
||||
const firstDuplicate = document.getElementById("dupeId");
|
||||
expect(firstDuplicate).not.toBeNull();
|
||||
expect(firstDuplicate.nodeName).toBe("DIV");
|
||||
expect(firstDuplicate.id).toBe("dupeId");
|
||||
expect(firstDuplicate.innerHTML).toBe("First ID");
|
||||
const firstDuplicate = page.document.getElementById("dupeId");
|
||||
expect(firstDuplicate).not.toBeNull();
|
||||
expect(firstDuplicate.nodeName).toBe("DIV");
|
||||
expect(firstDuplicate.id).toBe("dupeId");
|
||||
expect(firstDuplicate.innerHTML).toBe("First ID");
|
||||
});
|
||||
});
|
||||
waitForPageToLoad();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue