fix: double icon on user event type (#15239)
* fix: double icon * test: add test for user event type
This commit is contained in:
@@ -47,6 +47,13 @@ test("check SSR and OG - User Event Type", async ({ page, users }) => {
|
||||
const canonicalLink = document.querySelector('link[rel="canonical"]')?.getAttribute("href");
|
||||
expect(titleText).toContain(name);
|
||||
expect(ogUrl).toEqual(`${WEBAPP_URL}/${user.username}/30-min`);
|
||||
const avatarLocators = await page.locator('[data-testid="avatar-href"]').all();
|
||||
expect(avatarLocators.length).toBe(1);
|
||||
|
||||
for (const avatarLocator of avatarLocators) {
|
||||
expect(await avatarLocator.getAttribute("href")).toEqual(`${WEBAPP_URL}/${user.username}?redirect=false`);
|
||||
}
|
||||
|
||||
expect(canonicalLink).toEqual(`${WEBAPP_URL}/${user.username}/30-min`);
|
||||
// Verify that there is correct URL that would generate the awesome OG image
|
||||
expect(ogImage).toContain(
|
||||
|
||||
@@ -32,7 +32,7 @@ export const EventMembers = ({ schedulingType, users, profile, entity }: EventMe
|
||||
(profile.name !== users[0].name && schedulingType === SchedulingType.COLLECTIVE);
|
||||
|
||||
const orgOrTeamAvatarItem =
|
||||
isDynamic || (!profile.image && !entity.logoUrl)
|
||||
isDynamic || (!profile.image && !entity.logoUrl) || !entity.teamSlug
|
||||
? []
|
||||
: [
|
||||
{
|
||||
@@ -47,6 +47,7 @@ export const EventMembers = ({ schedulingType, users, profile, entity }: EventMe
|
||||
title: entity.name ?? profile.name ?? "",
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<AvatarGroup
|
||||
|
||||
@@ -66,7 +66,11 @@ export function Avatar(props: AvatarProps) {
|
||||
);
|
||||
|
||||
if (href) {
|
||||
avatar = <Link href={href}>{avatar}</Link>;
|
||||
avatar = (
|
||||
<Link data-testid="avatar-href" href={href}>
|
||||
{avatar}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return title ? (
|
||||
|
||||
Reference in New Issue
Block a user