MINOR: fix the lineage and DataAssetsWidget flaky playwright test failure (#19560)

* fix the lineage flaky test failure

* fix the DataAssetsWidget falky test failure

* fix falky test around the pipeline modal and teams
This commit is contained in:
Ashish Gupta 2025-01-29 11:38:01 +05:30 committed by GitHub
parent 3a8f1a6d1b
commit 3924e58073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 3 deletions

View File

@ -86,7 +86,8 @@ for (const EntityClass of entities) {
test(`Lineage creation from ${defaultEntity.getType()} entity`, async ({
browser,
}) => {
test.slow(true);
// 5 minutes to avoid test timeout happening some times in AUTs
test.setTimeout(300_000);
const { page } = await createNewPage(browser);
const { currentEntity, entities, cleanup } = await setupEntitiesForLineage(

View File

@ -114,8 +114,6 @@ test.describe('Teams Page', () => {
test('Teams Page Flow', async ({ page }) => {
await test.step('Create a new team', async () => {
await settingClick(page, GlobalSettingOptions.TEAMS);
await checkTeamTabCount(page);
await page.waitForLoadState('networkidle');

View File

@ -1301,6 +1301,7 @@ export const hardDeleteEntity = async (
};
export const checkDataAssetWidget = async (page: Page, serviceType: string) => {
await clickOutside(page);
const quickFilterResponse = page.waitForResponse(
`/api/v1/search/query?q=&index=dataAsset*${serviceType}*`
);

View File

@ -369,6 +369,10 @@ export const applyPipelineFromModal = async (
const saveRes = page.waitForResponse('/api/v1/lineage');
await page.click('[data-testid="save-button"]');
await saveRes;
await page.waitForSelector('[data-testid="add-edge-modal"]', {
state: 'detached',
});
};
export const deleteNode = async (page: Page, node: EntityClass) => {

View File

@ -11,12 +11,14 @@
* limitations under the License.
*/
import { APIRequestContext, expect, Page } from '@playwright/test';
import { GlobalSettingOptions } from '../constant/settings';
import { TableClass } from '../support/entity/TableClass';
import { TeamClass } from '../support/team/TeamClass';
import { UserClass } from '../support/user/UserClass';
import { descriptionBox, toastNotification, uuid } from './common';
import { addOwner } from './entity';
import { validateFormNameFieldInput } from './form';
import { settingClick } from './sidebar';
const TEAM_TYPES = ['Department', 'Division', 'Group'];
@ -354,6 +356,9 @@ export const checkTeamTabCount = async (page: Page) => {
const fetchResponse = page.waitForResponse(
'/api/v1/teams/name/*?fields=*childrenCount*include=all'
);
await settingClick(page, GlobalSettingOptions.TEAMS);
const response = await fetchResponse;
const jsonRes = await response.json();