Skip to content

Commit

Permalink
GEN-1226: Add display name field in the advanced search filter (#17829)
Browse files Browse the repository at this point in the history
* Add display name filter field for advanced search

* Localization changes

* Update advanced search tests to include display name filter checks

* Fix the failing playwright tests

* localization changes

* Fix flaky tests

---------

Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
  • Loading branch information
aniketkatkar97 and chirag-madlani authored Sep 24, 2024
1 parent b3bfa64 commit f21bb16
Show file tree
Hide file tree
Showing 23 changed files with 356 additions and 192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ test.describe('Activity feed', () => {

test('Assigned task should appear to task tab', async ({ page }) => {
const value: TaskDetails = {
term: entity.entity.name,
term: entity.entity.displayName,
assignee: user1.responseData.name,
};
await redirectToHomePage(page);
Expand Down Expand Up @@ -310,7 +310,7 @@ test.describe('Activity feed', () => {

test('Update Description Task on Columns', async ({ page }) => {
const firstTaskValue: TaskDetails = {
term: entity4.entity.name,
term: entity4.entity.displayName,
assignee: user1.responseData.name,
description: 'Column Description 1',
columnName: entity4.entity.columns[0].name,
Expand Down Expand Up @@ -379,7 +379,7 @@ test.describe('Activity feed', () => {

test('Comment and Close Task should work in Task Flow', async ({ page }) => {
const value: TaskDetails = {
term: entity2.entity.name,
term: entity2.entity.displayName,
assignee: user1.responseData.name,
};
await redirectToHomePage(page);
Expand Down Expand Up @@ -441,7 +441,7 @@ test.describe('Activity feed', () => {

test('Open and Closed Task Tab', async ({ page }) => {
const value: TaskDetails = {
term: entity3.entity.name,
term: entity3.entity.displayName,
assignee: user1.responseData.name,
};
await redirectToHomePage(page);
Expand Down Expand Up @@ -515,7 +515,7 @@ test.describe('Activity feed', () => {
page,
}) => {
const value: TaskDetails = {
term: entity4.entity.name,
term: entity4.entity.displayName,
assignee: user1.responseData.name,
};
await redirectToHomePage(page);
Expand Down Expand Up @@ -634,7 +634,7 @@ base.describe('Activity feed with Data Consumer User', () => {
await performUserLogin(browser, user2);

const value: TaskDetails = {
term: entity.entity.name,
term: entity.entity.displayName,
assignee: user2.responseData.name,
};

Expand Down Expand Up @@ -767,7 +767,7 @@ base.describe('Activity feed with Data Consumer User', () => {
await performUserLogin(browser, user2);

const value: TaskDetails = {
term: entity2.entity.name,
term: entity2.entity.displayName,
assignee: user2.responseData.name,
};

Expand Down Expand Up @@ -946,7 +946,7 @@ base.describe('Activity feed with Data Consumer User', () => {
await performUserLogin(browser, viewAllUser);

const value: TaskDetails = {
term: entity3.entity.name,
term: entity3.entity.displayName,
assignee: viewAllUser.responseData.name,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ test.describe('Advanced Search', { tag: '@advanced-search' }, () => {
table2.schema.name,
],
'columns.name.keyword': ['email', 'shop_id'],
'displayName.keyword': [
table1.entity.displayName,
table2.entity.displayName,
],
};

await afterAction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const queryData = {
tagFqn: 'PersonalData.Personal',
tagName: 'Personal',
queryUsedIn: {
table1: table2.entity.name,
table2: table3.entity.name,
table1: table2.entity.displayName,
table2: table3.entity.displayName,
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { StoredProcedureClass } from '../../support/entity/StoredProcedureClass'
import { TableClass } from '../../support/entity/TableClass';
import { TopicClass } from '../../support/entity/TopicClass';
import { createNewPage, redirectToHomePage } from '../../utils/common';
import { getEntityDisplayName } from '../../utils/entity';

const entities = [
new ApiEndpointClass(),
Expand Down Expand Up @@ -79,7 +80,9 @@ test.describe('Recently viewed data assets', () => {

await page.waitForSelector(`[data-testid="recently-viewed-widget"]`);

const selector = `[data-testid="recently-viewed-widget"] [title="${entity.entity.name}"]`;
const selector = `[data-testid="recently-viewed-widget"] [title="${getEntityDisplayName(
entity.entity
)}"]`;

await expect(page.locator(selector)).toBeVisible();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export class TableClass extends EntityClass {

entity = {
name: `pw-table-${uuid()}`,
displayName: `pw table ${uuid()}`,
description: 'description',
columns: this.children,
databaseSchema: `${this.service.name}.${this.database.name}.${this.schema.name}`,
Expand Down
32 changes: 32 additions & 0 deletions openmetadata-ui/src/main/resources/ui/playwright/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"compilerOptions": {
"incremental": true,
"target": "ES5",
"module": "esnext",
"lib": ["dom", "dom.iterable", "ES2020.Promise", "es2021"],
"allowJs": true,
"jsx": "react",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"composite": false,
"removeComments": false,
"noEmit": true,
"importHelpers": true,
"downlevelIteration": true,
"isolatedModules": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"allowUnreachableCode": false,
"skipLibCheck": true,
"noImplicitAny": true
}
}
Loading

0 comments on commit f21bb16

Please sign in to comment.