-
Notifications
You must be signed in to change notification settings - Fork 4
Replace hospscotch tooltip JS library for QC Plots with tippy #1172
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
Open
ankurjuneja
wants to merge
11
commits into
develop
Choose a base branch
from
fb_tippy
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
41be46c
Replace hospscotch tooltip JS library for QC Plots with tippy
ankurjuneja e22facd
put back other tooltips
ankurjuneja 74ac8eb
Merge branch 'develop' into fb_tippy
ankurjuneja c1bc559
fix testClickingChromatogramPlotFromQCPlot
ankurjuneja 2868e22
update qc plot data points tooltip locators in tests
ankurjuneja ddd5240
update qc plot data points tooltip locators in tests
ankurjuneja 11f07b9
replace tooltip library in qc summary stats
ankurjuneja 78e2e02
remove hopscotch references
ankurjuneja a283545
switch hopscotch references in tests
ankurjuneja c6261d1
remove all hopscotch references
ankurjuneja 986b011
remove all hopscotch references
ankurjuneja File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,6 @@ private void doAndWaitForUpdate(Runnable action) | |
| { | ||
| WebElement plot = waitForPlotPanel(); | ||
|
|
||
| closeBubble(); | ||
| action.run(); | ||
|
|
||
| getWrapper().shortWait().until(ExpectedConditions.stalenessOf(plot)); | ||
|
|
@@ -159,7 +158,6 @@ private void setMetricType(MetricType metricType, MetricType currentMetricType, | |
| { | ||
| doAndWaitForUpdate(() -> | ||
| { | ||
| // scroll to prevent inadvertent hover over QC Summary webpart items that show hopscotch tooltips | ||
| getWrapper().scrollIntoView(metricTypeCombo, true); | ||
| getWrapper()._ext4Helper.selectComboBoxItem(metricTypeCombo, metricType.toString()); | ||
| }); | ||
|
|
@@ -530,10 +528,11 @@ public WebElement openExclusionBubble(String acquiredDate) | |
| WebElement point = getPointByAcquiredDate(acquiredDate); | ||
| ScrollUtils.scrollIntoView(point, center, center); | ||
| getWrapper().mouseOverWithoutScrolling(point); | ||
| return getWrapper().isElementPresent(Locator.tagWithClass("div", "x4-form-display-field") | ||
| .containing(acquiredDate.substring(0, 16))); // drop seconds part (e.g. "2013-08-12 04:54") for trailing mean/CV | ||
| return getWrapper().isElementPresent(Locator.tagWithClass("div", "qc-plot-hover-panel") | ||
| .withDescendant(Locator.tagWithClass("div", "qc-hover-field") | ||
| .containing(acquiredDate.substring(0, 16)))); // drop seconds part (e.g. "2013-08-12 04:54") for trailing mean/CV | ||
| }); | ||
| return elementCache().hopscotchBubble.findElement(getDriver()); | ||
| return elementCache().tippyBubble.findElement(getDriver()); | ||
| } | ||
|
|
||
| @LogMethod | ||
|
|
@@ -676,21 +675,6 @@ public void checkPlotType(QCPlotType plotType) | |
| } | ||
| } | ||
|
|
||
| private void dismissTooltip() | ||
| { | ||
| int halfWidth = elementCache().webPartTitle.getSize().getWidth() / 2; | ||
| int xOffset = elementCache().webPartTitle.getLocation().getX() + halfWidth; // distance to edge of window from center of element | ||
| getWrapper().scrollIntoView(elementCache().webPartTitle); | ||
| new Actions(getDriver()) | ||
| .moveToElement(elementCache().webPartTitle) // Start at the center of the title | ||
| .moveByOffset(-xOffset, 0) // Move all the way to the left edge of the window | ||
| .perform(); // Should dismiss hover tooltips | ||
| WebElement closeHopscotch = Locator.byClass("hopscotch-close").findElementOrNull(getDriver()); | ||
| if (closeHopscotch != null && closeHopscotch.isDisplayed()) | ||
| closeHopscotch.click(); | ||
| getWrapper().shortWait().until(ExpectedConditions.invisibilityOfElementLocated(Locator.byClass("hopscotch-callout"))); | ||
| } | ||
|
|
||
| public boolean isPlotTypeSelected(QCPlotType plotType) | ||
| { | ||
| return getCurrentQCPlotTypes().contains(plotType); | ||
|
|
@@ -708,37 +692,24 @@ public void checkAllPlotTypes(boolean selected) | |
| } | ||
| } | ||
|
|
||
| public void closeBubble() | ||
| { | ||
| Optional<WebElement> optCloseButton = elementCache().hopscotchBubbleClose.findOptionalElement(getDriver()); | ||
| optCloseButton.ifPresent(closeButton -> { | ||
| WebDriverWait wait = new WebDriverWait(getDriver(), Duration.ofSeconds(2)); | ||
| wait.until(ExpectedConditions.elementToBeClickable(closeButton)).click(); | ||
| wait.until(ExpectedConditions.stalenessOf(closeButton)); | ||
| }); | ||
| } | ||
|
|
||
| public void goToPreviousPage() | ||
| { | ||
| closeBubble(); | ||
| getWrapper().doAndWaitForPageToLoad(() -> elementCache().paginationPrevBtn.findElement(this).click()); | ||
| } | ||
|
|
||
| public void goToNextPage() | ||
| { | ||
| closeBubble(); | ||
| getWrapper().doAndWaitForPageToLoad(() -> elementCache().paginationNextBtn.findElement(this).click()); | ||
| } | ||
|
|
||
| public Locator.XPathLocator getBubble() | ||
| { | ||
| return Locator.byClass("hopscotch-bubble-container"); | ||
| return Locator.tagWithClass("div", "qc-plot-hover-panel"); | ||
| } | ||
|
|
||
| public Locator.XPathLocator getBubbleContent() | ||
| { | ||
| Locator.XPathLocator hopscotchBubble = Locator.byClass("hopscotch-bubble-container"); | ||
| return hopscotchBubble.append(Locator.byClass("hopscotch-bubble-content").append(Locator.byClass("hopscotch-content").withText())); | ||
| return Locator.tagWithClass("div", "qc-plot-hover-panel"); | ||
| } | ||
|
|
||
| public ConfigureMetricsUIPage clickConfigureQCMetrics() | ||
|
|
@@ -970,8 +941,7 @@ public class Elements extends BodyWebPart<?>.ElementCache | |
| Locator.CssLocator paginationPrevBtn = Locator.css(".qc-paging-prev"); | ||
| Locator.CssLocator paginationNextBtn = Locator.css(".qc-paging-next"); | ||
| Locator.CssLocator svgBackgrounds = Locator.css("svg g.brush rect.background"); | ||
| Locator.XPathLocator hopscotchBubble = Locator.byClass("hopscotch-bubble-container"); | ||
| Locator.XPathLocator hopscotchBubbleClose = Locator.byClass("hopscotch-bubble-close"); | ||
| Locator.XPathLocator tippyBubble = Locator.tagWithClass("div", "qc-plot-hover-panel"); | ||
|
Contributor
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. Should this use |
||
|
|
||
| List<WebElement> findSeriesPanels() | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Seems redundant with
getBubble()now.