Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { UserClass } from '../../support/user/UserClass';
import { performAdminLogin } from '../../utils/admin';
import { redirectToHomePage } from '../../utils/common';
import { waitForAllLoadersToDisappear } from '../../utils/entity';
import { expandNestedColumn } from '../../utils/nestedColumnUpdatesUtils';
import { createTableDescriptionSuggestions } from '../../utils/suggestions';
import { performUserLogin } from '../../utils/user';

Expand Down Expand Up @@ -72,6 +73,21 @@ test.describe.serial(
// Two users profile will be visible, 3rd one will come after AllFetch is clicked
await expect(allAvatarSuggestion).toHaveCount(1);

// Expand nested struct/array columns so their suggestion cards render
const cols = table.entityResponseData.columns ?? [];
const structCol = cols[2];
const arrayCol = (structCol.children ?? [])[1];
await expandNestedColumn(
page,
structCol.fullyQualifiedName ?? '',
(structCol.children ?? [])[0].fullyQualifiedName ?? ''
);
await expandNestedColumn(
page,
arrayCol.fullyQualifiedName ?? '',
(arrayCol.children ?? [])[0].fullyQualifiedName ?? ''
);
Comment thread
gitar-bot[bot] marked this conversation as resolved.
Outdated

// Click the first avatar
await allAvatarSuggestion.nth(0).click();

Expand Down Expand Up @@ -135,6 +151,21 @@ test.describe.serial(
.getByTestId('asset-description-container')
.getByTestId('profile-avatar');

// Expand nested columns so columnsName[5] row is accessible
const cols = table.entityResponseData.columns ?? [];
const structCol = cols[2];
const arrayCol = (structCol.children ?? [])[1];
await expandNestedColumn(
page,
structCol.fullyQualifiedName ?? '',
(structCol.children ?? [])[0].fullyQualifiedName ?? ''
);
await expandNestedColumn(
page,
arrayCol.fullyQualifiedName ?? '',
(arrayCol.children ?? [])[0].fullyQualifiedName ?? ''
);

// Click the first avatar
await allAvatarSuggestion.nth(0).click();

Expand All @@ -153,6 +184,22 @@ test.describe.serial(
await page.reload();
await waitForAllLoadersToDisappear(page);

// Re-expand after reload so columnsName[5] row is visible for verification
// and remains expanded for subsequent test steps
const colsAfterReload = table.entityResponseData.columns ?? [];
const structColAfterReload = colsAfterReload[2];
const arrayColAfterReload = (structColAfterReload.children ?? [])[1];
await expandNestedColumn(
page,
structColAfterReload.fullyQualifiedName ?? '',
(structColAfterReload.children ?? [])[0].fullyQualifiedName ?? ''
);
await expandNestedColumn(
page,
arrayColAfterReload.fullyQualifiedName ?? '',
(arrayColAfterReload.children ?? [])[0].fullyQualifiedName ?? ''
);

// since we accepted two suggestions, the badge count should be total-2
await expect(
page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { TableClass } from '../../support/entity/TableClass';
import { UserClass } from '../../support/user/UserClass';
import { performAdminLogin } from '../../utils/admin';
import { redirectToHomePage } from '../../utils/common';
import { expandNestedColumn } from '../../utils/nestedColumnUpdatesUtils';
import { createTableTagsSuggestions } from '../../utils/suggestions';

const table = new TableClass();
Expand Down Expand Up @@ -73,6 +74,21 @@ test.describe('Tags Suggestions Table Entity', () => {
// Two users profile will be visible, 3rd one will come after AllFetch is clicked
await expect(allAvatarSuggestion).toHaveCount(1);

// Expand nested struct/array columns so their suggestion cards render
const cols = table.entityResponseData.columns ?? [];
const structCol = cols[2];
const arrayCol = (structCol.children ?? [])[1];
await expandNestedColumn(
page,
structCol.fullyQualifiedName ?? '',
(structCol.children ?? [])[0].fullyQualifiedName ?? ''
);
await expandNestedColumn(
page,
arrayCol.fullyQualifiedName ?? '',
(arrayCol.children ?? [])[0].fullyQualifiedName ?? ''
);

// Click the first avatar
await allAvatarSuggestion.nth(0).click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
>;

export const getNestedColumnDetails = (type: string, data: EntityTypes) => {
const entityData = data.entityResponseData as any;

Check warning on line 30 in openmetadata-ui/src/main/resources/ui/playwright/utils/nestedColumnUpdatesUtils.ts

View workflow job for this annotation

GitHub Actions / lint-playwright

Unexpected any. Specify a different type
const fqn = entityData.fullyQualifiedName;

switch (type) {
Expand Down Expand Up @@ -136,7 +136,7 @@

const DUPLICATE_NAME = `name-${uuid()}`;

const expandNestedColumn = async (
export const expandNestedColumn = async (
page: Page,
rowKey: string,
childKey: string
Expand Down Expand Up @@ -996,7 +996,7 @@
entity,
service,
deleteService: () =>
worksheetClass.delete(apiContext).then(() => ({} as any)),

Check warning on line 999 in openmetadata-ui/src/main/resources/ui/playwright/utils/nestedColumnUpdatesUtils.ts

View workflow job for this annotation

GitHub Actions / lint-playwright

Unexpected any. Specify a different type
visitPage: async (page: Page) => {
await worksheetClass.visitEntityPage(page);
},
Expand Down Expand Up @@ -1064,7 +1064,7 @@
return {
entity,
service,
deleteService: () => fileClass.delete(apiContext).then(() => ({} as any)),

Check warning on line 1067 in openmetadata-ui/src/main/resources/ui/playwright/utils/nestedColumnUpdatesUtils.ts

View workflow job for this annotation

GitHub Actions / lint-playwright

Unexpected any. Specify a different type
visitPage: async (page: Page) => {
await fileClass.visitEntityPage(page);
await page.getByTestId('schema').click();
Expand Down
Loading