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

Fix test spec.5 to close inappbrowser after loadstop event #440

Merged
merged 1 commit into from
Mar 6, 2019

Conversation

knight9999
Copy link

@knight9999 knight9999 commented Mar 6, 2019

Platforms affected

all platforms (but test only)

Motivation and Context

The spec 'inappbrowser.spec.5 should support exit event' in cordova-plugin-inappbrowser-tests.tests is testing exit event.
But before this PR, close method may be fired before InAppBrowser opens a URL.
Then cordova-windows, the corresponding test (spec.6) sometimes fails, the InAppBrowser is kept opened.
Then the next spec (spec.6) fails.
2019-03-06 11 17 55

This PR is to fix this issue.

Description

Instead of calling close() method synchronously,
I call close() method in callback of loadstop event.

Testing

With the help of cordova-mobile-spec, I confirmed all cordova-plugin-inappbrowser-tests.tests work well.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

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

Successfully merging this pull request may close these issues.

3 participants