From a81941f9ebc4617c06d189bff9739aff0676224d Mon Sep 17 00:00:00 2001 From: karanh37 <33024356+karanh37@users.noreply.github.com> Date: Wed, 24 May 2023 18:14:21 +0530 Subject: [PATCH] fix: resolve skipped cypress tests (#11722) * fix: update cypress tests * fix: cypress * fix: font loading issue for production * fix: cypress tests * fix: alert cypress * fix: add enter in operation * fix: alert cypress * remove un-neccessary check for add dbt ingestion title --------- Co-authored-by: Shailesh Parmar --- .../e2e/AddNewService/redshiftWithDBT.spec.js | 7 +++---- .../resources/ui/cypress/e2e/Pages/Alerts.spec.js | 10 ++++++---- .../cypress/e2e/Pages/DataQualityAndProfiler.spec.js | 4 ++-- .../ui/cypress/e2e/Pages/EntityDetails.spec.js | 8 ++++---- .../resources/ui/cypress/e2e/Pages/Glossary.spec.js | 4 +++- .../resources/ui/cypress/e2e/Pages/Roles.spec.js | 1 + .../ui/cypress/e2e/Pages/redirections.spec.js | 12 +----------- .../resources/ui/src/pages/MyDataPage/myData.less | 4 ---- 8 files changed, 20 insertions(+), 30 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/redshiftWithDBT.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/redshiftWithDBT.spec.js index 852ef9147ac..67025fa0774 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/redshiftWithDBT.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/redshiftWithDBT.spec.js @@ -172,7 +172,6 @@ describe('RedShift Ingestion', () => { verifyResponseStatusCode('@getIngestionPipelineStatus', 200); // Add DBT ingestion - cy.contains('Add dbt Ingestion').should('be.visible'); cy.get('[data-testid="dbt-source"]').should('be.visible').click(); cy.get('.ant-select-item-option-content') .contains('HTTP Config Source') @@ -217,7 +216,7 @@ describe('RedShift Ingestion', () => { }); }); - it.skip('Validate DBT is ingested properly', () => { + it('Validate DBT is ingested properly', () => { // Verify DBT tags interceptURL( 'GET', @@ -227,12 +226,12 @@ describe('RedShift Ingestion', () => { cy.get('[data-testid="governance"]') .should('exist') .should('be.visible') - .click({ force: true }); + .click(); cy.get('[data-testid="appbar-item-tags"]') .should('exist') .should('be.visible') - .click(); + .click({ waitForAnimations: true }); verifyResponseStatusCode('@getTagList', 200); // Verify DBT tag category is added diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Alerts.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Alerts.spec.js index bf6de165379..531e797b7dc 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Alerts.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Alerts.spec.js @@ -101,9 +101,10 @@ describe('Alerts page should work properly', () => { // Enter email cy.get('#subscriptionConfig_receivers') .click() - .type('testuser@openmetadata.org'); + .type('testuser@openmetadata.org') + .type('{enter}'); // Click save - cy.get('[data-testid="save"]').click(); + cy.get('[data-testid="save"]').scrollIntoView().click(); verifyResponseStatusCode('@createAlert', 201); toastNotification('Alerts created successfully.'); cy.get('table').should('contain', alertForAllAssets); @@ -246,9 +247,10 @@ describe('Alerts page should work properly', () => { // Enter email cy.get('#subscriptionConfig_receivers') .click() - .type('testuser@openmetadata.org'); + .type('testuser@openmetadata.org') + .type('{enter}'); // Click save - cy.get('[data-testid="save"]').click(); + cy.get('[data-testid="save"]').scrollIntoView().click(); toastNotification('Alerts created successfully.'); cy.get('table').should('contain', TEST_CASE.testCaseAlert); cy.get('.ant-table-cell') diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataQualityAndProfiler.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataQualityAndProfiler.spec.js index 89716d803de..2dc3c0d9e86 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataQualityAndProfiler.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataQualityAndProfiler.spec.js @@ -423,7 +423,7 @@ describe('Data Quality and Profiler should work properly', () => { cy.get('.ant-modal-footer').contains('Cancel').click(); }); - it.skip('Delete Column Test Case should work properly', () => { + it('Delete Column Test Case should work properly', () => { interceptURL('GET', '/api/v1/dataQuality/testCases?*', 'testCase'); goToProfilerTab(); verifyResponseStatusCode('@testCase', 200); @@ -437,7 +437,7 @@ describe('Data Quality and Profiler should work properly', () => { .click(); [columnTestName, nonTeamTypeColumnTestName].map((test) => { - cy.get(`[data-testid="${test}"]`).should('be.visible'); + cy.get(`[data-testid="${test}"]`).scrollIntoView().should('be.visible'); cy.get(`[data-testid="delete-${test}"]`) .scrollIntoView() .should('be.visible') diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/EntityDetails.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/EntityDetails.spec.js index d935616c2b4..24af6a1bcad 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/EntityDetails.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/EntityDetails.spec.js @@ -311,19 +311,19 @@ describe('Entity Details Page', () => { cy.clickOnLogo(); }; - it.skip('Add Owner, Tier and tags for entity', () => { + it('Add Owner, Tier and tags for entity', () => { addOwnerTierAndTag(DELETE_ENTITY.table); }); - it.skip('Remove Owner and Tier for entity', () => { + it('Remove Owner and Tier for entity', () => { removeOwnerAndTier(DELETE_ENTITY.table); }); - it.skip('Add and check active announcement for the entity', () => { + it('Add and check active announcement for the entity', () => { addAnnouncement(DELETE_ENTITY.table); }); - it.skip('Delete entity flow should work properly', () => { + it('Delete entity flow should work properly', () => { deleteEntity(DELETE_ENTITY.table); }); }); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js index 04bd75534a4..e6211ea3201 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js @@ -187,7 +187,9 @@ const updateSynonyms = (uSynonyms) => { .click({ force: true, multiple: true }); cy.get('.ant-select-selection-overflow') .should('exist') - .type(uSynonyms.join('{enter}')); + .type(uSynonyms.join('{enter}')) + .type('{enter}'); + interceptURL('PATCH', '/api/v1/glossaryTerms/*', 'saveSynonyms'); cy.get('[data-testid="save-synonym-btn"]').should('be.visible').click(); verifyResponseStatusCode('@saveSynonyms', 200); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Roles.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Roles.spec.js index c2d028b56db..147393cb6f8 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Roles.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Roles.spec.js @@ -161,6 +161,7 @@ describe('Roles page should work properly', () => { cy.get('table').should('be.visible').should('contain', roleName); cy.get(`[data-row-key="${roleName}"]`) .find('[data-testid="plus-more-count"]') + .scrollIntoView() .should('be.visible') .click(); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/redirections.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/redirections.spec.js index e9be9312d66..bc1f9172a0d 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/redirections.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/redirections.spec.js @@ -13,7 +13,6 @@ import { BASE_URL } from '../../constants/constants'; import { - LEFT_PANEL_DETAILS, NAVBAR_DETAILS, SETTINGS_LEFT_PANEL, } from '../../constants/redirections.constants'; @@ -43,16 +42,7 @@ describe('Redirection link should work properly', () => { }); }); - it.skip(`Check mydata redirection mydata links on left panel.`, () => { - Object.values(LEFT_PANEL_DETAILS).map((leftpanel) => { - cy.get(leftpanel.testid).should('be.visible').click(); - validateURL(leftpanel.url); - cy.clickOnLogo(); - validateURL(`${BASE_URL}/my-data`); - }); - }); - - it.skip('Check redirection links on settings page', () => { + it('Check redirection links on settings page', () => { cy.get(NAVBAR_DETAILS.settings.testid).should('be.visible').click(); Object.values(SETTINGS_LEFT_PANEL).map((settingsLeftPanel) => { cy.get(settingsLeftPanel.testid) diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/MyDataPage/myData.less b/openmetadata-ui/src/main/resources/ui/src/pages/MyDataPage/myData.less index d138c7f137d..fae1f5a6c22 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/MyDataPage/myData.less +++ b/openmetadata-ui/src/main/resources/ui/src/pages/MyDataPage/myData.less @@ -33,10 +33,6 @@ font-weight: 600; } -.right-panel-announcement:hover { - background-color: initial; -} - .view-all-btn { color: @group-title-color !important; }