-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 flaky test by verifying that a search has been saved by checking for a success toast #21302
Closed
Closed
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
15466c2
Add testSubjects.existOrFail() helper. Verify a search has been saved…
cjcenizal af8089b
Apply pattern to other places where we're expecting success toasts.
cjcenizal 3302926
Simplify existsOrFail.
cjcenizal eedebd0
Use terser testSubjects.click() method.
cjcenizal 614cebd
Remove closeToast method. Adding a visualization confirms and closes …
cjcenizal 5d19276
Remove CSS file.
cjcenizal 6eedadf
Fix broken assertions about saveDashboard returning true. Remove unne…
cjcenizal 6caf740
Add brief sleep to testSubjects.click to allow hidden elements to bec…
cjcenizal f3334ef
Fix broken assertions about clickCopyToClipboard returning true.
cjcenizal e752ec0
Add toasts service.
cjcenizal 838e91e
Merge remote-tracking branch 'upstream/master' into test-verify-saved…
cjcenizal d6298a1
Fix dumb mistakes.
cjcenizal 645a3c7
Merge remote-tracking branch 'upstream/master' into test-verify-saved…
cjcenizal 4c26f4c
Fix RBAC tests by checking for presence of failure toast. Reduce exec…
cjcenizal 8912ffe
Merge remote-tracking branch 'upstream/master' into test-verify-saved…
cjcenizal 14e3e75
Wait for toast to be done animating in before dismissing it.
cjcenizal 1260440
Skip flaky visualizations tests.
cjcenizal 4b87d45
Fix dashboard tests which don't use saveDashboard method.
cjcenizal b05fd92
Fix flaky test by ignoring success toast due to heavy browser load.
cjcenizal 9f74eef
Merge remote-tracking branch 'upstream/master' into test-verify-saved…
cjcenizal 8e43781
Fix flaky full screen mode test by clicking on the button, not its text.
cjcenizal 2b64fb8
Merge remote-tracking branch 'upstream/master' into test-verify-saved…
cjcenizal 3847816
Rename ensureSaveSuccess to verifySaveSuccess.
cjcenizal 10d7bfa
Re-enable linked saved searches test.
cjcenizal c953d42
Set absolute time in full screen mode test to allow it to be isolated…
cjcenizal 7a5a82f
Add saveDashboardAndVerify method.
cjcenizal 39bf935
Rename clickCopyToClipboard to clickCopyToClipboardAndVerify.
cjcenizal eb09cbe
Add saveVisualizationAndVerify method.
cjcenizal 37e7864
Update reporting tests to use toasts service.
cjcenizal 9998372
Temporarily remove all animations to see if this helps flakiness.
cjcenizal cb8212e
Use animation-duration instead of animation.
cjcenizal 37ba74b
Merge remote-tracking branch 'upstream/master' into test-verify-saved…
cjcenizal 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 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 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 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<div class="toaster-container"> | ||
<ul class="toaster"> | ||
<li ng-repeat="notif in list" kbn-toast notif="notif"> | ||
<li ng-repeat="notif in list" kbn-toast notif="notif" data-test-subj="bootstrapToast"> | ||
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 old Bootstrap toasts are only used for errors now. This is a way to check for an error outcome. |
||
<div ng-class="notif.getAlertClass()"> | ||
|
||
<span ng-show="notif.count > 1" class="euiBadge euiBadge--default"> | ||
|
This file contains 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -44,18 +44,16 @@ export default function ({ getService, getPageObjects, updateBaselines }) { | |
await PageObjects.dashboard.clickNewDashboard(); | ||
await PageObjects.dashboard.setTimepickerInLogstashDataRange(); | ||
await dashboardAddPanel.addVisualization('Rendering Test: tsvb-ts'); | ||
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. This method now closes its own toast. |
||
await PageObjects.common.closeToast(); | ||
|
||
await PageObjects.dashboard.saveDashboard('tsvb'); | ||
await PageObjects.common.closeToast(); | ||
await PageObjects.dashboard.saveDashboardAndVerify('tsvb'); | ||
|
||
await PageObjects.dashboard.clickFullScreenMode(); | ||
await dashboardPanelActions.toggleExpandPanel(); | ||
|
||
await PageObjects.dashboard.waitForRenderComplete(); | ||
const percentSimilar = await screenshot.compareAgainstBaseline('tsvb_dashboard', updateBaselines); | ||
|
||
await PageObjects.dashboard.clickExitFullScreenLogoButton(); | ||
await PageObjects.dashboard.clickExitFullScreenButton(); | ||
|
||
expect(percentSimilar).to.be.lessThan(0.05); | ||
}); | ||
|
@@ -65,17 +63,15 @@ export default function ({ getService, getPageObjects, updateBaselines }) { | |
await PageObjects.dashboard.clickNewDashboard(); | ||
await PageObjects.dashboard.setTimepickerInLogstashDataRange(); | ||
await dashboardAddPanel.addVisualization('Rendering Test: area with not filter'); | ||
await PageObjects.common.closeToast(); | ||
await PageObjects.dashboard.saveDashboard('area'); | ||
await PageObjects.common.closeToast(); | ||
await PageObjects.dashboard.saveDashboardAndVerify('area'); | ||
|
||
await PageObjects.dashboard.clickFullScreenMode(); | ||
await dashboardPanelActions.toggleExpandPanel(); | ||
|
||
await PageObjects.dashboard.waitForRenderComplete(); | ||
const percentSimilar = await screenshot.compareAgainstBaseline('area_chart', updateBaselines); | ||
|
||
await PageObjects.dashboard.clickExitFullScreenLogoButton(); | ||
await PageObjects.dashboard.clickExitFullScreenButton(); | ||
|
||
// Testing some OS/browser differences were shown to cause .009 percent difference. | ||
expect(percentSimilar).to.be.lessThan(0.05); | ||
|
This file contains 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 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 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 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.
It seemed more efficient and analogous to user behavior to click the button itself instead of one of its children.