Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -429,7 +429,7 @@ test.describe('Impact Analysis', () => {
test('verify owner filter for Asset level impact analysis', async ({
page,
}) => {
await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId('search-dropdown-Owners').click();

await expect(
Expand All @@ -456,7 +456,7 @@ test.describe('Impact Analysis', () => {
});

test('verify domain for Asset level impact analysis', async ({ page }) => {
await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId('search-dropdown-Domains').click();

await expect(
Expand Down Expand Up @@ -485,7 +485,7 @@ test.describe('Impact Analysis', () => {
});

test('verify tier for Asset level impact analysis', async ({ page }) => {
await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId('search-dropdown-Tier').click();

await expect(
Expand Down Expand Up @@ -874,7 +874,7 @@ test.describe('Impact Analysis', () => {
test('Verify service type filter for Asset level impact analysis', async ({
page,
}) => {
await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId('search-dropdown-Service Type').click();

const serviceTypeOption = page.getByTitle('mlflow', { exact: true });
Expand Down Expand Up @@ -917,7 +917,7 @@ test.describe('Impact Analysis', () => {

const initialRowCount = await page.locator('[data-row-key]').count();

await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId('search-dropdown-Tag').click();

await waitForAllLoadersToDisappear(page);
Expand Down Expand Up @@ -978,7 +978,7 @@ test.describe('Impact Analysis', () => {
test('Verify switching between table and column level clears filters', async ({
page,
}) => {
await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId('search-dropdown-Tier').click();

await page
Expand Down Expand Up @@ -1043,7 +1043,7 @@ test.describe('Impact Analysis', () => {
await columnLineageResponse;
await waitForAllLoadersToDisappear(page);

await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId('search-dropdown-Glossary Terms').click();
const glossaryOptions = page
.getByTestId('drop-down-menu')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ test.describe('Lineage Settings modal', () => {
});

test.beforeEach(async ({ page }) => {
await redirectToHomePage(page);
await table.visitEntityPage(page);
await visitLineageTab(page);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
getApiContext,
getDefaultAdminAPIContext,
getEntityTypeSearchIndexMapping,
redirectToHomePage,
} from '../../../utils/common';
import { waitForAllLoadersToDisappear } from '../../../utils/entity';
import {
Expand Down Expand Up @@ -124,6 +125,7 @@ test.describe('Lineage Filters', () => {
});

test.beforeEach(async ({ page }) => {
await redirectToHomePage(page);
await lineageEntity.visitEntityPage(page);
await visitLineageTab(page);
await waitForAllLoadersToDisappear(page);
Expand Down Expand Up @@ -274,7 +276,7 @@ test.describe('Lineage Filters', () => {
await page.reload();
await waitForAllLoadersToDisappear(page);

await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId(`search-dropdown-${filterTestId}`).click();

await page.getByTitle(filterValue).click();
Expand Down Expand Up @@ -316,7 +318,7 @@ test.describe('Lineage Filters', () => {
await impactAnalysisTab.click();
await waitForAllLoadersToDisappear(page);

await page.getByTestId('filters-button').click();
await page.getByRole('button', { name: 'Filters' }).click();
await page.getByTestId(`search-dropdown-${filterTestId}`).click();

await page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ test.beforeAll(async ({ browser }) => {
});

test.beforeEach(async ({ page }) => {
await redirectToHomePage(page);
await table.visitEntityPage(page);
await visitLineageTab(page);
await performZoomOut(page);
Expand Down
30 changes: 15 additions & 15 deletions openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,21 @@ const DASHBOARD_DATA_MODEL = 'DashboardDataModel';

export const getEntityTypeSearchIndexMapping = (entityType: string) => {
const entityMapping = {
Table: 'table',
Topic: 'topic',
Dashboard: 'dashboard',
Pipeline: 'pipeline',
MlModel: 'mlmodel',
Container: 'container',
SearchIndex: 'searchIndex',
ApiEndpoint: 'apiEndpoint',
Metric: 'metric',
['Store Procedure']: 'storedProcedure',
Directory: 'directory',
File: 'file',
Spreadsheet: 'spreadsheet',
Worksheet: 'worksheet',
[DASHBOARD_DATA_MODEL]: 'dashboardDataModel',
Table: 'table_search_index',
Topic: 'topic_search_index',
Dashboard: 'dashboard_search_index',
Pipeline: 'pipeline_search_index',
MlModel: 'mlmodel_search_index',
Container: 'container_search_index',
SearchIndex: 'search_entity_search_index',
ApiEndpoint: 'api_endpoint_search_index',
Metric: 'metric_search_index',
['Store Procedure']: 'stored_procedure_search_index',
Directory: 'directory_search_index',
File: 'file_search_index',
Spreadsheet: 'spreadsheet_search_index',
Worksheet: 'worksheet_search_index',
[DASHBOARD_DATA_MODEL]: 'dashboard_data_model_search_index',
};

return entityMapping[entityType as keyof typeof entityMapping];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const editLineageClick = async (page: Page) => {
export const editLineage = async (page: Page) => {
await editLineageClick(page);

await expect(page.getByTestId('table-draggable-icon')).toBeVisible();
await expect(page.getByTestId('table_search_index-draggable-icon')).toBeVisible();
};

export const performZoomOut = async (page: Page, xTimes = 10) => {
Expand Down Expand Up @@ -642,7 +642,7 @@ export const getEntityColumns = (
};

export const openImpactAnalysisTab = async (page: Page) => {
const impactAnalysisTab = page.getByRole('tab', {
const impactAnalysisTab = page.getByRole('button', {
name: 'Impact Analysis',
});

Expand Down Expand Up @@ -719,9 +719,9 @@ export const verifyCSVHeaders = async (headers: string[]) => {
};

export const getLineageCSVData = async (page: Page) => {
await expect(page.getByTestId('export-button')).toBeEnabled();
await expect(page.getByRole('button', { name: 'Export' })).toBeEnabled();

await page.getByTestId('export-button').click();
await page.getByRole('button', { name: 'Export' }).click();

await page
.locator('[data-testid="export-entity-modal"] #submit-button')
Expand Down Expand Up @@ -804,9 +804,9 @@ export const verifyExportLineagePNG = async (
page: Page,
isPNGSelected?: boolean
) => {
await expect(page.getByTestId('export-button')).toBeEnabled();
await expect(page.getByRole('button', { name: 'Export' })).toBeEnabled();

await page.getByTestId('export-button').click();
await page.getByRole('button', { name: 'Export' }).click();

await page
.locator('[data-testid="export-entity-modal"] #submit-button')
Expand Down
Loading