Skip to content

Commit b2d5172

Browse files
authored
Support new selector engine (#88)
* Support new selector engine * Fix test
1 parent 0a36fa6 commit b2d5172

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ describe('getPlaywrightInstance', () => {
235235
const selectors = [{ name: 'test', script: 'test' }]
236236

237237
const instance = await getPlaywrightInstance('firefox', selectors)
238-
expect(register).toHaveBeenLastCalledWith('test', { name: 'test' })
238+
expect(register).toHaveBeenLastCalledWith('test', 'test')
239239
expect(instance).toEqual('firefox')
240240
})
241241

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export const getPlaywrightInstance = async (
8989
const playwright = require('playwright')
9090
if (selectors) {
9191
await Promise.all(
92-
selectors.map(({ script, name }) =>
93-
playwright.selectors.register(script, { name }),
92+
selectors.map(({ name, script }) =>
93+
playwright.selectors.register(name, script),
9494
),
9595
)
9696
}

0 commit comments

Comments
 (0)