mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-02 13:43:22 +00:00
Fix: Activity feed AUT failure and User flaky test (#21913)
* fix flaky test * fix flaky user test * minor fix * minor fix for display name * minor fix
This commit is contained in:
parent
51b12c40bb
commit
b8112338f3
@ -906,7 +906,11 @@ base.describe('Activity feed with Data Consumer User', () => {
|
|||||||
await tagsTask.click();
|
await tagsTask.click();
|
||||||
await entityPageTaskTab;
|
await entityPageTaskTab;
|
||||||
|
|
||||||
expect(page2.getByText('no diff available').first()).toBeVisible();
|
await page2.waitForLoadState('networkidle');
|
||||||
|
|
||||||
|
await expect(
|
||||||
|
page2.getByText('no diff available').first()
|
||||||
|
).toBeVisible();
|
||||||
|
|
||||||
// Should see the add_close dropdown and comment button
|
// Should see the add_close dropdown and comment button
|
||||||
await expect(
|
await expect(
|
||||||
|
@ -494,16 +494,28 @@ test.describe('User Profile Feed Interactions', () => {
|
|||||||
|
|
||||||
await avatar.hover();
|
await avatar.hover();
|
||||||
await adminPage.waitForSelector('.ant-popover-card');
|
await adminPage.waitForSelector('.ant-popover-card');
|
||||||
await adminPage.getByTestId('user-name').nth(1).click();
|
|
||||||
|
|
||||||
await userDetailsResponse;
|
// Ensure popover is stable and visible before clicking
|
||||||
await userFeedResponse;
|
await adminPage.waitForTimeout(500); // Give popover time to stabilize
|
||||||
const response = await userDetailsResponse;
|
|
||||||
const { fullyQualifiedName } = await response.json();
|
// Get the user name element and ensure it's ready for interaction
|
||||||
|
const userNameElement = adminPage.getByTestId('user-name').nth(1);
|
||||||
|
|
||||||
|
// Click with force to handle pointer event interception
|
||||||
|
await userNameElement.click({ force: true });
|
||||||
|
|
||||||
|
const [response] = await Promise.all([
|
||||||
|
userDetailsResponse,
|
||||||
|
userFeedResponse,
|
||||||
|
]);
|
||||||
|
const { name, displayName } = await response.json();
|
||||||
|
|
||||||
|
// The UI shows displayName if available, otherwise falls back to name
|
||||||
|
const expectedText = displayName ?? name;
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
adminPage.locator('[data-testid="user-display-name"]')
|
adminPage.locator('[data-testid="user-display-name"]')
|
||||||
).toHaveText(fullyQualifiedName);
|
).toHaveText(expectedText);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Close the profile dropdown after redirecting to user profile page', async ({
|
test('Close the profile dropdown after redirecting to user profile page', async ({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user