diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/common.js b/openmetadata-ui/src/main/resources/ui/cypress/common/common.js index 91c1b440092..3811c34ffd3 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/common.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/common.js @@ -437,90 +437,6 @@ export const deleteCreatedService = ( cy.get(`[data-testid="service-name-${service_Name}"]`).should('not.exist'); }; -export const editOwnerforCreatedService = ( - service_type, - service_Name, - api_services -) => { - interceptURL( - 'GET', - 'api/v1/teams/name/Organization?fields=*', - 'getSettingsPage' - ); - // Click on settings page - cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click(); - verifyResponseStatusCode('@getSettingsPage', 200); - - // Services page - cy.get('.ant-menu-title-content') - .contains(service_type) - .should('be.visible') - .click(); - - interceptURL( - 'GET', - `/api/v1/services/${api_services}/name/${service_Name}?fields=*`, - 'getSelectedService' - ); - - interceptURL( - 'GET', - `/api/v1/services/ingestionPipelines?fields=owner,pipelineStatuses&service=${service_Name}`, - 'waitForIngestion' - ); - - interceptURL( - 'GET', - '/api/v1/system/config/pipeline-service-client', - 'airflow' - ); - interceptURL( - 'GET', - `/api/v1/*?service=${service_Name}&fields=*`, - 'assetsDetail' - ); - // click on created service - cy.get(`[data-testid="service-name-${service_Name}"]`) - .should('exist') - .should('be.visible') - .click(); - - verifyResponseStatusCode('@getSelectedService', 200); - verifyResponseStatusCode('@waitForIngestion', 200); - verifyResponseStatusCode('@airflow', 200); - - verifyResponseStatusCode('@assetsDetail', 200); - - interceptURL('GET', '/api/v1/users?&isBot=false&limit=15', 'waitForUsers'); - - // Click on edit owner button - cy.get('[data-testid="edit-owner"]') - .should('exist') - .should('be.visible') - .click(); - - verifyResponseStatusCode('@waitForUsers', 200); - - interceptURL( - 'GET', - `api/v1/search/query?q=*${encodeURI('admin')}*&from=0&size=*&index=*`, - 'searchOwner' - ); - cy.get('.user-team-select-popover [data-testid="searchbar"]') - .should('be.visible') - .and('exist') - .trigger('click') - .type('admin'); - - verifyResponseStatusCode('@searchOwner', 200); - - cy.get('[data-testid="owner-link"]') - .invoke('text') - .then((text) => { - expect(text).equal(ADMIN); - }); -}; - export const goToAddNewServicePage = (service_type) => { interceptURL( 'GET', diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/Airflow.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/Airflow.spec.js index ca149398a3f..88a36c0b1f7 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/Airflow.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/Airflow.spec.js @@ -14,7 +14,6 @@ import { deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -66,14 +65,6 @@ describe('Airflow Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Pipeline, - serviceName, - API_SERVICE.pipelineServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Pipeline, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/MlFlow.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/MlFlow.spec.js index 47bbb25865d..8cd09111fe8 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/MlFlow.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/MlFlow.spec.js @@ -13,7 +13,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -64,14 +63,6 @@ describe('ML Flow Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.MLModels, - serviceName, - API_SERVICE.mlmodelServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.MLModels, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/S3Storage.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/S3Storage.spec.js index 2a0f3b5a2a0..08bc8b341d2 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/S3Storage.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/S3Storage.spec.js @@ -13,7 +13,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -74,14 +73,6 @@ describe('S3Storage Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Storage, - serviceName, - API_SERVICE.storageServices - ); - }); - // Todo: unskip below test once issue is fixed https://github.com/open-metadata/OpenMetadata/issues/11700 it.skip('delete created service', () => { deleteCreatedService( diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/bigquery.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/bigquery.spec.js index fa98f2f49e2..0cf728cc913 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/bigquery.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/bigquery.spec.js @@ -14,7 +14,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -109,14 +108,6 @@ describe('BigQuery Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Database, - serviceName, - API_SERVICE.databaseServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Database, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/glue.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/glue.spec.js index aabd487c6ec..e9fda20e743 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/glue.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/glue.spec.js @@ -14,7 +14,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -85,14 +84,6 @@ describe('Glue Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Database, - serviceName, - API_SERVICE.databaseServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Database, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/kafka.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/kafka.spec.js index 1c3334765d1..4144197cde2 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/kafka.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/kafka.spec.js @@ -14,7 +14,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -82,14 +81,6 @@ describe('Kafka Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Messaging, - serviceName, - API_SERVICE.messagingServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Messaging, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/metabase.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/metabase.spec.js index 122451464ae..77b59bb79fd 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/metabase.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/metabase.spec.js @@ -14,7 +14,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -88,14 +87,6 @@ describe('Metabase Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Dashboard, - serviceName, - API_SERVICE.dashboardServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Dashboard, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/mysql.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/mysql.spec.js index 677b70df5c5..cbb48dd9012 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/mysql.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/mysql.spec.js @@ -13,7 +13,6 @@ import { deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, mySqlConnectionInput, testServiceCreationAndIngestion, @@ -69,14 +68,6 @@ describe('MySQL Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Database, - serviceName, - API_SERVICE.databaseServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Database, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/postgres.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/postgres.spec.js index e557c799052..3c1055dc837 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/postgres.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/postgres.spec.js @@ -14,7 +14,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, handleIngestionRetry, interceptURL, @@ -221,14 +220,6 @@ describe('Postgres Ingestion', () => { cy.get('[data-testid="frequently-joined-columns"]').should('be.visible'); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Database, - serviceName, - API_SERVICE.databaseServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Database, 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 d60a47161fb..a2b4fd5a1c8 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 @@ -14,7 +14,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, handleIngestionRetry, interceptURL, @@ -283,14 +282,6 @@ describe('RedShift Ingestion', () => { .should('contain', DBT.dataQualityTest2); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Database, - REDSHIFT.serviceName, - API_SERVICE.databaseServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Database, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/snowflake.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/snowflake.spec.js index 1f739c7dfb0..ee5e3332f20 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/snowflake.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/snowflake.spec.js @@ -14,7 +14,6 @@ import { checkServiceFieldSectionHighlighting, deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -78,14 +77,6 @@ describe('Snowflake Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Database, - serviceName, - API_SERVICE.databaseServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Database, diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/superset.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/superset.spec.js index 92456f738d8..50da4edd33a 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/superset.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/AddNewService/superset.spec.js @@ -13,7 +13,6 @@ import { deleteCreatedService, - editOwnerforCreatedService, goToAddNewServicePage, testServiceCreationAndIngestion, updateDescriptionForIngestedTables, @@ -86,14 +85,6 @@ describe('Superset Ingestion', () => { ); }); - it('Edit and validate owner', () => { - editOwnerforCreatedService( - SERVICE_TYPE.Dashboard, - serviceName, - API_SERVICE.dashboardServices - ); - }); - it('delete created service', () => { deleteCreatedService( SERVICE_TYPE.Dashboard, 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 531e797b7dc..f09461d7cbd 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 @@ -11,6 +11,9 @@ * limitations under the License. */ +// eslint-disable-next-line spaced-comment +/// + import { descriptionBox, interceptURL, @@ -38,7 +41,19 @@ const deleteAlertSteps = (name) => { verifyResponseStatusCode('@deleteAlert', 200); toastNotification('Subscription deleted successfully!'); - cy.get('[data-testid="add-placeholder-button"]').should('be.visible'); +}; + +const visitAddAlertPage = () => { + cy.wait('@alertsPage').then(({ response }) => { + const data = response.body.data?.find((alert) => alert.provider === 'user'); + + if (Cypress._.isUndefined(data)) { + // Click on create placeholder button for alerts + cy.get('[data-testid="add-placeholder-button"]').click(); + } else { + cy.get('[data-testid="create-alert"]').click(); + } + }); }; describe('Alerts page should work properly', () => { @@ -54,37 +69,26 @@ describe('Alerts page should work properly', () => { cy.get('[data-testid="global-setting-left-panel"]') .contains('Alerts') .scrollIntoView() - .should('be.visible') - .and('exist') .click(); - verifyResponseStatusCode('@alertsPage', 200); }); it('Create new alert for all data assets', () => { - // Click on create placeholder button for alerts - cy.get('[data-testid="add-placeholder-button"]') - .should('be.visible') - .click(); + visitAddAlertPage(); // Enter alert name cy.get('#name').should('be.visible').type(alertForAllAssets); // Enter description - cy.get(descriptionBox) - .should('be.visible') - .click() - .clear() - .type(description); + cy.get(descriptionBox).clear().type(description); // Click on all data assets cy.get('[data-testid="triggerConfig-type"]') .contains('All') .should('be.visible'); // Select filters - cy.get('[data-testid="add-filters"]').should('exist').click(); + cy.get('[data-testid="add-filters"]').click(); cy.get('#filteringRules_rules_0_name').invoke('show').click(); // Select owner - cy.get('[title="Owner"]').should('be.visible').click(); + cy.get('[title="Owner"]').click(); cy.get('[data-testid="matchAnyOwnerName-select"]') - .should('be.visible') .click() .type(teamSearchTerm); verifyResponseStatusCode('@getSearchResult', 200); @@ -131,12 +135,7 @@ describe('Alerts page should work properly', () => { }); it('Create new alert for all data assets and multiple filters', () => { - interceptURL('GET', '/api/v1/events/subscriptions/*', 'createAlert'); - // Click on create placeholder button for alerts - cy.get('[data-testid="add-placeholder-button"]') - .should('be.visible') - .click(); - verifyResponseStatusCode('@createAlert', 200); + visitAddAlertPage(); // Enter alert name cy.get('#name').should('be.visible').type(alertForAllAssets); // Enter description @@ -193,12 +192,8 @@ describe('Alerts page should work properly', () => { }); it('Create new alert for Test case data asset', () => { - interceptURL('GET', '/api/v1/events/subscriptions/*', 'createAlert'); - // Click on create placeholder button for alerts - cy.get('[data-testid="add-placeholder-button"]') - .should('be.visible') - .click(); - verifyResponseStatusCode('@createAlert', 200); + visitAddAlertPage(); + // Enter alert name cy.get('#name').should('be.visible').type(TEST_CASE.testCaseAlert); // Enter description @@ -271,10 +266,7 @@ describe('Alerts page should work properly', () => { Object.values(DESTINATION).forEach((destination) => { it(`Create alert for ${destination.locator}`, () => { - // Click on create placeholder button for alerts - cy.get('[data-testid="add-placeholder-button"]') - .should('be.visible') - .click(); + visitAddAlertPage(); // Enter alert name cy.get('#name').should('be.visible').type(destination.name); // Enter description diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/CustomLogoConfig.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/CustomLogoConfig.spec.js index dec41beac14..533fb6a289d 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/CustomLogoConfig.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/CustomLogoConfig.spec.js @@ -10,6 +10,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +// eslint-disable-next-line spaced-comment +/// + import { interceptURL, verifyResponseStatusCode } from '../../common/common'; const config = { @@ -23,10 +26,7 @@ describe('Custom Logo Config', () => { beforeEach(() => { cy.login(); - cy.get('[data-testid="appbar-item-settings"]') - .should('exist') - .and('be.visible') - .click(); + cy.get('[data-testid="appbar-item-settings"]').click(); interceptURL( 'GET', @@ -37,35 +37,16 @@ describe('Custom Logo Config', () => { cy.get('[data-testid="global-setting-left-panel"]') .contains('Custom Logo') .scrollIntoView() - .should('be.visible') - .and('exist') .click(); verifyResponseStatusCode('@customLogoConfiguration', 200); }); - it('Should have default config', () => { - cy.get('[data-testid="sub-heading"]') - .should('be.visible') - .contains('Configure The Application Logo and Monogram.'); - cy.get('[data-testid="logo-url"]').should('be.visible').contains('--'); - cy.get('[data-testid="monogram-url"]').should('be.visible').contains('--'); - cy.get('[data-testid="edit-button"]').should('be.visible'); - }); - it('Should update the config', () => { - interceptURL( - 'GET', - 'api/v1/system/settings/customLogoConfiguration', - 'customLogoConfiguration' - ); cy.get('[data-testid="edit-button"]').should('be.visible').click(); - verifyResponseStatusCode('@customLogoConfiguration', 200); cy.get('[data-testid="customLogoUrlPath"]') .scrollIntoView() - .should('be.visible') - .click() .clear() .type('incorrect url'); @@ -74,15 +55,11 @@ describe('Custom Logo Config', () => { cy.get('[data-testid="customLogoUrlPath"]') .scrollIntoView() - .should('be.visible') - .click() .clear() .type(config.logo); cy.get('[data-testid="customMonogramUrlPath"]') .scrollIntoView() - .should('be.visible') - .click() .clear() .type('incorrect url'); @@ -91,8 +68,6 @@ describe('Custom Logo Config', () => { cy.get('[data-testid="customMonogramUrlPath"]') .scrollIntoView() - .should('be.visible') - .click() .clear() .type(config.monogram); @@ -109,11 +84,19 @@ describe('Custom Logo Config', () => { verifyResponseStatusCode('@updatedConfig', 200); verifyResponseStatusCode('@updatedCustomLogoConfiguration', 200); - cy.get('[data-testid="logo-url"]') - .should('be.visible') - .contains(config.logo); - cy.get('[data-testid="monogram-url"]') - .should('be.visible') - .contains(config.monogram); + cy.get('[data-testid="logo-url"]').should('contain', config.logo); + cy.get('[data-testid="monogram-url"]').should('contain', config.monogram); + }); + + it('Reset to default', () => { + cy.get('[data-testid="edit-button"]').should('be.visible').click(); + cy.get('[data-testid="customLogoUrlPath"]').scrollIntoView().clear(); + cy.get('[data-testid="customMonogramUrlPath"]').scrollIntoView().clear(); + interceptURL('PUT', 'api/v1/system/settings', 'updatedConfig'); + + cy.get('[data-testid="save-button"]').click(); + + verifyResponseStatusCode('@updatedConfig', 200); + verifyResponseStatusCode('@customLogoConfiguration', 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 74cc5aeeb7c..16ccd10b993 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 @@ -244,7 +244,7 @@ describe('Roles page should work properly', () => { .should('contain', policies.organizationPolicy) .should('have.class', 'selected'); - cy.get('[type="button"]').contains('Submit').should('be.visible').click(); + cy.get('[type="button"]').contains('Submit').scrollIntoView().click(); cy.get('[data-testid="entity-name"]') .should('contain', policies.organizationPolicy) @@ -321,7 +321,7 @@ describe('Roles page should work properly', () => { .should('be.visible') .type('DELETE'); - cy.get('[data-testid="confirm-button"]').should('be.visible').click(); + cy.get('[data-testid="confirm-button"]').scrollIntoView().click(); // Validate deleted role cy.get('[data-testid="role-name"]').should('not.contain', roleName); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Service.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Service.spec.js index 3725ecc6c9a..77893620e0c 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Service.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Service.spec.js @@ -85,10 +85,10 @@ describe('Services page should work properly', () => { .click(); verifyResponseStatusCode('@editOwner', 200); - cy.get('.select-owner-tabs') + cy.get( + '.ant-popover-inner-content > .ant-tabs > .ant-tabs-nav > .ant-tabs-nav-wrap' + ) .contains('Users') - .should('exist') - .should('be.visible') .click(); interceptURL( @@ -96,11 +96,19 @@ describe('Services page should work properly', () => { '/api/v1/services/databaseServices/*', 'updateService' ); + interceptURL( + 'GET', + '/api/v1/search/query?q=*%20AND%20isBot:false*&index=user_search_index', + 'searchApi' + ); + cy.get( + '[id*="panel-users"] [data-testid="selectable-list"] [data-testid="search-bar-container"] [data-testid="searchbar"]' + ).type(service.Owner); + verifyResponseStatusCode('@searchApi', 200); cy.get('[data-testid="selectable-list"]') .contains(service.Owner) .scrollIntoView() - .should('be.visible') .click(); verifyResponseStatusCode('@updateService', 200);