diff --git a/tests/element/element.spec.ts b/tests/element/element.spec.ts index a2900e51..d8d1546b 100644 --- a/tests/element/element.spec.ts +++ b/tests/element/element.spec.ts @@ -5,8 +5,16 @@ test('element', async ({ page }) => { await page.waitForSelector('.completed'); - const test0 = page.locator('#test0'); - await expect(test0).toHaveText('H1'); + const testElementNameType = page.locator('#testElementNameType'); + await expect(testElementNameType).toHaveText('DIV 1'); + + const testGetBoundingClientRectY = page.locator('#testGetBoundingClientRectY'); + const y = await testGetBoundingClientRectY.textContent(); + const yInt = parseFloat(y); + expect(yInt).toBeGreaterThan(4); + + const testQSH1 = page.locator('#testQSH1'); + await expect(testQSH1).toHaveText('H1'); const testQSLength = page.locator('#testQSLength'); await expect(testQSLength).toHaveText('2'); @@ -32,11 +40,6 @@ test('element', async ({ page }) => { const testSetAttribute = page.locator('#testSetAttribute'); await expect(testSetAttribute).toHaveText('1985'); - const testGetBoundingClientRectY = page.locator('#testGetBoundingClientRectY'); - const y = await testGetBoundingClientRectY.textContent(); - const yInt = parseFloat(y); - expect(yInt).toBeGreaterThan(4); - const testAnchor = page.locator('#testAnchor'); await expect(testAnchor).toHaveText('/element/some/other/path'); diff --git a/tests/element/index.html b/tests/element/index.html index 6c780c57..0c85cfb3 100644 --- a/tests/element/index.html +++ b/tests/element/index.html @@ -54,6 +54,17 @@
+
+
@@ -72,11 +83,11 @@
+
+
+
diff --git a/tests/node/node.spec.ts b/tests/node/node.spec.ts
index bf3d08d7..8becef39 100644
--- a/tests/node/node.spec.ts
+++ b/tests/node/node.spec.ts
@@ -5,6 +5,9 @@ test('node', async ({ page }) => {
await page.waitForSelector('.completed');
+ const testNodeNameType = page.locator('#testNodeNameType');
+ await expect(testNodeNameType).toHaveText('#text 3');
+
const testCheckbox = page.locator('#testCheckbox');
await expect(testCheckbox).toBeChecked();