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

Add some functional tests for query language switching #13036

Merged
merged 2 commits into from
Jul 31, 2017

Conversation

Bargs
Copy link
Contributor

@Bargs Bargs commented Jul 21, 2017

Adds a reusable functional test service for the query bar and some tests for the new query language switcher.

Copy link
Member

@weltenwort weltenwort left a 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-*'
});
Copy link
Member

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?

Copy link
Contributor Author

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 () {
Copy link
Member

Choose a reason for hiding this comment

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

"enabled"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 af6ba48

@Bargs Bargs force-pushed the langSwitchTests branch from af6ba48 to 8333798 Compare July 31, 2017 16:33
@Bargs
Copy link
Contributor Author

Bargs commented Jul 31, 2017

jenkins, test this

@LeeDr
Copy link

LeeDr commented Jul 31, 2017

@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.

@Bargs
Copy link
Contributor Author

Bargs commented Jul 31, 2017

Lee and I chatted about his question on Slack. Gonna merge this since the tests are green now.

@Bargs Bargs merged commit 18f8455 into elastic:master Jul 31, 2017
Bargs added a commit to Bargs/kibana that referenced this pull request Aug 1, 2017
* Add some functional tests for query language switching
Bargs added a commit to Bargs/kibana that referenced this pull request Aug 1, 2017
* Add some functional tests for query language switching
Bargs added a commit that referenced this pull request Aug 1, 2017
* Add some functional tests for query language switching
Bargs added a commit that referenced this pull request Aug 1, 2017
* Add some functional tests for query language switching
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.

3 participants