From 21ed69f35434209d04fb3189365d4da043b331d0 Mon Sep 17 00:00:00 2001 From: "miriam.aparicio" Date: Thu, 24 Oct 2024 16:04:35 +0100 Subject: [PATCH 1/4] unskipp test suite, improve the wait() --- .../e2e/storage_explorer/storage_explorer.cy.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts index 519f309105f5..c509e316543c 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts @@ -36,8 +36,8 @@ const mainApiRequestsToIntercept = [ ]; const mainAliasNames = mainApiRequestsToIntercept.map(({ aliasName }) => `@${aliasName}`); -// flaky test -describe.skip('Storage Explorer', () => { + +describe('Storage Explorer', () => { before(() => { const { rangeFrom, rangeTo } = timeRange; synthtrace.index( @@ -111,11 +111,10 @@ describe.skip('Storage Explorer', () => { cy.loginAsMonitorUser(); cy.visitKibana(storageExplorerHref); + cy.wait(mainAliasNames); }); it('with the correct environment when changing the environment', () => { - cy.wait(mainAliasNames); - cy.getByTestSubj('environmentFilter').type('{selectall}production'); cy.contains('button', 'production').click({ force: true }); @@ -127,19 +126,14 @@ describe.skip('Storage Explorer', () => { }); it('when selecting a different time range and clicking the update button', () => { - cy.wait(mainAliasNames); - cy.selectAbsoluteTimeRange( moment(timeRange.rangeFrom).subtract(5, 'm').toISOString(), moment(timeRange.rangeTo).subtract(5, 'm').toISOString() ); cy.contains('Update').click(); - cy.wait(mainAliasNames); }); it('with the correct lifecycle phase when changing the lifecycle phase', () => { - cy.wait(mainAliasNames); - cy.getByTestSubj('storageExplorerLifecyclePhaseSelect').click(); cy.contains('button', 'Warm').click(); @@ -166,10 +160,10 @@ describe.skip('Storage Explorer', () => { cy.loginAsMonitorUser(); cy.visitKibana(storageExplorerHref); + cy.wait(mainAliasNames); }); it('shows storage details', () => { - cy.wait(mainAliasNames); cy.contains('opbeans-node'); cy.getByTestSubj('storageDetailsButton_opbeans-node').click(); From 1279d78e7945e5fb03841531e4474e802d85ef56 Mon Sep 17 00:00:00 2001 From: "miriam.aparicio" Date: Thu, 24 Oct 2024 20:06:08 +0100 Subject: [PATCH 2/4] rollback wait() changes --- .../e2e/storage_explorer/storage_explorer.cy.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts index c509e316543c..0d7d6a275c52 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts @@ -36,7 +36,7 @@ const mainApiRequestsToIntercept = [ ]; const mainAliasNames = mainApiRequestsToIntercept.map(({ aliasName }) => `@${aliasName}`); - +// flaky test describe('Storage Explorer', () => { before(() => { const { rangeFrom, rangeTo } = timeRange; @@ -111,10 +111,11 @@ describe('Storage Explorer', () => { cy.loginAsMonitorUser(); cy.visitKibana(storageExplorerHref); - cy.wait(mainAliasNames); }); it('with the correct environment when changing the environment', () => { + cy.wait(mainAliasNames); + cy.getByTestSubj('environmentFilter').type('{selectall}production'); cy.contains('button', 'production').click({ force: true }); @@ -126,14 +127,19 @@ describe('Storage Explorer', () => { }); it('when selecting a different time range and clicking the update button', () => { + cy.wait(mainAliasNames); + cy.selectAbsoluteTimeRange( moment(timeRange.rangeFrom).subtract(5, 'm').toISOString(), moment(timeRange.rangeTo).subtract(5, 'm').toISOString() ); cy.contains('Update').click(); + cy.wait(mainAliasNames); }); it('with the correct lifecycle phase when changing the lifecycle phase', () => { + cy.wait(mainAliasNames); + cy.getByTestSubj('storageExplorerLifecyclePhaseSelect').click(); cy.contains('button', 'Warm').click(); @@ -160,10 +166,10 @@ describe('Storage Explorer', () => { cy.loginAsMonitorUser(); cy.visitKibana(storageExplorerHref); - cy.wait(mainAliasNames); }); it('shows storage details', () => { + cy.wait(mainAliasNames); cy.contains('opbeans-node'); cy.getByTestSubj('storageDetailsButton_opbeans-node').click(); From 39460af4d75136c757dc716abfd030494aa24f5b Mon Sep 17 00:00:00 2001 From: "miriam.aparicio" Date: Fri, 25 Oct 2024 11:21:27 +0100 Subject: [PATCH 3/4] change role user login to check if issue is with permissions --- .../cypress/e2e/storage_explorer/storage_explorer.cy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts index 0d7d6a275c52..b3b11f7122f5 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts @@ -65,7 +65,7 @@ describe('Storage Explorer', () => { describe('When navigating to storage explorer with the required permissions', () => { beforeEach(() => { - cy.loginAsMonitorUser(); + cy.loginAsEditorUser(); cy.visitKibana(storageExplorerHref); }); @@ -109,7 +109,7 @@ describe('Storage Explorer', () => { cy.intercept({ pathname: endpoint }).as(aliasName); }); - cy.loginAsMonitorUser(); + cy.loginAsEditorUser(); cy.visitKibana(storageExplorerHref); }); @@ -164,7 +164,7 @@ describe('Storage Explorer', () => { cy.intercept({ pathname: endpoint }).as(aliasName); }); - cy.loginAsMonitorUser(); + cy.loginAsEditorUser(); cy.visitKibana(storageExplorerHref); }); From 220d23acbbe65a8dd9eed96bc294ed7c5808a19d Mon Sep 17 00:00:00 2001 From: "miriam.aparicio" Date: Fri, 25 Oct 2024 15:29:00 +0100 Subject: [PATCH 4/4] rollback change role user --- .../cypress/e2e/storage_explorer/storage_explorer.cy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts index b3b11f7122f5..0d7d6a275c52 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/storage_explorer/storage_explorer.cy.ts @@ -65,7 +65,7 @@ describe('Storage Explorer', () => { describe('When navigating to storage explorer with the required permissions', () => { beforeEach(() => { - cy.loginAsEditorUser(); + cy.loginAsMonitorUser(); cy.visitKibana(storageExplorerHref); }); @@ -109,7 +109,7 @@ describe('Storage Explorer', () => { cy.intercept({ pathname: endpoint }).as(aliasName); }); - cy.loginAsEditorUser(); + cy.loginAsMonitorUser(); cy.visitKibana(storageExplorerHref); }); @@ -164,7 +164,7 @@ describe('Storage Explorer', () => { cy.intercept({ pathname: endpoint }).as(aliasName); }); - cy.loginAsEditorUser(); + cy.loginAsMonitorUser(); cy.visitKibana(storageExplorerHref); });