[8.8] [Flaky Tests] Switch to ensureAllClosed for dashboard add panel (#159943) (#160186)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Flaky Tests] Switch to ensureAllClosed for dashboard add panel
(#159943)](https://github.com/elastic/kibana/pull/159943)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Devon
Thomson","email":"devon.thomson@elastic.co"},"sourceCommit":{"committedDate":"2023-06-21T16:00:10Z","message":"[Flaky
Tests] Switch to ensureAllClosed for dashboard add panel
(#159943)\n\nSimple fix for some flaky
tests.","sha":"25ebbb67c1d3c173214405a5440a27442f4332c0","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Dashboard","Team:Presentation","loe:hours","release_note:skip","impact:high","backport:prev-minor","v8.9.0"],"number":159943,"url":"https://github.com/elastic/kibana/pull/159943","mergeCommit":{"message":"[Flaky
Tests] Switch to ensureAllClosed for dashboard add panel
(#159943)\n\nSimple fix for some flaky
tests.","sha":"25ebbb67c1d3c173214405a5440a27442f4332c0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159943","number":159943,"mergeCommit":{"message":"[Flaky
Tests] Switch to ensureAllClosed for dashboard add panel
(#159943)\n\nSimple fix for some flaky
tests.","sha":"25ebbb67c1d3c173214405a5440a27442f4332c0"}}]}]
BACKPORT-->

Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
This commit is contained in:
Kibana Machine 2023-06-21 14:31:15 -04:00 committed by GitHub
parent 144056ef08
commit 58fdf1612e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,7 +149,7 @@ export class DashboardAddPanelService extends FtrService {
}
async closeAddPanel() {
await this.flyout.ensureClosed('dashboardAddPanel');
await this.flyout.ensureAllClosed();
}
async filterEmbeddableNames(name: string) {