-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add some functional tests for query language switching #13036
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to have those tests, I left just a few very small suggestions as inline comments.
Aside from that I always find the usage of exists
somewhat problematic to check for something to not exist. This is because it means that even the "happy path" has to wait for a timeout. One way to avoid that would be to wait for the page "readiness" by searching for something that ought to exist using find
and then check the length findAll
's return value to check check for the actual test subject. That adds some clutter to the test though, so I am not sure it's worth it. We should implement a library function for that at some point to keep the code clean.
So overall, LGTM
await kibanaServer.uiSettings.replace({ | ||
'dateFormat:tz':'UTC', | ||
'defaultIndex':'logstash-*' | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about factoring out the settings document as a constant to use here and in line 22?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 af6ba48
expect(languageSwitcherExists).to.be(false); | ||
}); | ||
|
||
it('should show a language switcher after it has been enable in the advanced settings', async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"enabled
"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 af6ba48
jenkins, test this |
@Bargs I'd like some info on why the change from the page object model to the services. There's probably good reason, I'm just not up to speed on it yet. |
Lee and I chatted about his question on Slack. Gonna merge this since the tests are green now. |
* Add some functional tests for query language switching
* Add some functional tests for query language switching
Adds a reusable functional test service for the query bar and some tests for the new query language switcher.