Merge branch 'main' into issue-23356

This commit is contained in:
Keshav Mohta 2025-09-19 18:42:01 +05:30 committed by GitHub
commit e31c51f8d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 14 deletions

View File

@ -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);

View File

@ -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,

View File

@ -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')

View File

@ -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) {