mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-02 21:53:30 +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 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
|
||||
await expect(
|
||||
|
@ -494,16 +494,28 @@ test.describe('User Profile Feed Interactions', () => {
|
||||
|
||||
await avatar.hover();
|
||||
await adminPage.waitForSelector('.ant-popover-card');
|
||||
await adminPage.getByTestId('user-name').nth(1).click();
|
||||
|
||||
await userDetailsResponse;
|
||||
await userFeedResponse;
|
||||
const response = await userDetailsResponse;
|
||||
const { fullyQualifiedName } = await response.json();
|
||||
// Ensure popover is stable and visible before clicking
|
||||
await adminPage.waitForTimeout(500); // Give popover time to stabilize
|
||||
|
||||
// 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(
|
||||
adminPage.locator('[data-testid="user-display-name"]')
|
||||
).toHaveText(fullyQualifiedName);
|
||||
).toHaveText(expectedText);
|
||||
});
|
||||
|
||||
test('Close the profile dropdown after redirecting to user profile page', async ({
|
||||
|
Loading…
x
Reference in New Issue
Block a user