Skip to content

Commit 1a0537d

Browse files
authored
Merge branch 'main' into 1013-institution_profile-language_and_error
2 parents ba68692 + 535bda6 commit 1a0537d

22 files changed

+51
-48
lines changed

e2e/fixtures/testFixture.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export type SBLPlaywrightTest = TestType<
3434
navigateToReviewWarningsAfterOnlyWarningsUpload: Page;
3535
navigateToSyntaxErrorsAfterSyntaxErrorsUpload: Page;
3636
navigateToLogicErrorsAfterLogicErrorsUpload: Page;
37-
navigateToProvidePointOfContact: Page;
37+
navigateToProvideFilingDetails: Page;
3838
navigateToSignAndSubmit: Page;
3939
},
4040
PlaywrightWorkerArgs & PlaywrightWorkerOptions
@@ -51,7 +51,7 @@ export const test = baseTest.extend<{
5151
navigateToReviewWarningsAfterOnlyWarningsUpload: Page;
5252
navigateToSyntaxErrorsAfterSyntaxErrorsUpload: Page;
5353
navigateToLogicErrorsAfterLogicErrorsUpload: Page;
54-
navigateToProvidePointOfContact: Page;
54+
navigateToProvideFilingDetails: Page;
5555
navigateToSignAndSubmit: Page;
5656
}>({
5757
isNonAssociatedUser: [false, { option: true }], // Default is 'false'
@@ -317,7 +317,7 @@ export const test = baseTest.extend<{
317317
});
318318
},
319319

320-
navigateToProvidePointOfContact: async (
320+
navigateToProvideFilingDetails: async (
321321
{ page, navigateToReviewWarningsAfterOnlyWarningsUpload },
322322
use,
323323
) => {
@@ -331,12 +331,15 @@ export const test = baseTest.extend<{
331331
},
332332

333333
navigateToSignAndSubmit: async (
334-
{ page, navigateToProvidePointOfContact },
334+
{ page, navigateToProvideFilingDetails },
335335
use,
336336
) => {
337-
navigateToProvidePointOfContact;
337+
navigateToProvideFilingDetails;
338338
await test.step('Provide filing details: navigate to Sign and submit', async () => {
339-
await test.step('Provide filing details: fill out form', async () => {
339+
await test.step('Provide filing details: fill out voluntary reporter', async () => {
340+
await page.getByText('Voluntary reporter', { exact: true }).click();
341+
});
342+
await test.step('Provide filing details: fill out contact', async () => {
340343
await page.getByLabel('First name').fill(pointOfContactJson.first_name);
341344
await page.getByLabel('Last name').fill(pointOfContactJson.last_name);
342345
await page

e2e/pages/filing-app/point-of-contact/checkPocFormErrors.spec.ts renamed to e2e/pages/filing-app/filing-details/checkPocFormErrors.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import { clickContinueNext } from '../../../utils/navigation.utils';
1515

1616
test('Point of Contact: Checking for form errors based on user input', async ({
1717
page,
18-
navigateToProvidePointOfContact,
18+
navigateToProvideFilingDetails,
1919
}) => {
20-
navigateToProvidePointOfContact;
20+
navigateToProvideFilingDetails;
2121

2222
await test.step('Point of Contact: Check that the error header render when no input is filled', async () => {
2323
await clickContinueNext(test, page);
@@ -50,9 +50,9 @@ test('Point of Contact: Checking for form errors based on user input', async ({
5050

5151
test('Point of Contact: Checking for unicode tolerance based on user input', async ({
5252
page,
53-
navigateToProvidePointOfContact,
53+
navigateToProvideFilingDetails,
5454
}) => {
55-
navigateToProvidePointOfContact;
55+
navigateToProvideFilingDetails;
5656

5757
await test.step('Point of Contact: Check that the error header render when no input is filled', async () => {
5858
await clickContinueNext(test, page);

e2e/pages/filing-app/filing-step-routing/errorsLogic.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const testLabel = 'Filing step routing (Errors: Logic)';
55

66
const currentStepPath = '/error';
77

8-
const userShouldNotAccess = ['/warnings', '/contact', '/submit'];
8+
const userShouldNotAccess = ['/warnings', '/details', '/submit'];
99

1010
const afterRedirectHeading = 'Resolve errors (syntax)';
1111
const afterRedirectURL = /.*errors\/errors-syntax$/;

e2e/pages/filing-app/filing-step-routing/errorsSyntax.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const currentStepPath = '/error';
88
const userShouldNotAccess = [
99
'/errors/errors-logic',
1010
'/warnings',
11-
'/contact',
11+
'/details',
1212
'/submit',
1313
];
1414

e2e/pages/filing-app/filing-step-routing/noUpload.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const testLabel = 'Filing step routing (Upload)';
55

66
const currentStepPath = '/upload';
77

8-
const userShouldNotAccess = ['/errors', '/warnings', '/contact', '/submit'];
8+
const userShouldNotAccess = ['/errors', '/warnings', '/details', '/submit'];
99

1010
const afterRedirectHeading = 'Upload file';
1111
const afterRedirectURL = /.*\/upload$/;

e2e/pages/filing-app/filing-step-routing/pointOfContact.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { verifyRedirects } from './_shared';
33

44
const testLabel = 'Filing step routing (Point of Contact)';
55

6-
const currentStepPath = '/contact';
6+
const currentStepPath = '/details';
77

88
const userShouldNotAccess = ['/submit'];
99

1010
const afterRedirectHeading = 'Provide filing details';
11-
const afterRedirectURL = /.*\/contact$/;
11+
const afterRedirectURL = /.*\/details$/;
1212

13-
test(testLabel, async ({ page, navigateToProvidePointOfContact }) => {
14-
navigateToProvidePointOfContact;
13+
test(testLabel, async ({ page, navigateToProvideFilingDetails }) => {
14+
navigateToProvideFilingDetails;
1515

1616
await verifyRedirects({
1717
testLabel,

e2e/pages/filing-app/filing-step-routing/warnings.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const testLabel = 'Filing step routing (Warnings)';
55

66
const currentStepPath = '/warnings';
77

8-
const userShouldNotAccess = ['/contact', '/submit'];
8+
const userShouldNotAccess = ['/details', '/submit'];
99

1010
const afterRedirectHeading = 'Review warnings';
1111
const afterRedirectURL = /.*\/warnings$/;

e2e/pages/filing-app/formAlerts.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ test('Form Alerts', async ({
186186
await clickContinueNext(test, page);
187187
});
188188

189-
// Point of contact page
190-
await test.step('Point of contact page', async () => {
189+
// Filing details page
190+
await test.step('Filing details page', async () => {
191191
await expect(page.locator('h1'), 'h1 is correct').toContainText(
192192
'Provide filing details',
193193
);
@@ -199,7 +199,7 @@ test('Form Alerts', async ({
199199
page.locator('.m-notification__error'),
200200
'Error alert is visible',
201201
).toContainText(
202-
'There was a problem updating your filing detailsEnter the first name of the point of contactEnter the last name of the point of contactEnter the phone number of the point of contactEnter the email address of the point of contactEnter the street address of the point of contactEnter the city of the point of contactSelect the state or territory of the point of contactEnter the ZIP code of the point of contact',
202+
'There was a problem updating your filing detailsIndicate your voluntary reporter statusEnter the first name of the point of contactEnter the last name of the point of contactEnter the phone number of the point of contactEnter the email address of the point of contactEnter the street address of the point of contactEnter the city of the point of contactSelect the state or territory of the point of contactEnter the ZIP code of the point of contact',
203203
);
204204
});
205205

src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Error500 from 'pages/Error/Error500';
1414
import { NotFound404 } from 'pages/Error/NotFound404';
1515
import FileSubmission from 'pages/Filing/FilingApp/FileSubmission';
1616
import FilingComplete from 'pages/Filing/FilingApp/FilingComplete';
17-
import FilingContact from 'pages/Filing/FilingApp/FilingContact';
17+
import FilingDetails from 'pages/Filing/FilingApp/FilingDetails';
1818
import FilingErrors from 'pages/Filing/FilingApp/FilingErrors';
1919
import FilingOverview from 'pages/Filing/FilingApp/FilingOverviewPage';
2020
import FilingProtectedRoute from 'pages/Filing/FilingApp/FilingProtectedRoute';
@@ -308,13 +308,13 @@ export default function App(): ReactElement {
308308
}
309309
/>
310310
<Route
311-
path='/filing/:year/:lei/contact'
311+
path='/filing/:year/:lei/details'
312312
element={
313313
// @ts-expect-error Part of code cleanup for post-mvp see: https://github.com/cfpb/sbl-frontend/issues/717
314314
<ProtectedRoute {...ProtectedRouteAuthorizations}>
315315
<InstitutionProtectedRoute>
316316
<FilingProtectedRoute>
317-
<FilingContact />
317+
<FilingDetails />
318318
</FilingProtectedRoute>
319319
</InstitutionProtectedRoute>
320320
</ProtectedRoute>

src/components/CommonLinks.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ function UpdateInstitutionProfile({
4242

4343
UpdateInstitutionProfile.defaultProps = { isCallToAction: false };
4444

45-
interface UpdatePointOfContactProperties {
45+
interface UpdateFilingDetailsProperties {
4646
// eslint-disable-next-line react/require-default-props
4747
label?: string;
4848
// eslint-disable-next-line react/require-default-props, react/no-unused-prop-types
4949
className?: string;
5050
}
5151

52-
function UpdatePointOfContact({
52+
function UpdateFilingDetails({
5353
label = 'update your filing details',
5454
className = 'font-normal',
55-
}: UpdatePointOfContactProperties): ReactElement {
55+
}: UpdateFilingDetailsProperties): ReactElement {
5656
const { lei, year } = useParams();
5757
const navigate = useNavigate();
5858

59-
const onClick = (): void => navigate(`/filing/${year}/${lei}/contact`);
59+
const onClick = (): void => navigate(`/filing/${year}/${lei}/details`);
6060
return (
6161
<Button className={className} asLink onClick={onClick} label={label} />
6262
);
@@ -65,7 +65,7 @@ function UpdatePointOfContact({
6565
function UploadANewFile({
6666
label = 'upload a new file',
6767
className = 'font-normal',
68-
}: UpdatePointOfContactProperties): ReactElement {
68+
}: UpdateFilingDetailsProperties): ReactElement {
6969
const { lei, year } = useParams();
7070
const navigate = useNavigate();
7171

@@ -136,6 +136,6 @@ export default {
136136
GetAnLEI,
137137
NIC,
138138
UpdateInstitutionProfile,
139-
UpdatePointOfContact,
139+
UpdateFilingDetails,
140140
UploadANewFile,
141141
};

0 commit comments

Comments
 (0)