From eb4b62f4474616e208884c329a753c43ab75ee08 Mon Sep 17 00:00:00 2001 From: sumukhswamy Date: Wed, 21 Aug 2024 13:22:07 -0700 Subject: [PATCH 1/2] added fix for integ test failures Signed-off-by: sumukhswamy --- .../reports-dashboards/02-edit.spec.js | 73 +++++++++++++++++-- 1 file changed, 68 insertions(+), 5 deletions(-) diff --git a/cypress/integration/plugins/reports-dashboards/02-edit.spec.js b/cypress/integration/plugins/reports-dashboards/02-edit.spec.js index 152094d61..ae84e4b00 100644 --- a/cypress/integration/plugins/reports-dashboards/02-edit.spec.js +++ b/cypress/integration/plugins/reports-dashboards/02-edit.spec.js @@ -17,6 +17,22 @@ describe('Cypress', () => { cy.wait(12500); + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/dashboard`).as( + 'dashboard' + ); + + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/visualization`).as( + 'visualization' + ); + + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/search`).as( + 'search' + ); + + cy.intercept('GET', `${BASE_PATH}/api/observability/notebooks/`).as( + 'notebook' + ); + cy.get('#reportDefinitionDetailsLink').first().click({ force: true }); cy.get('#editReportDefinitionButton').should('exist'); @@ -26,14 +42,19 @@ describe('Cypress', () => { cy.url().should('include', 'edit'); cy.wait(1000); + cy.wait('@dashboard') + cy.wait('@visualization') + cy.wait('@search') + cy.wait('@notebook') + // update the report name - cy.get('#reportSettingsName').type(' update name'); + cy.get('#reportSettingsName').type('{selectall}{backspace} update name'); // update report description - cy.get('#reportSettingsDescription').type(' update description'); + cy.get('#reportSettingsDescription').type('{selectall}{backspace} update description'); - cy.get('#editReportDefinitionButton').click({ force: true }); + cy.get('#editReportDefinitionButton').contains('Save Changes').trigger('mouseover').click({ force: true }); cy.wait(12500); @@ -52,6 +73,22 @@ describe('Cypress', () => { cy.wait(12500); + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/dashboard`).as( + 'dashboard' + ); + + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/visualization`).as( + 'visualization' + ); + + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/search`).as( + 'search' + ); + + cy.intercept('GET', `${BASE_PATH}/api/observability/notebooks/`).as( + 'notebook' + ); + cy.get('#reportDefinitionDetailsLink').first().click(); cy.get('#editReportDefinitionButton').should('exist'); @@ -61,12 +98,17 @@ describe('Cypress', () => { cy.url().should('include', 'edit'); cy.wait(1000); + + cy.wait('@dashboard') + cy.wait('@visualization') + cy.wait('@search') + cy.wait('@notebook') cy.get('#reportDefinitionTriggerTypes > div:nth-child(2)').click({ force: true, }); cy.get('#Schedule').check({ force: true }); - cy.get('#editReportDefinitionButton').click({ force: true }); + cy.get('#editReportDefinitionButton').contains('Save Changes').trigger('mouseover').click({ force: true }); cy.wait(12500); @@ -85,6 +127,22 @@ describe('Cypress', () => { cy.wait(12500); + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/dashboard`).as( + 'dashboard' + ); + + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/visualization`).as( + 'visualization' + ); + + cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/search`).as( + 'search' + ); + + cy.intercept('GET', `${BASE_PATH}/api/observability/notebooks/`).as( + 'notebook' + ); + cy.get('#reportDefinitionDetailsLink').first().click(); cy.get('#editReportDefinitionButton').should('exist'); @@ -95,11 +153,16 @@ describe('Cypress', () => { cy.wait(1000); + cy.wait('@dashboard') + cy.wait('@visualization') + cy.wait('@search') + cy.wait('@notebook') + cy.get('#reportDefinitionTriggerTypes > div:nth-child(1)').click({ force: true, }); - cy.get('#editReportDefinitionButton').click({ force: true }); + cy.get('#editReportDefinitionButton').contains('Save Changes').trigger('mouseover').click({ force: true }); cy.wait(12500); From 25d9825b11848110a79488b0f7f1b6a23591ff22 Mon Sep 17 00:00:00 2001 From: sumukhswamy Date: Wed, 21 Aug 2024 13:27:10 -0700 Subject: [PATCH 2/2] linter changes Signed-off-by: sumukhswamy --- .../reports-dashboards/02-edit.spec.js | 86 +++++++++++-------- 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/cypress/integration/plugins/reports-dashboards/02-edit.spec.js b/cypress/integration/plugins/reports-dashboards/02-edit.spec.js index ae84e4b00..53ced4565 100644 --- a/cypress/integration/plugins/reports-dashboards/02-edit.spec.js +++ b/cypress/integration/plugins/reports-dashboards/02-edit.spec.js @@ -17,13 +17,15 @@ describe('Cypress', () => { cy.wait(12500); - cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/dashboard`).as( - 'dashboard' - ); + cy.intercept( + 'GET', + `${BASE_PATH}/api/reporting/getReportSource/dashboard` + ).as('dashboard'); - cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/visualization`).as( - 'visualization' - ); + cy.intercept( + 'GET', + `${BASE_PATH}/api/reporting/getReportSource/visualization` + ).as('visualization'); cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/search`).as( 'search' @@ -42,19 +44,23 @@ describe('Cypress', () => { cy.url().should('include', 'edit'); cy.wait(1000); - cy.wait('@dashboard') - cy.wait('@visualization') - cy.wait('@search') - cy.wait('@notebook') - + cy.wait('@dashboard'); + cy.wait('@visualization'); + cy.wait('@search'); + cy.wait('@notebook'); // update the report name cy.get('#reportSettingsName').type('{selectall}{backspace} update name'); // update report description - cy.get('#reportSettingsDescription').type('{selectall}{backspace} update description'); + cy.get('#reportSettingsDescription').type( + '{selectall}{backspace} update description' + ); - cy.get('#editReportDefinitionButton').contains('Save Changes').trigger('mouseover').click({ force: true }); + cy.get('#editReportDefinitionButton') + .contains('Save Changes') + .trigger('mouseover') + .click({ force: true }); cy.wait(12500); @@ -73,13 +79,15 @@ describe('Cypress', () => { cy.wait(12500); - cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/dashboard`).as( - 'dashboard' - ); + cy.intercept( + 'GET', + `${BASE_PATH}/api/reporting/getReportSource/dashboard` + ).as('dashboard'); - cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/visualization`).as( - 'visualization' - ); + cy.intercept( + 'GET', + `${BASE_PATH}/api/reporting/getReportSource/visualization` + ).as('visualization'); cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/search`).as( 'search' @@ -99,16 +107,19 @@ describe('Cypress', () => { cy.wait(1000); - cy.wait('@dashboard') - cy.wait('@visualization') - cy.wait('@search') - cy.wait('@notebook') + cy.wait('@dashboard'); + cy.wait('@visualization'); + cy.wait('@search'); + cy.wait('@notebook'); cy.get('#reportDefinitionTriggerTypes > div:nth-child(2)').click({ force: true, }); cy.get('#Schedule').check({ force: true }); - cy.get('#editReportDefinitionButton').contains('Save Changes').trigger('mouseover').click({ force: true }); + cy.get('#editReportDefinitionButton') + .contains('Save Changes') + .trigger('mouseover') + .click({ force: true }); cy.wait(12500); @@ -127,13 +138,15 @@ describe('Cypress', () => { cy.wait(12500); - cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/dashboard`).as( - 'dashboard' - ); + cy.intercept( + 'GET', + `${BASE_PATH}/api/reporting/getReportSource/dashboard` + ).as('dashboard'); - cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/visualization`).as( - 'visualization' - ); + cy.intercept( + 'GET', + `${BASE_PATH}/api/reporting/getReportSource/visualization` + ).as('visualization'); cy.intercept('GET', `${BASE_PATH}/api/reporting/getReportSource/search`).as( 'search' @@ -153,16 +166,19 @@ describe('Cypress', () => { cy.wait(1000); - cy.wait('@dashboard') - cy.wait('@visualization') - cy.wait('@search') - cy.wait('@notebook') + cy.wait('@dashboard'); + cy.wait('@visualization'); + cy.wait('@search'); + cy.wait('@notebook'); cy.get('#reportDefinitionTriggerTypes > div:nth-child(1)').click({ force: true, }); - cy.get('#editReportDefinitionButton').contains('Save Changes').trigger('mouseover').click({ force: true }); + cy.get('#editReportDefinitionButton') + .contains('Save Changes') + .trigger('mouseover') + .click({ force: true }); cy.wait(12500);