Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using custom selector engine: selector engine has been already registered #250

Closed
Maksandre opened this issue Jul 26, 2020 · 1 comment · Fixed by #251
Closed
Labels
bug Something isn't working

Comments

@Maksandre
Copy link

My issue looks pretty similar to this one - #99
I'm trying to use custom selector engine from this example in my jest-playwright.config.js file like this:

jest-playwright.config.js

const { createTagNameEngine } = require("./tests/engine");

module.exports = {
 browsers: ["chromium"],
 launchOptions: {
   headless: true
 },
 selectors: [
   {name: 'tag', script: createTagNameEngine}
 ]
}

and I get an error when running tests:

Test suite failed to run
"tag" selector engine has been already registered
  • OS: Windows
  • Playwright version 1.2.1
  • jest-playwright version 1.2.1

jest.config.js

module.exports = {
 preset: 'jest-playwright-preset'
}

I also created this simple example to explain my problem.
https://github.com/Maksandre/jest-playwright-engine

How it looks in the console
image

I'm using 4 test suites there. If you remove any of them everything will work fine.

@mxschmitt
Copy link
Member

mxschmitt commented Jul 26, 2020

Hi, thanks for filing an issue, I was able to reproduce it. Fix will be provided shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants