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

Fails when run with testcafe-live #4

Open
borisdiakur opened this issue Jul 3, 2018 · 2 comments
Open

Fails when run with testcafe-live #4

borisdiakur opened this issue Jul 3, 2018 · 2 comments

Comments

@borisdiakur
Copy link

borisdiakur commented Jul 3, 2018

This is my test:

import axeCheck from 'axe-testcafe'

fixture('My page')
  .page('http://localhost:3210/my-page.html')

test('a11y', async t => {
  await axeCheck(t)
})

Here is how I run the test:

testcafe-live safari myPage.fixture.js

This is the result:

Test run is starting...
 Running tests in:
 - Safari 11.1.0 / Mac OS X 10.13.4

 My page
 ✖ a11y

   1) Error: Cannot prepare tests due to an error.

      The "boundTestRun" option value is expected to be a test controller.

      Browser: Safari 11.1.0 / Mac OS X 10.13.4

         55 |        });
         56 |    })
         57 |});
         58 |
         59 |module.exports = function axeCheck (t, context, options) {
       > 60 |    return hasAxe.with({ boundTestRun: t })()
         61 |        .then(function (result) {
         62 |            if (!result)
         63 |                return injectAxe.with({ boundTestRun: t })();
         64 |
         65 |            return Promise.resolve();

         at axeCheck (.../node_modules/axe-testcafe/index.js:60:23)
         at <anonymous> (.../test/e2e/page/my-page/fixture/myPage.fixture.js:11:37)
         ...

If I run the test with testcafe instead of testcafe-live everything is fine.

@rob4629
Copy link

rob4629 commented Aug 5, 2020

I think this is now resolved. It's working for me when I do testcafe -L safari

@benlind
Copy link

benlind commented Mar 23, 2021

I'm also running into this when using Yarn Workspaces in a monorepo. I had to pull the axe-testcafe into our monorepo as its own package to get this to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants