You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing froala editor inside ember tests it seems to use the editor imported by auto import, which doesn't include any plugin and uses a different configuration from the one used normally by ember-froala-editor (the one provided by its shim)
To get our tests to work correctly, we have had to disable the froala-editor package from ember-auto-import in our ember-cli-build as follows:
autoImport: {
exclude: ['froala-editor']
}
I would suggest that this step either needs to be explicit in the readme, or revise your use of ember-auto-import to follow standard ember conventions and avoid this unnecessary step.
The text was updated successfully, but these errors were encountered:
Are you saying ember-auto-import is trying to import the file again, even though it is included by ember-cli? What kind of tests? Can you provide an example (I'll replicate the issue)?
I'll have to take a look at ember-auto-import again. I know the last time I tried to bring it into this addon it didn't work, due to the froala editor files needing to be imported in a certain order (and optionally based upon config). So it was easier to continue using the ember-cli this.import functionality.
Thank you for coming back so quickly. Essentially when without disabling ember-auto-import from attempting to import ember-froala-editor, the editor is rendered without our build config (so chosen plugins, languages etc).
For us, this was a specific issue in a series of integration component tests we were writing to cover our use of the image plugin and how it is integrated into our server. These failed initially because the image plugin wasn't being loaded in our test environment even though it was fine in development.
I haven't actually debugged the import process in development as the end result works, our test environment (which is a totally standard ember-cli driven app on version 3.20+) just failed to load the froala build config until we disabled ember-auto-import.
Ok, so I think it would be better to instead move this addon to entirely use auto-import. I haven't done this yet from the addon perspective, so I'll have to dig into it. Let me know if you have any suggestions on where to start and such. Thanks!
When importing froala editor inside ember tests it seems to use the editor imported by auto import, which doesn't include any plugin and uses a different configuration from the one used normally by ember-froala-editor (the one provided by its shim)
To get our tests to work correctly, we have had to disable the froala-editor package from ember-auto-import in our ember-cli-build as follows:
I would suggest that this step either needs to be explicit in the readme, or revise your use of ember-auto-import to follow standard ember conventions and avoid this unnecessary step.
The text was updated successfully, but these errors were encountered: