-
Notifications
You must be signed in to change notification settings - Fork 9
Multi chart rendering #2750
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
Multi chart rendering #2750
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,11 +100,13 @@ public static class QueryChartPanelFinder extends WebDriverComponentFinder<Query | |
| { | ||
| private final QueryGrid _queryGrid; | ||
| private final Locator.XPathLocator _baseLocator = Locator.tagWithClass("div", "chart-panel"); | ||
| private final String _name; | ||
|
|
||
| public QueryChartPanelFinder(WebDriver driver, QueryGrid queryGrid) | ||
| public QueryChartPanelFinder(WebDriver driver, QueryGrid queryGrid, String name) | ||
| { | ||
| super(driver); | ||
| _queryGrid = queryGrid; | ||
| _name = name; | ||
|
Comment on lines
+105
to
+109
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The chart name shouldn't be mandatory. The finder should find all of the charts by default and there should be a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But if we only ever want to find a chart by name, then why should it find all by default? Put another way, why make a default that isn't used? Same goes for QueryChartPanel, why add a getName method that isn't used?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a fair point, I was mostly commenting on the typical design of component finders. If we ever have other needs for this, refactoring the finder is easy enough. |
||
| } | ||
|
|
||
| @Override | ||
|
|
@@ -116,7 +118,8 @@ protected QueryChartPanel construct(WebElement el, WebDriver driver) | |
| @Override | ||
| protected Locator locator() | ||
| { | ||
| return _baseLocator; | ||
| Locator.XPathLocator headingLocator = Locator.tagWithClass("div", "chart-panel__heading").withChild(Locator.tagWithClass("div", "chart-panel__heading-title").containing(_name)); | ||
| return _baseLocator.withChild(headingLocator); | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.