Skip to content

Add 9 discover interval tests#5949

Merged
LeeDr merged 14 commits intoelastic:masterfrom
LeeDr:addDiscoverIntervalTests
Jan 20, 2016
Merged

Add 9 discover interval tests#5949
LeeDr merged 14 commits intoelastic:masterfrom
LeeDr:addDiscoverIntervalTests

Conversation

@LeeDr
Copy link
Copy Markdown

@LeeDr LeeDr commented Jan 20, 2016

9 New Discover tests for the interval on the chart.

@LeeDr LeeDr mentioned this pull request Jan 20, 2016
7 tasks
@LeeDr
Copy link
Copy Markdown
Author

LeeDr commented Jan 20, 2016

These 9 new tests brings the UI automation count up to 64. The time to run the whole job went from about 8:45 to about 10 minutes.

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Jan 20, 2016

Going to check out reliability on these with some jenkins runs.

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Jan 20, 2016

jenkins, test it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can this common.log instead of maintaining hasFailure state?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@jbudz I refactored this code a bit so that it only logs all the comparison data stringResults if there's a failure. This cleans up the output when the tests pass. So it is using common.log if there's a failure instead of the common.debug for everything.
I think in another PR I'll probably separate the getBarChartData and a new compareArraysWithTolerance method since a few of the visualize tests do the same thing.

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Jan 20, 2016

jenkins, test it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we clean up this log if it isn't needed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Actually, I think I'd like to move that console.log(paths) into the if (hasFailure) block. That output is exactly what I paste as the expected result when I create these tests. That's why the expected results have all that precision that they don't really need.

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Jan 20, 2016

jenkins, test it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thoughts on using end instead of nesting?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm not familiar with using end but looking at the docs I don't think it would help in this case. In the setChartInterval if there's a link we have to click it to get to the select list. And then (regardless of the link) we have to find and click the option we want in the select list. end seems to exit out of one level of scope. I'm probably missing it but I don't see how I would use that in this case.

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Jan 20, 2016

jenkins, test it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do these numbers need to be this precise given the tolerances allowed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No, they could be rounded down to tenths place and be just fine. I just wouldn't round them down to ints. They have all that precision because I'm just copying the actual data (from console.log(paths) as the new expected result. I just didn't manually round them. I guess the best thing might be to round to 1 decimal place in the getChartData method so the returned array has the rounded values. I'd like to do that as a separate PR so that this one doesn't get too big.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@epixa
Copy link
Copy Markdown
Contributor

epixa commented Jan 20, 2016

jenkins, test it

LeeDr pushed a commit that referenced this pull request Jan 20, 2016
@LeeDr LeeDr merged commit 4e71bee into elastic:master Jan 20, 2016
@jbudz jbudz mentioned this pull request Jan 21, 2016
@LeeDr LeeDr deleted the addDiscoverIntervalTests branch January 27, 2016 23:05
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