mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 12:39:01 +00:00
Playwright: fixed permission, dataQuality, & testCases spec for 1.5.5 (#17884)
* Playwright: fixed permission, dataQuality, & testCases spec * fixed testSuite wait issue
This commit is contained in:
parent
e42a7d6e7c
commit
55a027203e
@ -251,7 +251,9 @@ test('Permissions', async ({ userPage, adminPage }) => {
|
||||
|
||||
await userPage.getByTestId('profiler').click();
|
||||
const testCaseResponse = userPage.waitForResponse(
|
||||
'/api/v1/dataQuality/testCases/search/list?fields=*'
|
||||
(response) =>
|
||||
response.url().includes('/api/v1/dataQuality/testCases/') &&
|
||||
response.request().method() === 'GET'
|
||||
);
|
||||
await userPage
|
||||
.getByTestId('profiler-tab-left-panel')
|
||||
|
@ -781,6 +781,8 @@ test('TestCase filters', async ({ page }) => {
|
||||
// Test case filter by Tier
|
||||
|
||||
await page.click('#tier');
|
||||
await page.fill('#tier', 'Tier2');
|
||||
await page.waitForLoadState('domcontentloaded');
|
||||
const getTestCaseByTier = page.waitForResponse(
|
||||
'/api/v1/dataQuality/testCases/search/list?*tier=Tier.Tier2*'
|
||||
);
|
||||
|
@ -54,10 +54,14 @@ test('Table difference test case', async ({ page }) => {
|
||||
await page.getByTestId('test-case-name').fill(testCase.name);
|
||||
await page.getByTestId('test-type').click();
|
||||
await page.getByTitle('Compare 2 tables for').click();
|
||||
await page.click('#tableTestForm_params_table2');
|
||||
const tableSearchResponse = page.waitForResponse(
|
||||
const tableListSearchResponse = page.waitForResponse(
|
||||
`/api/v1/search/query?q=*index=table_search_index*`
|
||||
);
|
||||
await page.click('#tableTestForm_params_table2');
|
||||
await tableListSearchResponse;
|
||||
const tableSearchResponse = page.waitForResponse(
|
||||
`/api/v1/search/query?q=*${testCase.table2}*index=table_search_index*`
|
||||
);
|
||||
await page.fill(`#tableTestForm_params_table2`, testCase.table2);
|
||||
await tableSearchResponse;
|
||||
// The 'networkidle' parameter tells Playwright to wait until there are no network connections
|
||||
|
@ -127,13 +127,13 @@ test('Logical TestSuite', async ({ page }) => {
|
||||
|
||||
await test.step('Add test case to logical test suite', async () => {
|
||||
const testCaseResponse = page.waitForResponse(
|
||||
'/api/v1/dataQuality/testCases?fields=*'
|
||||
'/api/v1/search/query?q=*&index=test_case_search_index*'
|
||||
);
|
||||
await page.click('[data-testid="add-test-case-btn"]');
|
||||
await testCaseResponse;
|
||||
|
||||
const getTestCase = page.waitForResponse(
|
||||
'/api/v1/search/query?q=*&index=test_case_search_index*'
|
||||
`/api/v1/search/query?q=*${testCaseName2}*&index=test_case_search_index*`
|
||||
);
|
||||
await page.fill('[data-testid="searchbar"]', testCaseName2);
|
||||
await getTestCase;
|
||||
|
@ -49,6 +49,7 @@ import {
|
||||
INITIAL_PAGING_VALUE,
|
||||
PAGE_SIZE,
|
||||
PAGE_SIZE_BASE,
|
||||
PAGE_SIZE_LARGE,
|
||||
TIER_CATEGORY,
|
||||
} from '../../../constants/constants';
|
||||
import {
|
||||
@ -212,6 +213,7 @@ export const TestCases = ({ summaryPanel }: { summaryPanel: ReactNode }) => {
|
||||
setIsOptionsLoading(true);
|
||||
const { data } = await getTags({
|
||||
parent: 'Tier',
|
||||
limit: PAGE_SIZE_LARGE,
|
||||
});
|
||||
|
||||
const options = data.map((hit) => {
|
||||
@ -582,6 +584,7 @@ export const TestCases = ({ summaryPanel }: { summaryPanel: ReactNode }) => {
|
||||
name="tier">
|
||||
<Select
|
||||
allowClear
|
||||
showSearch
|
||||
data-testid="tier-select-filter"
|
||||
options={tierOptions}
|
||||
placeholder={t('label.tier')}
|
||||
|
Loading…
x
Reference in New Issue
Block a user