Fix ES Tag Index failing (#18991)

* Fix ES Tag Index failing

* add tags loading test

---------

Co-authored-by: karanh37 <karanh37@gmail.com>
(cherry picked from commit 08cdc69f30316261ed50c4f4ae0dc93a67b1203a)
This commit is contained in:
Mohit Yadav 2024-12-10 21:10:58 +05:30 committed by Chirag Madlani
parent 15e519e8b5
commit d41dc0b776
2 changed files with 27 additions and 2 deletions

View File

@ -150,8 +150,8 @@
"indexName": "tag_search_index",
"indexMappingFile": "/elasticsearch/%s/tag_index_mapping.json",
"alias": "tag",
"parentAliases": ["classification"],
"childAliases": ["all", "dataAsset"]
"parentAliases": ["classification", "all", "dataAsset"],
"childAliases": []
},
"classification": {
"indexName": "classification_search_index",

View File

@ -190,3 +190,28 @@ test.describe('Explore Tree scenarios ', () => {
await afterAction();
});
});
test.describe('Explore page', () => {
test('Check the listing of tags', async ({ page }) => {
await page
.locator('div')
.filter({ hasText: /^Governance$/ })
.locator('svg')
.first()
.click();
await expect(page.getByRole('tree')).toContainText('Glossaries');
await expect(page.getByRole('tree')).toContainText('Tags');
const res = page.waitForResponse(
'/api/v1/search/query?q=&index=dataAsset*'
);
// click on tags
await page.getByTestId('explore-tree-title-Tags').click();
const response = await res;
const jsonResponse = await response.json();
expect(jsonResponse.hits.hits.length).toBeGreaterThan(0);
});
});