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

Basic build failures #245

Open
frykten opened this issue Mar 12, 2021 · 10 comments
Open

Basic build failures #245

frykten opened this issue Mar 12, 2021 · 10 comments

Comments

@frykten
Copy link

frykten commented Mar 12, 2021

Hello!

I am doing very basic and naive testing to see if this addon could be useful for our app.
When starting a new app with the very useful and basic ember-new-output it sometimes seems like there are discrepancies with the stack... (or at least the doc is not entirely true/filled).

More info (all tests are made with this addon current version, i.e. 4.0.2):
First error:
Ember-cli: 3.24.0, nothing more, nothing else, the basic testing runs fine, the basic app runs fine.
When I add this, the ember test does not build and gives:

Build Error (broccoli-persistent-filter:Babel > [Babel: @ember-data/adapter]) in @ember-data/adapter/rest.js
[...]/ember-a11y-testing/@ember-data/adapter/rest.js: Imported DEPRECATE_NAJAX from @ember-data/private-build-infra/deprecations which is not a supported flag.

As a matter of fact, if I remove ember-data, no issues, it works just fine.

Second error:
Ember-cli: 3.20.2, same setup, no issues.
When I add this, no issues. When I try to use the setupGlobalA11yHooks method as shown (and working in ember-cli: 4.24.0), it still builds. However, nothing works because:

Uncaught TypeError: (0 , _testHelpers._registerHook) is not a function
    at setup-global-a11y-hooks.js:20

Presently looking like an error with @ember/test-helpers, which I tried to use with the latest version (currently 2.2.3) and with the latest needed following the Readme (2.0.0). Same problem, always. If I go lower than the needed version, of course, there's an error due to not having the right dependencies.

@rwjblue
Copy link
Member

rwjblue commented Mar 12, 2021

Hmm, that first error seems unrelated to this addon (looks like a bug that was reported a while back on ember-data that has to do with preserved cache after updating/changing ember-data versions).

RE: the second error, can you share the full stack trace (or even just the error message)? It's quite difficult to reason about with just that one line number...

@frykten
Copy link
Author

frykten commented Mar 15, 2021

Sorry, I messed up the Markdown...
The error log, followed by the beginning of the stacktrace (should be easier to ready with both) is

Uncaught TypeError: (0 , _testHelpers._registerHook) is not a function
    at setup-global-a11y-hooks.js:20

@rwjblue
Copy link
Member

rwjblue commented Mar 16, 2021

Hmm, maybe you are not testing with @ember/[email protected] or higher?

@frykten
Copy link
Author

frykten commented Mar 16, 2021

Nono: tried with @ember/[email protected], @ember/[email protected] and we get this error. When removing the import, we get the righteous "need @ember/[email protected] or higher"-kinda message.
Same with a new light project or an old heavy one (like the one we have at work).

I'll try to find time this week to debug a tad if other stacks work/don't.

@rwjblue
Copy link
Member

rwjblue commented Mar 16, 2021

Ya, seems like that might be necessary. @ember/test-helpers definitely has that function exported from its entry point from 2.0.0 and higher.

https://github.com/emberjs/ember-test-helpers/blob/v2.0.0/addon-test-support/@ember/test-helpers/index.ts#L26

Maybe there are multiple versions of @ember/test-helpers installed and the older version is clobbering the newer version?

@scalvert
Copy link
Contributor

Ya a yarn why @ember/test-helpers would help here.

@ctcpip
Copy link
Contributor

ctcpip commented May 17, 2021

ember-qunit didn't update to 2.0 of test-helpers until version 5

├── @ember/[email protected] 
└─┬ [email protected]
  └── @ember/[email protected]

@scalvert
Copy link
Contributor

I think you probably don't want to mix and match these. You'll want to be on ember-qunit@~5.x and @ember/test-helpers@~2.x. You can follow this guide to migrate.

@ctcpip
Copy link
Contributor

ctcpip commented May 18, 2021

I think you probably don't want to mix and match these. You'll want to be on ember-qunit@~5.x and @ember/test-helpers@~2.x. You can follow this guide to migrate.

well it's impossible to mix and match them. the build fails. this project needs to update the requirements to mention that qunit 5.x is required, which currently it says nothing about. furthermore, the changelog should mention this is a breaking change for v4. I may submit a PR for that, but I can't right now.

@acorncom
Copy link
Contributor

Is this still an issue? I've used ember-a11y-testing on multiple apps in the last year without problems. Seems like we could probably close?

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

5 participants