Skip to content

Commit

Permalink
[8.9] fix Failing test: X-Pack Saved Object Tagging Functional Tests.…
Browse files Browse the repository at this point in the history
…x-pack/test/saved_object_tagging/functional/tests/dashboard_integration·ts - saved objects tagging - functional tests dashboard integration creating allows to select tags (#160782)

# Backport

This will backport the following commits from `main` to `8.9`:
- [fix Failing test: X-Pack Saved Object Tagging Functional
Tests.x-pack/test/saved_object_tagging/functional/tests/dashboard_integration·ts
- saved objects tagging - functional tests dashboard integration
creating allows to select tags for a new dashboard
(#160687)](#160687)

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

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

<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-28T16:14:50Z","message":"fix
Failing test: X-Pack Saved Object Tagging Functional
Tests.x-pack/test/saved_object_tagging/functional/tests/dashboard_integration·ts
- saved objects tagging - functional tests dashboard integration
creating allows to select tags for a new dashboard (#160687)\n\nCloses
https://github.com/elastic/kibana/issues/160583\r\n\r\nflaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2513\r\n\r\nHarden
`dashboard_page.enterDashboardTitleAndClickSave` for retry loops\r\nso
does not try to open save dialog when its already open from
first\r\nsave attempt failure.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"ef7fda2d249f47a86b8e930b577b47990fb334ad","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","v8.9.0","v8.10.0"],"number":160687,"url":"https://github.com/elastic/kibana/pull/160687","mergeCommit":{"message":"fix
Failing test: X-Pack Saved Object Tagging Functional
Tests.x-pack/test/saved_object_tagging/functional/tests/dashboard_integration·ts
- saved objects tagging - functional tests dashboard integration
creating allows to select tags for a new dashboard (#160687)\n\nCloses
https://github.com/elastic/kibana/issues/160583\r\n\r\nflaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2513\r\n\r\nHarden
`dashboard_page.enterDashboardTitleAndClickSave` for retry loops\r\nso
does not try to open save dialog when its already open from
first\r\nsave attempt failure.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"ef7fda2d249f47a86b8e930b577b47990fb334ad"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160687","number":160687,"mergeCommit":{"message":"fix
Failing test: X-Pack Saved Object Tagging Functional
Tests.x-pack/test/saved_object_tagging/functional/tests/dashboard_integration·ts
- saved objects tagging - functional tests dashboard integration
creating allows to select tags for a new dashboard (#160687)\n\nCloses
https://github.com/elastic/kibana/issues/160583\r\n\r\nflaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2513\r\n\r\nHarden
`dashboard_page.enterDashboardTitleAndClickSave` for retry loops\r\nso
does not try to open save dialog when its already open from
first\r\nsave attempt failure.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"ef7fda2d249f47a86b8e930b577b47990fb334ad"}}]}]
BACKPORT-->

Co-authored-by: Nathan Reese <[email protected]>
  • Loading branch information
kibanamachine and nreese authored Jun 28, 2023
1 parent d4f5218 commit 0b6f2e8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/functional/page_objects/dashboard_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,10 @@ export class DashboardPageObject extends FtrService {
*/
public async saveDashboard(
dashboardName: string,
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true },
clickMenuItem = true
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true, exitFromEditMode: true }
) {
await this.retry.try(async () => {
await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions, clickMenuItem);
await this.enterDashboardTitleAndClickSave(dashboardName, saveOptions);

if (saveOptions.needsConfirm) {
await this.ensureDuplicateTitleCallout();
Expand Down Expand Up @@ -516,10 +515,12 @@ export class DashboardPageObject extends FtrService {
*/
public async enterDashboardTitleAndClickSave(
dashboardTitle: string,
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true },
clickMenuItem = true
saveOptions: SaveDashboardOptions = { waitDialogIsClosed: true }
) {
if (clickMenuItem) {
const isSaveModalOpen = await this.testSubjects.exists('savedObjectSaveModal', {
timeout: 2000,
});
if (!isSaveModalOpen) {
await this.testSubjects.click('dashboardSaveMenuItem');
}
const modalDialog = await this.testSubjects.find('savedObjectSaveModal');
Expand Down

0 comments on commit 0b6f2e8

Please sign in to comment.