Skip to content

Commit 4f85b08

Browse files
author
Adam Argyle
committed
update tests for new hover behavior
1 parent 2b9b81b commit 4f85b08

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/features/accessibility.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ test('Does not show a11y tooltip on <svg> node', async t => {
4141
const svgEl = await page.$('svg')
4242
const {x, y} = await svgEl.boundingBox()
4343
await page.mouse.click(x + 1, y + 1) // an empty space of the first svg element
44-
const targetNodeName = await page.$eval('visbug-label', el => el.$shadow.querySelector('a[node]') .textContent)
44+
const targetNodeName = await page.$eval('[data-selected="true"]', el => el.nodeName)
4545
t.is(targetNodeName, 'svg')
4646
t.pass()
4747

app/features/guides.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ from '../../tests/helpers'
55

66
test.beforeEach(setupPptrTab)
77

8-
test('Should show 2 overlay elements on hover', async t => {
8+
test('Should show 1 overlay element on hover', async t => {
99
const { page } = t.context
1010

1111
await page.mouse.move(100, 200)
1212

1313
const gridlines_element = await page.evaluate(`document.querySelectorAll('visbug-gridlines').length`)
14-
const label_elements = await page.evaluate(`document.querySelectorAll('visbug-label').length`)
1514

1615
t.is(gridlines_element, 1)
17-
t.is(label_elements, 1)
1816
t.pass()
1917
})
2018

21-
test.afterEach(teardownPptrTab)
19+
test.afterEach(teardownPptrTab)

0 commit comments

Comments
 (0)