Skip to content

Commit

Permalink
task: [Snapshot test - Part 8] Shared Lending Platform - User Profile
Browse files Browse the repository at this point in the history
  • Loading branch information
meissadia committed Dec 9, 2024
1 parent 34722c1 commit 40787ae
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions e2e/pages/shared-lending-platform/UserProfile.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { expect } from '@playwright/test';
import { test } from '../../fixtures/testFixture';
import { checkSnapshot } from '../../utils/snapshotTesting';

test('User Profile Page', async ({ page, navigateToFilingHome }) => {
// Go to Profile page
await test.step('H1 Heading', async () => {
navigateToFilingHome;
await page.goto('/profile/view');
await expect(page.locator('h1')).toContainText('View your user profile');
await checkSnapshot(page);
});

// Verify Name + Email
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/AssociatedInstitution.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react/require-default-props */
import { ListLink } from 'components/Link';
import { formatPipeSeparatedString } from 'utils/formatting';
import type { InstitutionDetailsApiType } from 'types/formTypes';
import { formatPipeSeparatedString } from 'utils/formatting';

export function AssociatedInstitution({
name,
Expand All @@ -17,7 +17,7 @@ export function AssociatedInstitution({
}

return (
<ListLink href={href} key={lei}>
<ListLink href={href} key={lei} className='snapshot-ignore'>
{text}
</ListLink>
);
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Filing/ViewUserProfile/UserInformation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ export default function UserInformation({
<DisplayField
label='Full name'
value={<Paragraph className='mb-[0.625rem]'>{data.name}</Paragraph>}
className='snapshot-ignore'
/>
<DisplayField
label='Email address'
value={<Paragraph className='mb-[0.625rem]'>{data.email}</Paragraph>}
className='snapshot-ignore'
/>
</WellContainer>
</>
Expand Down

0 comments on commit 40787ae

Please sign in to comment.