diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/CustomizeLandingPageUtils.ts b/openmetadata-ui/src/main/resources/ui/cypress/common/CustomizeLandingPageUtils.ts index deb30776c7b..78ce62fdd16 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/CustomizeLandingPageUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/CustomizeLandingPageUtils.ts @@ -93,7 +93,7 @@ export const navigateToLandingPage = () => { export const openAddWidgetModal = () => { interceptURL( 'GET', - `/api/v1/docStore?fqnPrefix=KnowledgePanel`, + `/api/v1/docStore?fqnPrefix=KnowledgePanel&limit=25`, 'getWidgetsList' ); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/Entities/UserClass.ts b/openmetadata-ui/src/main/resources/ui/cypress/common/Entities/UserClass.ts index 3373b077756..74add79ebeb 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/Entities/UserClass.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/Entities/UserClass.ts @@ -196,9 +196,10 @@ class UsersTestClass { cy.get('[data-testid="displayName"]').clear(); interceptURL('PATCH', '/api/v1/users/*', 'updateName'); cy.get('[data-testid="inline-save-btn"]').click(); - cy.get('[data-testid="edit-displayName"]').scrollIntoView(); verifyResponseStatusCode('@updateName', 200); + cy.get('[data-testid="user-name"]').should('contain', 'Add Display Name'); + cy.get('.ant-collapse-expand-icon > .anticon > svg').click(); cy.get('[data-testid="edit-teams-button"]').click(); interceptURL('PATCH', '/api/v1/users/*', 'updateTeam'); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/PersonaFlow.spec.ts b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/PersonaFlow.spec.ts index 2a4c894cb61..96400bdae87 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/PersonaFlow.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/PersonaFlow.spec.ts @@ -91,6 +91,18 @@ describe('Persona operations', { tags: 'Settings' }, () => { }); it('Persona creation should work properly', () => { + interceptURL( + 'GET', + '/api/v1/users?limit=25&isBot=false', + 'getInitialUsers' + ); + + interceptURL( + 'GET', + '/api/v1/search/query?q=***%20AND%20isBot:false&from=0&size=25&index=user_search_index', + 'getUserSearch' + ); + cy.get('[data-testid="add-persona-button"]').scrollIntoView().click(); cy.get('[data-testid="name"]').clear().type(PERSONA_DETAILS.name); validateFormNameFieldInput({ @@ -105,8 +117,12 @@ describe('Persona operations', { tags: 'Settings' }, () => { cy.get(descriptionBox).type(PERSONA_DETAILS.description); cy.get('[data-testid="add-users"]').scrollIntoView().click(); + verifyResponseStatusCode('@getInitialUsers', 200); + cy.get('[data-testid="searchbar"]').type(userSearchText); + verifyResponseStatusCode('@getUserSearch', 200); + cy.get(`.ant-popover [title="${userSearchText}"]`).click(); cy.get('[data-testid="selectable-list-update-btn"]') .scrollIntoView() diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.test.tsx index 9e4b1d7955b..4358b86c278 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.test.tsx @@ -14,6 +14,7 @@ import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; +import { PAGE_SIZE_MEDIUM } from '../../../../constants/constants'; import { mockWidgetsData } from '../../../../mocks/AddWidgetModal.mock'; import { getAllKnowledgePanels } from '../../../../rest/DocStoreAPI'; import AddWidgetModal from './AddWidgetModal'; @@ -75,6 +76,11 @@ describe('AddWidgetModal component', () => { render(); }); + expect(getAllKnowledgePanels).toHaveBeenCalledWith({ + fqnPrefix: 'KnowledgePanel', + limit: PAGE_SIZE_MEDIUM, + }); + expect( screen.getByTestId('ActivityFeed-widget-tab-label') ).toBeInTheDocument(); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.tsx index 5ed1388822d..2f9fb974324 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.tsx @@ -17,7 +17,10 @@ import { AxiosError } from 'axios'; import { isEmpty, toString } from 'lodash'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { LIGHT_GREEN_COLOR } from '../../../../constants/constants'; +import { + LIGHT_GREEN_COLOR, + PAGE_SIZE_MEDIUM, +} from '../../../../constants/constants'; import { ERROR_PLACEHOLDER_TYPE } from '../../../../enums/common.enum'; import { WidgetWidths } from '../../../../enums/CustomizablePage.enum'; import { Document } from '../../../../generated/entity/docStore/document'; @@ -50,6 +53,7 @@ function AddWidgetModal({ setLoading(true); const response = await getAllKnowledgePanels({ fqnPrefix: 'KnowledgePanel', + limit: PAGE_SIZE_MEDIUM, }); setWidgetsList(response.data); diff --git a/openmetadata-ui/src/main/resources/ui/src/rest/DocStoreAPI.ts b/openmetadata-ui/src/main/resources/ui/src/rest/DocStoreAPI.ts index 6d1c3d1c5fc..04eab67088e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/rest/DocStoreAPI.ts +++ b/openmetadata-ui/src/main/resources/ui/src/rest/DocStoreAPI.ts @@ -20,7 +20,10 @@ import { getEncodedFqn } from '../utils/StringsUtils'; const BASE_URL = 'docStore'; -export const getAllKnowledgePanels = async (params: { fqnPrefix: string }) => { +export const getAllKnowledgePanels = async (params: { + fqnPrefix: string; + limit: number; +}) => { const response = await axiosClient.get>( `${BASE_URL}`, {