Skip to content

[ui/queryBar/tests] attach $elem to DOM so "click" triggers "submit"#13544

Merged
spalger merged 1 commit intoelastic:masterfrom
spalger:fix/query-bar-tests
Aug 17, 2017
Merged

[ui/queryBar/tests] attach $elem to DOM so "click" triggers "submit"#13544
spalger merged 1 commit intoelastic:masterfrom
spalger:fix/query-bar-tests

Conversation

@spalger
Copy link
Copy Markdown
Contributor

@spalger spalger commented Aug 17, 2017

While running the tests with npm run test:dev and then accessing http://localhost:9876/debug.html I was seeing failures in the query_bar tests caused by "click" events not causing a form "submit". I'm not sure the exact scenario that triggers this but in some cases elements need to be in the DOM for things like this to happen.

This change just appends the element to the DOM before compiling it and then removes it from the DOM after each test

Copy link
Copy Markdown
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@spalger spalger merged commit 375ee3b into elastic:master Aug 17, 2017
spalger added a commit that referenced this pull request Aug 17, 2017
spalger added a commit that referenced this pull request Aug 17, 2017
@spalger
Copy link
Copy Markdown
Contributor Author

spalger commented Aug 17, 2017

6.0: 67345bf
6.x/6.1: 97c4dfb

@spalger spalger deleted the fix/query-bar-tests branch August 17, 2017 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants