mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-16 10:08:08 +00:00
playwright: fixed permission spec failure (#23691)
This commit is contained in:
parent
2cf7466911
commit
aa5da1e330
@ -250,6 +250,11 @@ test('Permissions', async ({ userPage, adminPage }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await userPage.getByTestId('profiler').click();
|
await userPage.getByTestId('profiler').click();
|
||||||
|
await userPage.waitForLoadState('networkidle');
|
||||||
|
await userPage.waitForSelector("[data-testid='loader']", {
|
||||||
|
state: 'detached',
|
||||||
|
});
|
||||||
|
|
||||||
const testCaseResponse = userPage.waitForResponse(
|
const testCaseResponse = userPage.waitForResponse(
|
||||||
(response) =>
|
(response) =>
|
||||||
response.url().includes('/api/v1/dataQuality/testCases/') &&
|
response.url().includes('/api/v1/dataQuality/testCases/') &&
|
||||||
|
|||||||
@ -156,32 +156,21 @@ export const validateViewPermissions = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
await page.click('[data-testid="sample_data"]');
|
await page.click('[data-testid="sample_data"]');
|
||||||
await page.waitForLoadState('domcontentloaded');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await page.waitForSelector("[data-testid='loader']", { state: 'detached' });
|
||||||
await checkNoPermissionPlaceholder(
|
await checkNoPermissionPlaceholder(
|
||||||
page,
|
page,
|
||||||
/Sample Data/,
|
/Sample Data/,
|
||||||
permission?.viewSampleData
|
permission?.viewSampleData
|
||||||
);
|
);
|
||||||
await page.click('[data-testid="table_queries"]');
|
await page.click('[data-testid="table_queries"]');
|
||||||
await page.waitForLoadState('domcontentloaded');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await page.waitForSelector("[data-testid='loader']", { state: 'detached' });
|
||||||
await checkNoPermissionPlaceholder(page, /Queries/, permission?.viewQueries);
|
await checkNoPermissionPlaceholder(page, /Queries/, permission?.viewQueries);
|
||||||
|
|
||||||
const profilerResponse = page.waitForResponse(
|
|
||||||
(response) =>
|
|
||||||
response.url().includes('/api/v1/tables/') &&
|
|
||||||
response.url().includes('/systemProfile?') &&
|
|
||||||
response.url().includes('startTs=') &&
|
|
||||||
response.url().includes('endTs=')
|
|
||||||
);
|
|
||||||
await page.click('[data-testid="profiler"]');
|
await page.click('[data-testid="profiler"]');
|
||||||
await profilerResponse;
|
|
||||||
await page.waitForLoadState('networkidle');
|
await page.waitForLoadState('networkidle');
|
||||||
await page
|
await page.waitForSelector("[data-testid='loader']", { state: 'detached' });
|
||||||
.getByTestId('table-profiler-container')
|
|
||||||
.getByTestId('loader')
|
|
||||||
.waitFor({ state: 'detached' });
|
|
||||||
await page.waitForLoadState('domcontentloaded');
|
|
||||||
|
|
||||||
await page
|
await page
|
||||||
.getByTestId('profiler-tab-left-panel')
|
.getByTestId('profiler-tab-left-panel')
|
||||||
.getByText('Data Quality')
|
.getByText('Data Quality')
|
||||||
@ -190,19 +179,22 @@ export const validateViewPermissions = async (
|
|||||||
.getByTestId('profiler-tab-left-panel')
|
.getByTestId('profiler-tab-left-panel')
|
||||||
.getByText('Data Quality')
|
.getByText('Data Quality')
|
||||||
.click();
|
.click();
|
||||||
await page.waitForLoadState('domcontentloaded');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await page.waitForSelector("[data-testid='loader']", { state: 'detached' });
|
||||||
await checkNoPermissionPlaceholder(
|
await checkNoPermissionPlaceholder(
|
||||||
page,
|
page,
|
||||||
/Data Observability/,
|
/Data Observability/,
|
||||||
permission?.viewTests
|
permission?.viewTests
|
||||||
);
|
);
|
||||||
await page.click('[data-testid="lineage"]');
|
await page.click('[data-testid="lineage"]');
|
||||||
await page.waitForLoadState('domcontentloaded');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await page.waitForSelector("[data-testid='loader']", { state: 'detached' });
|
||||||
|
|
||||||
await expect(page.locator('[data-testid="edit-lineage"]')).toBeDisabled();
|
await expect(page.locator('[data-testid="edit-lineage"]')).toBeDisabled();
|
||||||
|
|
||||||
await page.click('[data-testid="custom_properties"]');
|
await page.click('[data-testid="custom_properties"]');
|
||||||
await page.waitForLoadState('domcontentloaded');
|
await page.waitForLoadState('networkidle');
|
||||||
|
await page.waitForSelector("[data-testid='loader']", { state: 'detached' });
|
||||||
await checkNoPermissionPlaceholder(page, /Custom Properties/);
|
await checkNoPermissionPlaceholder(page, /Custom Properties/);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user