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 hidden ticks when using log scale #21507

Merged
merged 3 commits into from
Aug 2, 2018

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Jul 31, 2018

This PR fix #21499.

The vertical axis scale has an inverted range [max,min] and we need to compute the absolute range.

Adds also functional tests for Line, Area and Bar charts that checks the chart visualize correctly all the required Y Axis ticks independently on the scale type.

The vertical axis scale has an inverted range (max, min) and we need to compute the absolute scale width instead.
@markov00 markov00 added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) regression v7.0.0 v6.4.0 and removed regression labels Jul 31, 2018
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@timroes timroes added bug Fixes for quality problems that affect the customer experience v6.5.0 labels Aug 1, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@markov00 markov00 added the WIP Work in progress label Aug 1, 2018
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@timroes timroes requested a review from ppisljar August 2, 2018 06:20
await PageObjects.visualize.clickYAxisAdvancedOptions(axisId);
await PageObjects.visualize.changeYAxisFilterLabelsCheckbox(axisId, false);
await PageObjects.visualize.clickGo();
await PageObjects.header.waitUntilLoadingHasFinished();
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove the waitUntilLoadingHasFInished behind all clickGo, since the clickGo function should (and does) wait for all rendering that is needed before finishing.

Copy link
Contributor

@timroes timroes left a comment

Choose a reason for hiding this comment

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

Looks good to me, Marco showed me, that it worked while pair reviewing. Just a minor thing about removing something from functional tests, after that good to merge.

@@ -153,5 +155,85 @@ export default function ({ getService, getPageObjects }) {
const sideEditorExists = await PageObjects.visualize.getSideEditorExists();
expect(sideEditorExists).to.be(false);
});

describe('switch between Y axis scale types', () => {
before(initAreaChart);
Copy link
Member

Choose a reason for hiding this comment

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

why do we initAreaChart twice ? (before describe and before it in this describe)

Copy link
Member

Choose a reason for hiding this comment

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

could we make all this tests go on without re-initing the charts ? this way the tests will run much faster. if one fails all the subsequent ones will fail as well, but i think that's not the problem as the first failing one already indicated issues with axis scaling.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've just followed what was already there in functional tests on vertical_bar_chart test.
I will remove all additional before calls and check if this still works correctly.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ppisljar I've take a better look at other tests code: I think there are two way to manage this:

  • reintialize the chart (having a clean state on the test)
  • go back to a clean state on the test like (reopen the saved chart or similar) because in the case of the areachart for example, the last test opens the visualization in embed mode. We need to go back to the editor before proceeding.
    Reinitialization seems to be the clean way to work (and you are not dependent on the side effects produced by other tests (this will also allows you to avoid breaking tests when adding new tests without taking care where to put your test.
    What do you think?

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

using horizontal bar chart with log scale doesn't work

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

we zoomed with marco about this and found out that i hit an unrelated bug: #21589

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

markov00 added a commit to markov00/kibana that referenced this pull request Aug 3, 2018
* Add support for vertical axis

The vertical axis scale has an inverted range (max, min) and we need to compute the absolute scale width instead.

* Add functional test for Y axis scale type  switching

* Remove unnecessary waitUntilLoadingHasFinished
markov00 added a commit to markov00/kibana that referenced this pull request Aug 3, 2018
* Add support for vertical axis

The vertical axis scale has an inverted range (max, min) and we need to compute the absolute scale width instead.

* Add functional test for Y axis scale type  switching

* Remove unnecessary waitUntilLoadingHasFinished
markov00 added a commit that referenced this pull request Aug 3, 2018
…k tests because of possible flakyness (#21641) (#21647)

* Fix hidden ticks when using log scale (#21507)

* Add support for vertical axis

The vertical axis scale has an inverted range (max, min) and we need to compute the absolute scale width instead.

* Add functional test for Y axis scale type  switching

* Remove unnecessary waitUntilLoadingHasFinished

* Skip scale tick tests because of possible flakyness (#21641)
markov00 added a commit that referenced this pull request Aug 3, 2018
…k tests because of possible flakyness (#21641) (#21648)

* Fix hidden ticks when using log scale (#21507)

* Add support for vertical axis

The vertical axis scale has an inverted range (max, min) and we need to compute the absolute scale width instead.

* Add functional test for Y axis scale type  switching

* Remove unnecessary waitUntilLoadingHasFinished

* Skip scale tick tests because of possible flakyness (#21641)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) v6.4.0 v6.5.0 v7.0.0 WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Y Axis ticks not showing when using log scale
4 participants