diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts
index a8c9e8a8a47..e6ef19e99cc 100644
--- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts
+++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts
@@ -1186,6 +1186,52 @@ test.describe('Glossary tests', () => {
}
});
+ test('should check for glossary term pagination', async ({ browser }) => {
+ test.slow(true);
+
+ const { page, afterAction, apiContext } = await performAdminLogin(browser);
+ const glossaries = [];
+ for (let i = 0; i < 60; i++) {
+ const glossary = new Glossary(`PW_GLOSSARY_TEST_${i + 1}`);
+ await glossary.create(apiContext);
+ glossaries.push(glossary);
+ }
+
+ try {
+ await redirectToHomePage(page);
+ const glossaryRes = page.waitForResponse('/api/v1/glossaries?*');
+ await sidebarClick(page, SidebarItem.GLOSSARY);
+ await glossaryRes;
+
+ const glossaryAfterRes = page.waitForResponse(
+ '/api/v1/glossaries?*after=*'
+ );
+ await page
+ .getByTestId('glossary-left-panel-scroller')
+ .scrollIntoViewIfNeeded();
+
+ const res = await glossaryAfterRes;
+ const json = await res.json();
+
+ const firstGlossaryName = json.data[0].displayName;
+
+ await expect(
+ page.getByRole('menuitem', { name: firstGlossaryName })
+ ).toBeVisible();
+
+ const lastGlossaryName = json.data[json.data.length - 1].displayName;
+
+ await expect(
+ page.getByRole('menuitem', { name: lastGlossaryName })
+ ).toBeVisible();
+ } finally {
+ for (const glossary of glossaries) {
+ await glossary.delete(apiContext);
+ }
+ await afterAction();
+ }
+ });
+
test.afterAll(async ({ browser }) => {
const { afterAction, apiContext } = await performAdminLogin(browser);
await user1.delete(apiContext);
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryLeftPanel/GlossaryLeftPanel.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryLeftPanel/GlossaryLeftPanel.component.tsx
index c0d87c641c2..b8ef1471c5c 100644
--- a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryLeftPanel/GlossaryLeftPanel.component.tsx
+++ b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryLeftPanel/GlossaryLeftPanel.component.tsx
@@ -13,7 +13,7 @@
import { Button, Col, Menu, MenuProps, Row, Typography } from 'antd';
import { ItemType } from 'antd/lib/menu/hooks/useItems';
-import React, { useMemo } from 'react';
+import React, { useEffect, useMemo, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { useHistory } from 'react-router-dom';
import { ReactComponent as GlossaryIcon } from '../../../assets/svg/glossary.svg';
@@ -36,6 +36,7 @@ const GlossaryLeftPanel = ({ glossaries }: GlossaryLeftPanelProps) => {
const { permissions } = usePermissionProvider();
const { fqn: glossaryFqn } = useFqn();
const history = useHistory();
+ const menuRef = useRef