mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-18 04:05:42 +00:00
Merge branch 'main' into issue-23356
This commit is contained in:
commit
e31c51f8d7
@ -13,6 +13,7 @@
|
||||
import { expect, Page, Response } from '@playwright/test';
|
||||
import { TableClass } from '../../../support/entity/TableClass';
|
||||
import { getApiContext, redirectToHomePage } from '../../../utils/common';
|
||||
import { waitForAllLoadersToDisappear } from '../../../utils/entity';
|
||||
import { visitDataQualityTab } from '../../../utils/testCases';
|
||||
import { test } from '../../fixtures/pages';
|
||||
|
||||
@ -168,13 +169,13 @@ test.describe('Add TestCase New Flow', () => {
|
||||
});
|
||||
await testCaseDoc;
|
||||
await page.waitForLoadState('networkidle');
|
||||
await waitForAllLoadersToDisappear(page);
|
||||
};
|
||||
|
||||
const visitDataQualityPage = async (page: Page) => {
|
||||
await page.goto('/data-quality/test-cases');
|
||||
await page.waitForSelector('[data-testid="loader"]', {
|
||||
state: 'detached',
|
||||
});
|
||||
await page.waitForLoadState('networkidle');
|
||||
await waitForAllLoadersToDisappear(page);
|
||||
};
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
@ -390,7 +391,7 @@ test.describe('Add TestCase New Flow', () => {
|
||||
for (const page of [dataConsumerPage, dataStewardPage]) {
|
||||
await visitDataQualityPage(page);
|
||||
|
||||
await page.getByTestId('add-test-case-btn').click();
|
||||
await openTestCaseForm(page);
|
||||
|
||||
await selectTable(page, table);
|
||||
|
||||
|
@ -30,6 +30,7 @@ import {
|
||||
triggerTestSuitePipelineAndWaitForSuccess,
|
||||
visitProfilerTab,
|
||||
} from '../../utils/incidentManager';
|
||||
import { makeRetryRequest } from '../../utils/serviceIngestion';
|
||||
import { sidebarClick } from '../../utils/sidebar';
|
||||
|
||||
const user1 = new UserClass();
|
||||
@ -68,9 +69,15 @@ test.describe('Incident Manager', PLAYWRIGHT_INGESTION_TAG_OBJ, () => {
|
||||
testDefinition: 'tableColumnCountToBeBetween',
|
||||
});
|
||||
}
|
||||
await apiContext.post(
|
||||
`/api/v1/services/ingestionPipelines/deploy/${pipeline.id}`
|
||||
);
|
||||
|
||||
await makeRetryRequest({
|
||||
page,
|
||||
fn: () =>
|
||||
apiContext.post(
|
||||
`/api/v1/services/ingestionPipelines/deploy/${pipeline.id}`
|
||||
),
|
||||
});
|
||||
|
||||
await triggerTestSuitePipelineAndWaitForSuccess({
|
||||
page,
|
||||
pipeline,
|
||||
|
@ -58,11 +58,18 @@ test.describe('Bulk Re-Deploy pipelines ', () => {
|
||||
).not.toBeEnabled();
|
||||
await expect(page.locator('.ant-table-container')).toBeVisible();
|
||||
|
||||
await page.getByRole('checkbox').first().click();
|
||||
await page.locator(`td [type="checkbox"]`).first().click();
|
||||
await page.locator(`td [type="checkbox"]`).nth(1).click();
|
||||
|
||||
await expect(page.getByRole('button', { name: 'Re Deploy' })).toBeEnabled();
|
||||
|
||||
const redeployResponse = page.waitForRequest(
|
||||
(request) =>
|
||||
request.url().includes('/api/v1/services/ingestionPipelines/deploy') &&
|
||||
request.method() === 'POST'
|
||||
);
|
||||
await page.getByRole('button', { name: 'Re Deploy' }).click();
|
||||
await redeployResponse;
|
||||
|
||||
await expect(
|
||||
page.getByText('Pipelines Re Deploy Successfully')
|
||||
|
@ -11,7 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { expect, Page } from '@playwright/test';
|
||||
import { APIResponse, expect, Page } from '@playwright/test';
|
||||
import { BIG_ENTITY_DELETE_TIMEOUT } from '../constant/delete';
|
||||
import { GlobalSettingOptions } from '../constant/settings';
|
||||
import { EntityTypeEndpoint } from '../support/entity/Entity.interface';
|
||||
@ -182,17 +182,21 @@ export const checkServiceFieldSectionHighlighting = async (
|
||||
await page.waitForSelector(`[data-id="${field}"][data-highlighted="true"]`);
|
||||
};
|
||||
|
||||
export const makeRetryRequest = async (data: {
|
||||
url: string;
|
||||
type RetryRequestData = {
|
||||
page: Page;
|
||||
retries?: number;
|
||||
}) => {
|
||||
const { url, page, retries = 3 } = data;
|
||||
} & (
|
||||
| { url: string; fn?: never }
|
||||
| { fn: () => Promise<APIResponse>; url?: never }
|
||||
);
|
||||
|
||||
export const makeRetryRequest = async (data: RetryRequestData) => {
|
||||
const { url, page, retries = 3, fn } = data;
|
||||
const { apiContext } = await getApiContext(page);
|
||||
|
||||
for (let i = 0; i < retries; i++) {
|
||||
try {
|
||||
const response = await apiContext.get(url);
|
||||
const response = await (fn ? fn() : apiContext.get(url));
|
||||
|
||||
return response.json();
|
||||
} catch (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user