@@ -38,7 +38,10 @@ import { Glossary } from '../../support/glossary/Glossary';
3838import { GlossaryTerm } from '../../support/glossary/GlossaryTerm' ;
3939import { TagClass } from '../../support/tag/TagClass' ;
4040import { getApiContext , redirectToHomePage } from '../../utils/common' ;
41- import { updateDisplayNameForEntity } from '../../utils/entity' ;
41+ import {
42+ updateDisplayNameForEntity ,
43+ waitForAllLoadersToDisappear ,
44+ } from '../../utils/entity' ;
4245import {
4346 Bucket ,
4447 validateBucketsForIndex ,
@@ -154,6 +157,91 @@ test.describe('Explore Tree scenarios', () => {
154157 ) ;
155158 } ) ;
156159
160+ test ( 'Verify Tags navigation via Governance tree and breadcrumb renders page correctly' , async ( {
161+ page,
162+ } ) => {
163+ await test . step ( 'Expand Governance node in explore tree' , async ( ) => {
164+ await waitForAllLoadersToDisappear ( page ) ;
165+
166+ await expect (
167+ page . getByTestId ( 'explore-tree-title-Governance' )
168+ ) . toBeVisible ( ) ;
169+
170+ await page
171+ . locator ( '.ant-tree-treenode' , {
172+ has : page . getByTestId ( 'explore-tree-title-Governance' ) ,
173+ } )
174+ . locator ( '.ant-tree-switcher' )
175+ . click ( ) ;
176+ } ) ;
177+
178+ await test . step ( 'Click on Tags under Governance' , async ( ) => {
179+ await expect ( page . getByTestId ( 'explore-tree-title-Tags' ) ) . toBeVisible ( ) ;
180+
181+ const tagsSearchRes = page . waitForResponse (
182+ '/api/v1/search/query?q=&index=dataAsset*'
183+ ) ;
184+ await page . getByTestId ( 'explore-tree-title-Tags' ) . click ( ) ;
185+ const tagsSearchResponse = await tagsSearchRes ;
186+
187+ expect ( tagsSearchResponse . status ( ) ) . toBe ( 200 ) ;
188+ } ) ;
189+
190+ await test . step (
191+ 'Click parent classification breadcrumb from a tag result' ,
192+ async ( ) => {
193+ await waitForAllLoadersToDisappear ( page ) ;
194+ const classificationBreadcrumb = page
195+ . locator ( '[data-testid="breadcrumb-link"] a[href*="/tags/"]' )
196+ . first ( ) ;
197+
198+ await expect ( classificationBreadcrumb ) . toBeVisible ( ) ;
199+ await expect ( classificationBreadcrumb ) . toBeEnabled ( ) ;
200+
201+ const classificationsRes = page . waitForResponse (
202+ '/api/v1/classifications*'
203+ ) ;
204+ const tagsTableRes = page . waitForResponse ( '/api/v1/tags*' ) ;
205+
206+ await classificationBreadcrumb . click ( ) ;
207+
208+ const classificationResponse = await classificationsRes ;
209+ const tagsTableResponse = await tagsTableRes ;
210+
211+ expect ( classificationResponse . status ( ) ) . toBe ( 200 ) ;
212+ expect ( tagsTableResponse . status ( ) ) . toBe ( 200 ) ;
213+ }
214+ ) ;
215+
216+ await test . step (
217+ 'Verify full Tags page renders with left panel, table and headers' ,
218+ async ( ) => {
219+ await waitForAllLoadersToDisappear ( page ) ;
220+
221+ await expect (
222+ page . getByTestId ( 'side-panel-classification' )
223+ ) . not . toHaveCount ( 0 ) ;
224+
225+ await expect ( page . getByTestId ( 'tags-container' ) ) . toBeVisible ( ) ;
226+
227+ await expect ( page . getByTestId ( 'table' ) ) . toBeVisible ( ) ;
228+
229+ // Verify all table column headers are correct
230+ const headers = await page
231+ . locator ( '.ant-table-thead > tr > .ant-table-cell' )
232+ . allTextContents ( ) ;
233+
234+ expect ( headers ) . toEqual ( [
235+ 'Enabled' ,
236+ 'Tag' ,
237+ 'Display Name' ,
238+ 'Description' ,
239+ 'Actions' ,
240+ ] ) ;
241+ }
242+ ) ;
243+ } ) ;
244+
157245 test ( 'Verify Database and Database Schema available in explore tree' , async ( {
158246 page,
159247 } ) => {
0 commit comments