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
Protractor's waitForAngularEnabled might be a workaround but not the best in terms of Developer Experience for our teams as we don't want them to have to think about this when writing their tests. So we decided to pivot to https://github.com/FlatFilers/Adapter to give us better control and as a workaround, we decided to isolate the part where async tasks may be hanging by instantiating FlatfileImporter outside NgZone so that Protractor won't need to wait for it to stabilize:
What are your thoughts about this solution? Is this something that your engineering team has a solution for or is planning to take a look into?
Also, is there an existing way or a future enhancement that allows us to programmatically load Flatfile without relying on the button component? (e.g. service)? It would be great to have the flexibility to trigger it using other UI components/elements.
Environment
Flatfile Portal
Flatfile Angular Adapter v2.9.6
Steps To Reproduce Issue
Add the flatfile-button component to any angular page
Write a protractor test for the page (not necessarily related to Flatfile)
Test fails as soon as the page loads the FlatfileImporter (Timeout exception)
The text was updated successfully, but these errors were encountered:
jai-fiix
changed the title
flatfile-button component eagerly loading FlatfileImporter breaks E2E tests (Protractor)
FlatfileButtonComponent eagerly loading FlatfileImporter breaks E2E tests (Protractor)
Jan 12, 2022
The issue
As FlatFileImporter is eagerly initialized when the
flatfile-button
component is created, some long-running async tasks within the initialization code cause our existing, non-Flatfile related Protractor tests to fail due to timeout exception. We did not get the chance to pinpoint the exact timer/async process that causes it but it's potentially this one : https://github.com/FlatFilers/Adapter/blob/bcca7f1efc8dbf3648f32bc64530ac90174f8ef3/src/importer.ts#L336 .Protractor's
waitForAngularEnabled
might be a workaround but not the best in terms of Developer Experience for our teams as we don't want them to have to think about this when writing their tests. So we decided to pivot to https://github.com/FlatFilers/Adapter to give us better control and as a workaround, we decided to isolate the part where async tasks may be hanging by instantiating FlatfileImporter outside NgZone so that Protractor won't need to wait for it to stabilize:What are your thoughts about this solution? Is this something that your engineering team has a solution for or is planning to take a look into?
Also, is there an existing way or a future enhancement that allows us to programmatically load Flatfile without relying on the button component? (e.g. service)? It would be great to have the flexibility to trigger it using other UI components/elements.
Environment
Steps To Reproduce Issue
flatfile-button
component to any angular pageThe text was updated successfully, but these errors were encountered: