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

iframe script loading #70

Open
awyl opened this issue Apr 27, 2017 · 2 comments
Open

iframe script loading #70

awyl opened this issue Apr 27, 2017 · 2 comments

Comments

@awyl
Copy link

awyl commented Apr 27, 2017

Hi,

Is there a way to wait for scripts loading done before proceeding to testing for iframe mount?

My pages currently either using async script loading or scripts are at the bottom. The tests are either incorrectly passing or failed if a test clicks on a button bind with js event. It is because the scripts aren't loaded yet.

Thanks!

@dereke
Copy link
Member

dereke commented May 14, 2017

We don't currently have a way of knowing when the page has loaded in the iframe though that may be something worth looking into.

In the meantime a less than ideal solution would be to check that an element or text exists before proceeding with your test. I'll leave this open to remind me to look into it at some point.

@awyl
Copy link
Author

awyl commented May 22, 2017

I was looking into it. I found this issue karma-runner/karma-jasmine#77

The suggested workaround works. The tests will run after dom ready.

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

No branches or pull requests

2 participants