From 260fcb62baf92f760fb607e94ec34c62a5f208d2 Mon Sep 17 00:00:00 2001 From: S T Date: Fri, 27 Sep 2024 16:21:51 -0700 Subject: [PATCH 01/12] fix: Updates navigation.spec.ts (#966) closes #965 # Changes - Fix: Update to `Navigation.spec.ts` How to test - Run `yarn run test:e2e` - Runnthe `Navigation.spec.ts` test --- e2e/pages/filing-app/formAlerts.spec.ts | 6 +++--- e2e/pages/shared-lending-platform/Navigation.spec.ts | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/e2e/pages/filing-app/formAlerts.spec.ts b/e2e/pages/filing-app/formAlerts.spec.ts index b55484020..5124c6add 100644 --- a/e2e/pages/filing-app/formAlerts.spec.ts +++ b/e2e/pages/filing-app/formAlerts.spec.ts @@ -146,7 +146,7 @@ test('Form Alerts', async ({ await test.step('Click: Continue', async () => { await page .getByRole('button', { name: 'Continue to next step' }) - .click({ timeout: 5000 }); + .click({ timeout: 30_000 }); }); }); @@ -163,7 +163,7 @@ test('Form Alerts', async ({ await test.step('Click: Continue', async () => { await page .getByRole('button', { name: 'Continue' }) - .click({ timeout: 5000 }); + .click({ timeout: 30_000 }); }); }); @@ -179,7 +179,7 @@ test('Form Alerts', async ({ await test.step('Click: Continue', async () => { await page .getByRole('button', { name: 'Continue to next step' }) - .click({ timeout: 5000 }); + .click({ timeout: 30_000 }); }); }); diff --git a/e2e/pages/shared-lending-platform/Navigation.spec.ts b/e2e/pages/shared-lending-platform/Navigation.spec.ts index cfc417a9c..f1138ac2e 100644 --- a/e2e/pages/shared-lending-platform/Navigation.spec.ts +++ b/e2e/pages/shared-lending-platform/Navigation.spec.ts @@ -1,9 +1,11 @@ import { expect } from '@playwright/test'; import { test } from '../../fixtures/testFixture'; -test('Navigation', async ({ page }) => { +test('Navigation', async ({ page, navigateToFilingHome }) => { test.slow(); + navigateToFilingHome; + await test.step('Main Navigation', async () => { // Test Filing Link await page @@ -234,6 +236,7 @@ test('Navigation', async ({ page }) => { .locator('.navbar .links') .getByRole('button', { name: 'LOG OUT' }) .click(); + await expect(page.locator('h1')).toContainText( 'Get started filing your lending data', ); From 916f49d2a06486544c4fac1d3ddd9464a831ae6f Mon Sep 17 00:00:00 2001 From: S T Date: Fri, 27 Sep 2024 16:26:06 -0700 Subject: [PATCH 02/12] [e2e] [Unauthenticated Landing] Paperwork Reduction Act (#956) closes #941 ## Changes - e2e: tests if a user can navigate from the unauthenticated landing page to the Paperwork Reduction Act ## How to test - Run `npx playwright test --ui` - Run the test under `paperworkReductionAct.spec.ts` --- .../paperworkReductionAct.spec.ts | 27 +++++++++++++++++++ e2e/utils/testFixture.utils.ts | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 e2e/pages/shared-lending-platform/unauthenticated-homepage/paperworkReductionAct.spec.ts diff --git a/e2e/pages/shared-lending-platform/unauthenticated-homepage/paperworkReductionAct.spec.ts b/e2e/pages/shared-lending-platform/unauthenticated-homepage/paperworkReductionAct.spec.ts new file mode 100644 index 000000000..a1ee3e711 --- /dev/null +++ b/e2e/pages/shared-lending-platform/unauthenticated-homepage/paperworkReductionAct.spec.ts @@ -0,0 +1,27 @@ +import { expect, test } from '@playwright/test'; +import { expectedPaperworkReductionActUrl } from '../../../utils/testFixture.utils'; + +test('Unauthenticated homepage: Paperwork Reduction Act', async ({ page }) => { + test.slow(); + + await test.step('Verify on the Paperwork Reduction Act and link exists', async () => { + await page.goto('/'); + await expect(page.locator('#sidebar')).toContainText( + 'Paperwork Reduction Act', + ); + await expect( + page.getByRole('link', { name: 'View Paperwork Reduction Act' }), + ).toBeVisible(); + }); + + await test.step('Navigates to the Paperwork Reduction Act summary', async () => { + await page + .getByRole('link', { name: 'View Paperwork Reduction Act' }) + .click(); + await expect(page).toHaveURL(expectedPaperworkReductionActUrl); + await expect(page.getByText('/Home')).toBeVisible(); + await expect(page.getByRole('heading')).toContainText( + 'Paperwork Reduction Act statement', + ); + }); +}); diff --git a/e2e/utils/testFixture.utils.ts b/e2e/utils/testFixture.utils.ts index f26b472df..92cea34b2 100644 --- a/e2e/utils/testFixture.utils.ts +++ b/e2e/utils/testFixture.utils.ts @@ -6,6 +6,8 @@ export const expectedWithAssociationsUrl = /\/profile\/complete\/with-associations$/; // $ = ends with export const expectedPrivacyNoticeUrl = /\/privacy-notice$/; // $ = ends with +export const expectedPaperworkReductionActUrl = + /\/paperwork-reduction-act-notice$/; // $ = ends with export interface Account { testUsername: string; From c6f68dc9a818ecdb6af10d345740194015eede45 Mon Sep 17 00:00:00 2001 From: Tanner Ricks <182143365+tanner-ricks@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:49:57 -0500 Subject: [PATCH 03/12] [e2e] [Complete user profile - unassociated] Ensure first name / last name have char limits (#971) Characters limits and unicode character input tolerance need to be validated in an e2e test. ## Changes - Added unicodeConstants.ts file so that special Unicode Constants have somewhere to go. - Updated NonAssociatedUserProfile.spec.ts with a new test for character limit validation ## How to test this PR 1. Pull the branch 2. Run the e2e tests and verify that the 'Complete User Profile with Bad Unicode -- No Associations -- process' test passes --- .../NonAssociatedUserProfile.spec.ts | 68 +++++++++++++++++++ e2e/utils/unicodeConstants.ts | 4 ++ 2 files changed, 72 insertions(+) create mode 100644 e2e/utils/unicodeConstants.ts diff --git a/e2e/pages/shared-lending-platform/NonAssociatedUserProfile.spec.ts b/e2e/pages/shared-lending-platform/NonAssociatedUserProfile.spec.ts index 6959113c4..e93fe637d 100644 --- a/e2e/pages/shared-lending-platform/NonAssociatedUserProfile.spec.ts +++ b/e2e/pages/shared-lending-platform/NonAssociatedUserProfile.spec.ts @@ -1,5 +1,6 @@ import { expect } from '@playwright/test'; import { test } from '../../fixtures/testFixture'; +import { controlUnicode } from '../../utils/unicodeConstants'; const expectedNoAssociationsSummaryUrl = /\/profile\/complete\/summary\/submitted$/; @@ -31,3 +32,70 @@ test('Complete User Profile -- No Associations -- process', async ({ await expect(page.locator('#Summary div').first()).toBeVisible(); }); }); + +test('Complete User Profile with Bad Unicode -- No Associations -- process', async ({ + page, +}) => { + test.slow(); + + await test.step('Fillout Complete User Profile (No Associations) with bad unicode and verify values', async () => { + const expectedValues = { + firstField: controlUnicode.slice(0, 255), + lastField: controlUnicode.slice(0, 255), + // TODO: Update with correct value after char limit in place, see: + // https://github.com/cfpb/sbl-frontend/issues/972 + finField: controlUnicode, + // TODO: Update with correct value after char limit in place, see: + // https://github.com/cfpb/sbl-frontend/issues/972 + leiField: controlUnicode, + }; + const unexpectedValues = { + firstField: controlUnicode, + lastField: controlUnicode, + // TODO: Change to controlUnicode after char limit in place, see: + // https://github.com/cfpb/sbl-frontend/issues/972 + finField: '', + // TODO: Change to controlUnicode after char limit in place, see: + // https://github.com/cfpb/sbl-frontend/issues/972 + leiField: '', + }; + + await page.getByLabel('First name').click(); + await page.getByLabel('First name').fill(controlUnicode); + + await page.getByLabel('Last name').click(); + await page.getByLabel('Last name').fill(controlUnicode); + + await page.getByLabel('Financial institution name').click(); + await page.getByLabel('Financial institution name').fill(controlUnicode); + + await page.getByLabel('Legal Entity Identifier (LEI)').click(); + await page.getByLabel('Legal Entity Identifier (LEI)').fill(controlUnicode); + + await expect(page.getByLabel('First name')).not.toHaveValue( + unexpectedValues.firstField, + ); + await expect(page.getByLabel('Last name')).not.toHaveValue( + unexpectedValues.lastField, + ); + await expect(page.getByLabel('Financial institution name')).not.toHaveValue( + unexpectedValues.finField, + ); + await expect( + page.getByLabel('Legal Entity Identifier (LEI)'), + ).not.toHaveValue(unexpectedValues.leiField); + + await expect(page.getByLabel('First name')).toHaveValue( + expectedValues.firstField, + ); + await expect(page.getByLabel('Last name')).toHaveValue( + expectedValues.lastField, + ); + await expect(page.getByLabel('Financial institution name')).toHaveValue( + expectedValues.finField, + ); + await expect(page.getByLabel('Legal Entity Identifier (LEI)')).toHaveValue( + expectedValues.leiField, + ); + }); +}); diff --git a/e2e/utils/unicodeConstants.ts b/e2e/utils/unicodeConstants.ts new file mode 100644 index 000000000..f9d976d3d --- /dev/null +++ b/e2e/utils/unicodeConstants.ts @@ -0,0 +1,4 @@ +// Test string that contains +// 'invisible' unicode +// control characters +export const controlUnicode = 'ȃ̸̡̡̡̛̛̛̛̛̛̛̮̝̫͓͚͎̘͉̞͙̯̲̬̖͕̥̦̼͈̳͔̟̥̜͕̯͚͈̩̼̪̤̝͉͙͕̭̃̔̈̂̇̅̀͊̀̓͋̽͊̍̄͆́̈́͛͒̈̉̇̑̓̊̋̔̒͆́͋͋̎̄͑̂̌̓̔̀͑̈́̀̑̈̔̊̾͂́̓̐͐͆́͐̀̋̓̄͛͊͗͊̒̿͗́͌̂̀̆̈́̈́͑̑͑̽̌̎́̏̓̈̎͐́̍̽̈͐̈́̃̔̒͒͛̎͆͋̆̈́͒͗̔̿̃͂͑͆͌͐̇̔́̅̄̄͆͋̆̇̀͊́̐̈́̽́̉͆̋͒̍́̊̈͐̐͊́̑͑̌̌́̐̽̇̂̓̆̿͒́̅͛̓͋̏̏̃̆͋͒͐͑̆͛͒́̋̄̈́́̾̍͗͆͊̈́̍͛͗̉̄̓̀̏͋͌͐́̿͌̿͆͂̀̈́̀͑́͆̎͐̾̊̅̅͑̎̆̈́̕͘̚̕̕̕͘̚̚̕͘͘̕̕̕̕͝͝͠͝͠͠͝͝͠͠͝͝͝͠ͅͅs̴̡̡̡̢̨̡̢̨̨̢̧̢̢̨̧̢̨̛̛̬̲̤̙̬̟͎͈̫̬̬̗͙̬̻͕̰̖͈͈͎͓̻̝̻͇̭̙̭̣̳͎͈̪̻̖͇̰̜̤̺̺̩͖̘̲̳̻͓͎̰̞̰͙̰̮̣͇̘̖̟͉̯̦̝̖͉̜̫̝͉̘͎̯̗̗͇̲̯̗̰̯͔̩̦̰̥̗͔̙̟̪̲̼̞̹̦̺̤̻͈̱̥̥͕̟͓̝͉̖̜̫̤̮̘͉͈̥̪͔͇̖̝͚̹̬̤̹̥̲̞̣̤̟͇͇̰͖̟̘̠̘͇̜̩̺̻̰͚̘̯̹͕̺̠̪̻̗̱̜̞̙̺̩̟̩̰̫͉̦̟̰̼͉͎̲̜̠̈̌͆͑̒̐́͌̏̍̑̃͊͋̾̈́̔̑̋̍̃̍͐̾̋̐̈̌͑̈́̍́͋͂͌̅̋͊͊̑̃̉̉̒͒̿͗̋̋̓͐̾͑͗́̇̎̾͑́̉͐͊̂̾̋̇͐̅̈́̏̓͗͐̀̏͗̔̍̇́͐̈̑̐̍̈́͑̇̓̾̈́̓̍͂́̏̋̋͂̅̅͊̓̆̈́̉̿̂͆̊̀͛͆̔̄̂̈́̌͒̍́̾̅̑͒̀̃̓̅̆̊̾̾̂͒̎̅̅̿̌́̊̃̾̍̾̍͒̉́̆̉̓͑͊͊̎̓̈́́̍̓̿͐̅̋̅́̃̒́̉̇̈́̏͒̒̅̅͊̈́͑̇̿̾̏̊̂̽̃̈́̃̈́̀̿̐̍͌̅͑̋͂̓̎̎͛̃̾͒͋̆̃́́͂͋̑̍̈̌̊̋̈̋̾̈͋̎͗̇̌̈́̀̂̇̚͘̕͘̕̚̚̕̕̕̕͘̕͘͘̚̕͜͜͜͜͜͜͜͝͝͝͝͝͝͝͝͝͠͠͝͝͝͠͠ͅͅͅͅͅḑ̶̡̡̨̧̡̨̧̧̡̡̢̡̡̨̡̢̧̛̭͔̦̱̖̰̲̼̥͔̙͓͎͇̗̣̞̘̯̜̟͙̘̫̘̹̲͈̩͈̙̻͚̺͓̭̤̣̣̩̗̬̳̜̜̣̤̥̯̬͙̗̬̩̲̮̱̝͖̱̥̭̙̖̰̻̱̗͖̲̮̬̺͔̞̬͎̫͕̖͇̹̩̳̟̹̯͍̤̥̗̼̩̝̱͉̹̦̣̬̖̜͓̖̘̖̣̳̻͙͓͍̮̥͕͚͉̼̤̤͍̰͖͙̭̫̠̠͓̫͚̯̝̘̰̤͛͊͒́̇̓̅̈́̃̉͂̾͐́̊̑̃̔̈́͋̈́̆̇̎̈͐̽͌̕̕͜͜͜͜͜͜͜͠͝͝ͅͅͅͅͅf̸̨̨̧̨̧̢̨̧̢̧̢̛̛̛̛̬̥̥͚͕̟̻̣͚͖̲̖̥̣͔̩͇̹̦̮͓̰̥̭͔̠̙͙͇̼̣͓̻͕̯̱͉̼̲͔̜͔͇͔̠̝̩̲͕̺̞͇̼̺̹̞̪̯̦̫̯̰̫̥͙̮̺̣̰̜̖͓̗̯̳͕͓̞̭̜̘̘̯̹̠̖̘̮̪̪͈̰̣̤̙̯͖͚͎̖̭͔̗͕͇̹̹̗̬̮̪͔̲̯͚̠͔̫͎͍͔̍̅̌͆͒͌́̐͑̌̏̇̒̌͋̂̃̀̑͒̅̔̔͗͒̾̃͊̆̔̿̀̓̋̀͑̅̒͑̎̔̑̉̍͊͑̂̉͒̔̈́͗̀̈̀̅͛̅̃͂͂͑̋͐͑̄͂͛̅̈͗̀͛̓̉̌̓͛͋̅̄̒̄́̈́̋̓̂̐̄̄́̂̄͊̌͛́̉̈́̃́̂̈́̈́͂̈́̏̋̇͆́̂̒̿̅̈̇͒̍͋̏͆͐̀͌͊͊͒̽̑̽̈́̀͆̎̔́̒̀̇͂́̐͆̊̀͋̓̈́̽̍̀͆̇͐̋̊̆̀͛̌͂̀̒̓̓̔̑͐̈́̿́̊̑̈̿̎̍̍͐̿̇̃͌̀̈́̉͐̓̋͊̇̓͊̄̔͆̍͐̀̎͌͋̓̀̅́̐͌͂̔̀̈̽̀̎͛̕̚̚̕̕͘͘̚͘͘̕̚̕̚̕̚̚̚͘̚͘̕͜͠͠͝͠͝͝͝͝͝͝͝͠͝͠͝ͅͅͅͅͅͅs̷̢̧̧̡̢̡̡̧̧̧̧̡̡̡̨̡̨̧̢̡̡̡̧̢̨̨̛̭̱̹̖͔̦̠̰͇͓͙̖̝̖̝͍̳̟̠͕̫̫͖̦͈̩̳͖̮̗̳̩̼̼̞̘͉͉͚̭̮͎̗͍̤̦͔̮̣̖͇͍͎̝̞̰̥̘̭̙͙͚̥̦̥̗̣̹̫̦̬̖̝̞̳̦̳̰̜̼̘̞͈̙̣̱̟̪̲̼̟̭͈̯̠̰͔̣͎͈̝̗͚͈͕̯̼͇͔͔̬̹͍̥̜͖͍̘̟͈̳͕̙͈̝̜̰͈̗͖̖̻͎̝̝͕͍͕͇̦̫͈͔̞̪̠̻͎̘̲̳̝̺̻̰̙͙̘̪͙̟͖͓̫̘̲͙͖̥͙̫̮̺̪̟̝͍͈̭͍͎͔͕̠̠̤̞͉̘̺̺͉̙͍͕̹̰̦̙̟̯̘̠͍̺̱͇̥͈̗̲̹̤̦̹̟̠̝͚̮̹͉͈͔̤̪̫͕͕͈͎̭̯̣̖̞̰͎̟̤̻̖̠͓̞̹͖͚̋͑́̈̎͌͋̀͗́̑̓̀̿̏̽̐͆͆̿̇̍́̌͗͘͘̕͘̕͜͜͜͜͜͠ͅͅḑ̸̢̧̧̧̢̨̨̢̧̧̢̨̧̡̨̢̧̡̡̨̨̢̨̧̛̛̛̛̛̛̫̩̳̖̘̪͚̭͖̱̥͙̹̖̞̗̫̘͕̲͎͍̖̣͍͈̜̮̤̮̩͍̖̜͉̼̮͙͎̤̪͇̗͚̥̟̺̘̗͉̱̟̼̥̞̜̤̫̫͉͇̳̻͇̣͎͔͇̤̼̭̠̗̭̻̘͈͔̣̞͕̜̗͇͓̥̩͖͎͔̪̝̳̦͖̙͕̟̘̜̝̫̥͈̣̬͎̻͈̝̹̼̱͇̞̬̩̹͓̠͇̩̱̗̰͕̖̺̹̪̗̙̞̱̫̻̩̮̣̳̗̣̣̦̖͚̠̝̗͖̯̣̦̜͈̻̫̟̙͎̳̻͕͎̝̥̭͙̰̻̖̲̜̪͔̼̖̰̠̖̙͓͎̬̼̫̙͂̿̇́̓̔͆́̀͐̂͒͛̀̀̃́̌̔̇͑͊́̌͛̎̓̒̈́̐͗̓̀̎̓̊̊̉̓̇̓̊̅̈́̉̈́͑̌̑͐̔͗̉̑̈́̈́͆́̍͂̋̈́̐̋̋͋̀̾͗̓̐͐̍͊͌͆̔̈́̓̒̂̀͋̀͛͌̆͋̒̀̀͌̾̈̉̇̅̀̀̋̃͆͗̕͜͜͜͜͝͝͝͝͝͝͝͝͝͠͝͝͝͝͠ͅͅͅͅf̵̨̧̨̢̧̡̢̨̢̨̡̡̛̛̛̭͎̜̰̩̞̣̣͕͈̤̟̪̥̗̻̹̳͍̝͓͈̲͙̦͈̰͎̣̖̹̥̪̼̜̻̞̫̘͔͙̞͖̝̣̳̖͚͔̺̳͉̳̞͎͉̼̬̠̝̼͙̖̠̯̼̭̙̞̲̙̟̙̺̖̙̻̥̘͎͕͕͍̠̳͉̰̣̺̩͖̦̼͔̪͉͓̹̳̤̦̆̽͒͗͆̓͛̐̉͑͛́͌̃̉̓͒̍̊͑̋̽̓̂̾̉͐͋͌̿͑͒̋̉̆́͋̄̎̓̅̈́̇̇̔͛̀̽̇̔͋̌̈́͌̇̌̈̈́̅̎̓̇̐͘͘̚̚̚͘͝͝͝͠͠͠͠ͅͅͅg̶̢̡̡̨̧̡̨̢̢̧̢̢̡̡̧̧̡̧̧̢̧̧̨̡̡̛̛̛̛̛̠̟͇̝̟̣̤̮̘̞̫̹͙̳̬̤̼̣͎̖̟͉̺̫͙̟̳͎̝̜̩̫͉̱̹͙̲̤̩̯̻̖̱͇̖̥̗̫̻̘̯̥̤̥̘̜̱̣͚̳͓̹̭̫̹̟̠͈̤̰̩̳͎̖͍̗̹͉͔̗͎̯͚̮̩̥̙͔̥͎̹̯͔̖̣͈͍͙̜̺̤̻̤̥̰͇̖̙̙̦̪̙̞̝͓̠͉̭̦͕̟̱͎̝͚̙̰͕̫̙̤̜̬̲̳̳͈̯̹͉̩̬͎̻͖̠͔̮̦͕̙̳̰̹̭̤̳̟̗̺͈̳̦͙̖͖͔̖̱̱̦̱̖͔̦̟̗͈̖̦̯̫͈̤̬̮͈̞͔̼͇̱͔̹̩̺̬̝̜̬͖͕̦̹̪͔̤̼͖̬̪͈̤̥̪̦̞̰̗̲̤̜̳̯̣̲͍̥̩͔͉̗̠̻̻̬͉̦̯̩̤̦͎̟̗͇̠͓͙̤͎̰̝̙͚͖̜̽͛̎̀͛̇̎̒̿̊͂̑̽͋̍͌͋̓̎̄͌͆̍͑͗̈̅͒̀̃̌̃̈͂̃̊̍̊͊̌̃̌́͗͆̀̿̃̀̈̂̐̈͑̍͊̂̓̍̎͒̐̔̔̀̏̇̄̈̓͊͒̽̓̏͌͆̐̍͛̑̌́̀̌̄͛̽̈́̒̉̋̈́̓̉̅̅̈́̋̓͂͌̌̀̽̿͋̈̾͂̉̌͆͛̄̋̏̓̍͌̈́̍̊̀̂͒̐̅̇̌̈́́̊̓̀̋͊̾̈́͌͌̌͌͋͐̓̍̂̔̾͑̿̿̏̇́̂͐́̈͑̑͛̆͌͐̄̒̽̌͌̈̅̀̉̈́̈́͆̏̍̅̈́͆̓́͆̈̅̓̄̍̉̋͌̀͊̐́́̀̓͐̀͌̀͛͂̏͆̽͌̐̅̈̃͌̌̏͒̍̾̈͛̾̆̊͑̃̿̾̃́͘͘̕̕̚͘̚͘̕̚̕̚͜͜͜͜͜͜͜͜͜͜͜͜͜͝͠͝͝͠͝͝͝͝͝͠͠͝͝͝͝ͅͅͅͅͅḑ̶̨̧̡̢̧̨̨̨̡̨̧̡̡̨̢̢̡̧̨̧̧̨̛̛͈͍̲̻͇̟̬̝̺̱͇͖̻͎͙̘̗̰̭͉͔̪͍̬̯͉̰̞̝̩̙̰͎̻̟͚̗̫͓̮̫̱͕͖̠̼̩̜͖̹͕͍͚̭̜̭͍͇͚̤̼͚̠͕̙͙̞̙͇̘͕̻͕͔̻̪̥͉̳̞̮̲̜̠̗͇̤͖̭̤͉͔̮͚͖̦̫̘̙̱͔̖̩̪̠̼͔̻͔͙͔̰̘̠̪̣͉̫̻̪͉͉͈͖̞̮͇͓͖͎͉̼̺̮̼̣̜̩̩̠̯̭̤̠̦̳͙̱͉̺͈̱̙̖̘̠̳̤̼̬̗̠̮͙͈̠̣̜̰̘̣͓̙̗̞̪͍̺̮͙͓̪̭͉̙̳͙̩̟̖̪̬̹̦̮͇̌̽͑̈̐͛̉͛͐̂̿͆́̏́͛̊͂̊̋́̄̅͌́͗͑̓͂͑̐̎̐͛͐̈́̅̓͊̈́̊͊̽̽̒̈́̇̊͒́̓̉̓̀̋͋̃̉̑͌̃͂̿͐̅̊͌̊̓̚̚̕̚͜͜͜͜͜͝͠͠͠͝͝͝͠͝͝ͅͅͅͅͅͅf̴̢̧̢̢̡̡̢̧̧̢̡̡̢̡̡̧̨̛̛̛̛̙͚̭̥͖̜̘̪͉̭̘̱̖̲̘̝̤̣̙̲̙͍̣̤͇̘͔͖̦̥͔͍͎̟͍͎̤̩̘̘͈͕͖̜̲̱̩̭̬̣̪̦͔͚͇͙͎͔͍͈̪͚̝̭͖̰̥̪͕̫̩̼̘͎͔̺̱̙̖̱̲͕̭̯̖͔̞̪̗̤̼̬̟̳̣͓̱̖̟̮̫͙̦̲̙̯͇͎̯̲̲̼̰̱̼͓̣̮̤͇̗̙̫̗̫͓̟̹͖̹͈̠̱̥̩͔͉̐̄͆͑̉̆̅̀̎͛̑̐̆̅̀̓̓͆̿̍̈͆̄̀̍̐͗͂̈́́̾͛͂̊̋͒͆̅̈͂̑͆̅̃̀̇̅̿̍̈̓̈́́̀̉͒̆̾̀́͌̓́̑̈́̓̀̋̈́͌̈̀̾̄̊̑̉̔̓̈͆̾́̊͋̆̓͐́̊̑̌͗͐͌̋̃́̀͗̋̐̄̂͆̾̂̀͑͗̇̐̋͊͂̄̏͊͐̎͆͗̽̐̀̀̃͛̽͆́́̃͌̉̾͊̋͊͌͗͋͒̃́̇͋̉͒̈͆͗͊̐̀̓̈́͗̈́͌͂͋̉͋̔͌̏̈́̊́͂͐́̆̏̅͑͗͌̎͘͘̚̕͘̕̕̕̚͘̚̚̕͘͘̕͜͜͝͠͝͠͝͝͠͠͝͝͠͠͠͝͝ͅͅͅͅġ̶̡̢̢̧̧̧̛̛̛̛͕̮͉̝̜̬̰̙͉̙̺̳͔̺͚̝̝̳̫͖̹̩͓̠̘͕̮̙͎͖̘̜̞̱̙̩͙͇̦̖͓̼̫͔̭̰͔̣̯̗͉̠̭̭̹̼͓̥̤̪̥̖͚̟̱͍͍͚͈̞͎͖̞̝̮̘̺͓̩̼͚̺̩̯̈́͛̃͌̆͋̀͌̽̐̐̏͂̒̐̈́͗̾͆̆̿̉̈̔̂̌̌̀̽̂͐̆̂̂̈̇̎̓̾͗̆͒̒̄̽̅̀̑̿̔̃̇̈́̈́̀̐͋̋͋̔̅̈́́̽̓̈́̇̓̉̀̑͋͑́̅̿͊̊͒̂̊̂̔͛͆͋̎͌͛̃̽̇̀͗͒́̍̓̊̊̓̅́̒͗́̍̃̉͊̓̃̋͗̈̀͌͐̊̊̋͐̓̍́̊̄͛̍͊̐͒͑͑̀͗̈͒̾́͆̊̓̒̆͂̊́̈́͛̾̿̏̽̐̇̎͛̊̾̽͆̅̓̈́̉̋̋́̈́́͑̐̀̽̃̽͂́͛́̿̓̿̀̉̓̈̒̂̈́̿̔͂̐͋͛̀̃̆̐̂͌͑̐͊͗̍̌̒̽͑̚̕͘̕̕͘͘̚̚̕̕͘̚͘̕͘̕͜͜͝͝͝͝͝͝͝͝͝͝͠͝͝͝͝h̷̡̡̨̨̧̨̢̨̢̧̧̧̢̢̡̡̡̡̢̡̢̡̡̡̨̡̨̡̨̛̛̛̛͎̠͚͙̗͍̯͈̻̘̰̖͕̗͎̭̤̬͙̱̙͖̩͇̱͇̠̺̠̫͈̗͔͚̭̹͕̹͕̫̭̳̰͚̪̰̗̘̻̩͕̟̩̲̪̲̞͖̜̹̪̩̟̫̤̯͖͇̹͉̰͎̫̪̲̞̰̰̳̗̲̗̦͔͈̳̟̻̦̤͕̳̞̯̳͉̫̭̰̲̗̟̰͈̼̥̞̖̪̳̯̠͎̭͇̩̠͈̙͙͕͕̖̗͖͓̜̫̪̺̗̟̗̭̣͔̝̳̮̠̭̘̰͙͈̗͕̲̫̘̬͙͓͎̖̱͇͙̯̳͖̜̪̤̝̟̮͓̖̝̠͓̟͇̺̘̗̠̘̺̘̱͓̮̩̤̺̜̬̦̺͍̩͎̱̰͍̜͔̜̖̝̩͔̯̤͚̤̣̬͙̳͎̪̯͙͙̮͔̲͕̩̩͈͚͓̣̞̫͖̼͈͙̪͈̻̹͍̱͚͎̬̹͉͎͔̫̜͖͙̉͆̈́̄͆́̌͋̀̊̏͑͗́̐̄̓̉͋̍͋̒̔͗̿̂̈́͑͆͆̏̌̋̃͊̆̃̏́͒̑́̎͆͆͂̾̒̈̒͆̐̃́͆̽̐́͌̏͛̔̾͌̓͛̊͆̑̊̾̔̍̊̔͊́̅̾́̓̓̏̌̈́̔̄͒̑͆̾͐͂̾͐͂͗̒̀̉̒̀̑̄̽̄͛͗͛͒̋̑̂͛̌̓͂̾̔͑̎̾̂̑̒̎͌̔̽̑̓̿̍̆̃̽̉͗̽̓̐̾̆́͗͌̏̏͗̽̿̈́̽̈́͗̌̋̄̈́̽̚͘̕̕̕̚̕̕͘̕͘͘͘͜͜͜͜͜͜͜͜͝͠͠͝͠͝͝͝͠͝ͅͅͅͅͅf̴̨̧̡̛͔̹̯̠̜̦̩̞̳͉͉̳̳̙̥̜̤̗̞̗͚̮̱̻͆͌̈́̈́̊̍̎̍̓̄͐̓̉͌͆͐̃̀̈́̌̉̿̈́́̇̀̈͆̌̇͊͛̿͂́̎̐̊́̂͆̿̅͘͜͝g̸̡̧̡̧̢̡̨̧̨̧̧̡̨̡̨̧̨̢̨̨͔̻͈͇̦͕͔̘̖̪̞̠̜͕͚͇̗͙̫̗͔̫̝̲̟͖̫͈̜̮̪̣̰̰̯̤͍͚̗̗̼͔͈̜̼̹̱͓͔̱͔͓͍̥̘̱̫̬̥̜̩̤͈͈̙͙̘̮̣̟͖̯͓͖̥̫͉͇̬̻̝͉̯̳̲̬̗̥̟͎̻̭̣̺̥͔͕̟͙̹̪̞͚̖͔̥̗͖̭̞̫͎̯̟͉̱̫͇̱͙̮̞͕̱͎̜̙̭̻̰̮̝̳̹̗͉͔͓̦̖̘̙͉͉̘̟̖̞̥͕͍̲̜̀̂̿͋́̿͗̽͒̍́̊͑̐̏̿́̊͌̽́͑̌͗̎̌̎̉̃͋͘̕͜͜͜͠͝͠͠ͅͅͅh̸̨̧̢̡̡̧̡̛͎͚̗͕͖̣̰̞̬̺̠̖͖̰̪̬͕̮͙̦̖̰̟̪̖̳̩̖̜̱̺̭̪̮̩̬̹̬̞̭̰̺̦͙̝̠̠͎̪̥̗̣̖̭̤͔̮͉͈͎̣͛͑̉̂͐͊͋̒̾͊́͗̌̔̈́̏͊̆́͋̀͛̋̎̓̈̿͊̊̃̉̂̌̎̍͗̅͘͜͜͠͠͝͝͝͠ͅj̸̧̡̡̡̢̢̡̢̨̨̨̨̧̡̡̡̧̧̢̧̨̨̛̛̛̛͖̼̥̰̠͍̳͈͎̟͓̲̬͉͎͖̖̳͔̝͈͇̘̦̭͙͈̳͖̪̦͚̞͕̜̬̥̦̮̟͚̹̗͈̫̠̮͉̩̥̲̪͎̭͖̜̣͙͖͓̦̱̻̲̖͉̖̮͙̦͔̣̬̤̠̙̖̤͈͕͓̙͉͈̮̭̝̪͉̯̖̤̤̭̭͚̱̪̬͙̱̞͙̪͉̺͍̮̘̩̱̬̳̞̱͙̯̣̯̜̗͕̯̖̬̬͉̠̠̪͉͚͙̤̫̱̪̳̤̤͙̝̳̮͓̼̪̜̳̦̫͓̩̤̞̜̲̣̘̜̖̠̠͚̟̤̳͓͙͈̥̪͕̼͇͔͔͉͔̮͇̹̰̥̳̰̺̼̘̟̗̦̳͍̪̬̤͕̠̭͓͚͓̝̼̙̘͍͉̯͕̬̳̋͛̽̀͑̈́̑͌̀͛̓̈́̈́̂̒̈͆̇̒̔̾̍̍̾̉͒̄̊̆̏̈́͑̇̏͊̿͂̂̊͌̈́͗͐͐̌̃͌̽̋̔̍̏͒̐̑̈́̏͊̃̀̈̈́̎̂̈́͛͂̽́̈̉̆̀̍̏̉́̃͛͊̓̿͛͂̋̃̍̔̏̅̍̄̏͒̋̊̋͗͆̓͌̄̈́̄̀̄̒͗̀̎͊̆̑̐͆̿͗̎́͆̕̕͘͘͜͜͜͜͜͜͜͜͜͜͠͝͝ͅͅͅͅͅͅͅǵ̶̢̧̧̨̧̧̨̢̡̧̡̢̢̢̨̨̡̧̢̛̛̛̤̜͈͇̟̼͖̞̫̫͕̻̞̰̞̹͈̜̜̰͙̳͖̙̝̹͉̭͓͖̹̼̮̳͔̗̮̖͈͙͍̭͎̩̮̼͚̝̱̜̭̠̣̤̤̣̺̰̪͕̤̣̖̣̳̻͙̯̤͉̠̮̜̪̳̦̤̫͕͍͕̺̪̘̰̣̹̹͖͍̹̱̲̣̗͉̙̟̟͈̦͇̘̭̥͈͖̬̙̜̝̦͎̣̗͍̯͉̦͙̫̞̙̹̙̝̣̹̪̝͚̱̝͍͓̜̭͉͎̭̹͎̖̮̙͓̝̱̭̠̯̖͈̯̟̟͈̥̲͖̜͎̠͎̟̩̻̻̗̹͕͙̟̳̘͉͕̪͈̙̞̙͇̬̺̟̻̯̘͚͕̬̝͈͉̣̬͚̻͓͔̩̳̣̜̯̬̳͎̺͖̣̗͇̦͇̞͐͂̽̑̍͛̀̒͛͊͑̀̾̃̔̏̌̐̐̉́̆͋̈́̈̆̐͊̒̽̂̐̓͐̓͋͒̐̈́̀̈́̓̄̿́͊̒̇̒̌̑͗͛̊̇̎̀͒͊̌̒̂̓̆͌̎̔͊̆͋͛̓̾͑̈́̓͋̀̄́͆͒̓̀̉̈́̀̌̊͐̀̀̅͑̿̾̾̿̽͂̈̊̌̔̿̿͗̂̊̊̓̋͂̇͋͛͛̚̕̚̕̚̕̕̚̕̕̕͘̕͘͘͜͜͜͜͜͜͜͝͠͝͝͠͝͝͠͝͝͠ͅͅͅḩ̷̡̢̡̡̢̡̡̡̢̧̢̡̡̛̛̛̞̞̙̦̹͉̭͉͎̯̘̤̤̖̬̦̼̻̮̬͖̟̤̥̤͉̫̲̲͍͚͕̥̹͚̺͚̞̝͖̳̗̬̤̱̜̰̞͇̬͈̣͚͉̜̲̲̱̭̟̰̠̥̜̦̦̤̞͇͇̼̹͉̟̝̼̹̦͙͔̹͈͉̞͖̯̘͈̼̗̦̖͇̭͚͔͖̻̮̞̗͖̟͎̠̦̰͙̯͉̪̘̩̠̻͍͚̻̲̠͓̠̗͙̖̻̯͙͈̖̯̟̦͚̘̹̮̦̲̮̱̩̻̫̫̮̰̥̠̩͍̙̺͇̱̘̝͓̭̱̜̯͎͎̱͕̥͇̬̫͉͕̣̬̩̮̮̮̲̪͈͔̱̬̱̖͓̳͚̥̃̃̓̌͐̾̊̉̔͊̂̍̃͛̈́̃̏́̉̾̓̔̅́̑̎̃́͑͂̑̉̈́́̈̄̾̾̎͆͗͑̆̈̊̋̋̅̌̓̀͋̈́͋͛̈͛̀͗̌̓̈͐͐̿̔̅͒̈́̎̈́̃̒̃͋͗͆̿̏͗̑̈́̎͗̾̆̔͊̓́̾͒͑̆̑̍̑̽̈͋͒̑͆͐̇͌̇̾̈́̏̂͛͆̄͗̌̍̒̈́̄̈́̽͊̂̈́̐̽́̈͌̍̌̄̄̔̅̇̑̃́̄͊̔͗̏̌̀̆̍̍̎̑̓̔̐͆̋̿͆̈́̌̔̓̇́͗̿͗̎͂̋̾͆͛̃̆̔͌̓̌̅̃͊͛̎̔̋̈́͌͊̍̽͌͋́̈̿̆̿̆̔̉̋́́̂̚̚̚̚̕̕̚̕̚͘̕̕͜͜͜͜͜͜͝͝͝͝͝͠͝͠͠͝͠͝͝͝͝ͅͅj̴̢̨̨̨̧̧̛̛̛̛̛̖̥̲̟͔̝̰̘͓̲̜̼̪̦̩̝̲͇̣͓͉̼̦̙͍͇͚̩͇̩̖͍͉̦͎̤̯͉̬̺̜̣̰̪̹͔̜̻̝̹͎̖̝̱̰͔̙̺̤͖̩̤̱̫̞͔̝̖̱̠̬̳̺̘̘̬̗̙̹̗͚̦̥̱̜͇̹̻̻͚̪̞̥̼̜̙̟̼̰͕̣̖͖̗͚͓͚̦͈̣̭͓̳̲̦̜̖̖̣̼̠̩͓̣͕̞̱̤̻̮̳̺̠̗̝̮̦̗̩͔̪̦̤̬̺̦̻̼͌̏̐͗̅́̄̌͌̑͆͂́̆̈́̒͋̔̑͌̔͒̋̀͐̑̓͑̃̍́̿͑͗̐͒̍͐̏̽͆̐̈̒̊́̒̑͑̑̃̓̿͗͗̀͒͋̂̏̽̏̇̉̀͊̽̃̆̔̅͆͊͆͋̆̍̅̃̍̆͑̓͐̌̈́̈̀̒̿̈́̈́̃̀́̈̃́̌́̏̎͆̓̒̆̉̓͋̉̿͛̐̀̈́̀̊̿̈́̒̽́̑͊̍̐̋̉̾̈́́͂̈́̒͆͗̈́̽́͒͛̑̀̽͊̽͋͋̀͊̎̌͂̆̌̎̓̄̓͌̾̾̒̆̋̂́͊̄̉͌̑̇͂̋̔̎͌͊͂̀͂͑̃͛̽̿͌̂̈́̀͑̏̆̈̒̈̅͂̋̌̎̌̅̾̈́̓̒̍̊̆͛͛͒̀̀̽͂̈́͊̆̍̅̐̿̽͑͌͂͆͐̿̍͂̏̌̈́̈́̇́͊͗̃̆̑͐͛̑͗͗̇͐̍̀̽͆̍̚͘̚͘̕͘̕͘̚̚͘͘̚͜͜͜͜͜͝͠͝͝͠͠͝͝͝͠͠͝͠͠͠͝͠ͅͅk̵̨̧̢̢̧̨̨̧̡̧̧̡̨̨̢̨̧̨̨̛̬̖̰̦̟̟̘̠͙͙̗̮̙̤̞̭͇̟̖̘̦͎̹̠̭̘͙̝̹̳̫͇̠̺̠̪̤͍͉̘̲̞̣̦͉͉̻͉͖͍̝̻̤͈͕̼̼͍͙͖͙̤̯̙̟̪̰̤̻͎͙̹̱̩̭̲̱̰͇͙͖̝̩͇͉̲͉͈̱̝͈̫̲͚̣͙̘͔̩̥̝̮̳̭̤͍̘̤̪͈̮̮͉̘̰͕̖̻̦͕̝̭̘̙͇͔̘̥͓̱̪͖̺͍̭͚̹͉̼͙̫̭̜͇̲̯̘̙̹̘͚͔̹͖̟̯͓͍̣̜̮͈͈̥̱̖͙̲̤͓͈̪̰͕̼̍̄͋́̌́̏̀̐̽̑̎̋́̑̐͛͊̂͊̔̉͒̒͑͜͜͜͜͜ͅͅͅ'; From 736847547b09515ae21934f5a38e9fc58aca86b0 Mon Sep 17 00:00:00 2001 From: S T Date: Mon, 30 Sep 2024 15:46:46 -0700 Subject: [PATCH 04/12] [Point of Contact] Phone extension field (#961) ## Note Be sure the pull the latest from [_sbl-filing_](https://github.com/cfpb/sbl-filing-api/pull/421) via `yarn update` closes #945 ## Changes - feat(Point of Contact): Added Phone Extension field to Point of Contact Field - chore(Point of Contact): Phone Extension breakpoint of 600px - feat(Sign and Submit): Added Phone Extension field to Verification field - chore(Sign and Submit): Matched order of fields to be the same as Point of Contact - feat(e2e): Added Phone Extension field to e2e test - style(DisplayField): added `work-break: break-all;` - content(Sign and Submit): added 'Extension' ## How to test this PR ### First Test 1. Upload a filing and navigate all the way to _Point of Contact_ 2. Verify the Phone Extension in both mobile and desktop (901 px and _above_) 3. Open the Network tab, submit and verify the request and response jsons contain the phone extension (i.e. `phone_ext`) ### Second Test 1. Navigate all the way to _Sign and Submit_ 2. Verify the `DisplayField` contains the submitted phone extension ### Third Test 1. Run `yarn run test:e2e` 2. Run the _sign-and-submit_ test to ensure it passes ## Screenshots | PoC (Desktop) | PoC (Mobile) | Sign and Submit | | -------- | ------- | ------- | |Screenshot 2024-09-30 at 9 07 06 AM|Screenshot 2024-09-30 at 9 07 20 AM|Screenshot 2024-09-30 at 2 18 43 PM| --- e2e/example.spec.demo.ts | 5 ++- e2e/fixtures/testFixture.ts | 6 +++- e2e/pages/filing-app/formAlerts.spec.ts | 2 +- .../point-of-contact-data-1.json | 1 + src/components/LabelOptional.tsx | 2 +- .../Filing/FilingApp/FilingSubmit.helpers.tsx | 9 +++-- .../ViewInstitutionProfile/DisplayField.tsx | 4 +-- src/pages/PointOfContact/index.tsx | 36 +++++++++++++------ src/pages/ProfileForm/ProfileFormUtils.ts | 1 + .../Step1Form/Step1FormInfoFieldGroup.tsx | 5 +-- src/types/filingTypes.ts | 1 + src/types/formTypes.ts | 10 +++++- src/utils/constants.ts | 2 +- src/utils/useWidthMatch.ts | 24 +++++++++++++ tailwind.config.js | 9 +++++ 15 files changed, 93 insertions(+), 24 deletions(-) create mode 100644 src/utils/useWidthMatch.ts diff --git a/e2e/example.spec.demo.ts b/e2e/example.spec.demo.ts index c2c495e89..804fde942 100644 --- a/e2e/example.spec.demo.ts +++ b/e2e/example.spec.demo.ts @@ -98,8 +98,11 @@ test('proof of concept', async ({ page }) => { await page.getByLabel('First name').fill(pointOfContactJson.first_name); await page.getByLabel('Last name').fill(pointOfContactJson.last_name); await page - .getByLabel('Work phone numberPhone number') + .getByLabel('Phone numberPhone number') .fill(pointOfContactJson.phone_number); + await page + .getByLabel('Extension (optional)Extension') + .fill(pointOfContactJson.phone_ext); await page .getByLabel('Email addressEmail address') .fill(pointOfContactJson.email); diff --git a/e2e/fixtures/testFixture.ts b/e2e/fixtures/testFixture.ts index ecff850f0..0be824bd7 100644 --- a/e2e/fixtures/testFixture.ts +++ b/e2e/fixtures/testFixture.ts @@ -258,6 +258,7 @@ export const test = baseTest.extend<{ await page.getByRole('button', { name: 'Continue to next step' }).click(); await expect(page.locator('h1')).toContainText( 'Provide point of contact', + { timeout: 30_000 }, ); }); await use(page); @@ -273,8 +274,11 @@ export const test = baseTest.extend<{ await page.getByLabel('First name').fill(pointOfContactJson.first_name); await page.getByLabel('Last name').fill(pointOfContactJson.last_name); await page - .getByLabel('Work phone numberPhone number') + .getByLabel('Phone numberPhone number') .fill(pointOfContactJson.phone_number); + await page + .getByLabel('Extension (optional)Extension') + .fill(pointOfContactJson.phone_ext); await page .getByLabel('Email addressEmail address') .fill(pointOfContactJson.email); diff --git a/e2e/pages/filing-app/formAlerts.spec.ts b/e2e/pages/filing-app/formAlerts.spec.ts index 5124c6add..ec70e1134 100644 --- a/e2e/pages/filing-app/formAlerts.spec.ts +++ b/e2e/pages/filing-app/formAlerts.spec.ts @@ -231,7 +231,7 @@ test('Form Alerts', async ({ await test.step('Complete form', async () => { await page.getByLabel('First name').fill('Playwright'); await page.getByLabel('Last name').fill('Test'); - await page.getByLabel('Work phone').fill('555-555-5555'); + await page.getByLabel('Phone number').fill('555-555-5555'); await page.getByLabel('Email address').fill('playwright@test.com'); await page.getByLabel('Street address line 1').fill('555 Main St.'); await page.getByLabel('City').fill('Utah (U'); diff --git a/e2e/test-data/point-of-contact/point-of-contact-data-1.json b/e2e/test-data/point-of-contact/point-of-contact-data-1.json index 8137d6cd0..86fce828e 100644 --- a/e2e/test-data/point-of-contact/point-of-contact-data-1.json +++ b/e2e/test-data/point-of-contact/point-of-contact-data-1.json @@ -9,5 +9,6 @@ "hq_address_state": "CA", "hq_address_zip": "55555", "phone_number": "555-555-5555", + "phone_ext": "8942", "email": "point_of_contact_email@email.test" } \ No newline at end of file diff --git a/src/components/LabelOptional.tsx b/src/components/LabelOptional.tsx index c70994436..d0b2837d3 100644 --- a/src/components/LabelOptional.tsx +++ b/src/components/LabelOptional.tsx @@ -1,6 +1,6 @@ function LabelOptional(): JSX.Element { return ( - (optional) + (optional) ); } diff --git a/src/pages/Filing/FilingApp/FilingSubmit.helpers.tsx b/src/pages/Filing/FilingApp/FilingSubmit.helpers.tsx index 94f3e130c..8a6f8fbf9 100644 --- a/src/pages/Filing/FilingApp/FilingSubmit.helpers.tsx +++ b/src/pages/Filing/FilingApp/FilingSubmit.helpers.tsx @@ -33,7 +33,7 @@ export function getDescriptionForSignAndSubmitSection( export function PointOfContactConfirm({ data, - heading = 'Confirm your filing point of contact', + heading = 'Confirm the point of contact for your filing', description = getDescriptionForSignAndSubmitSection('poc'), }: { data: FilingType; @@ -51,10 +51,13 @@ export function PointOfContactConfirm({ + + {poc?.phone_ext ? ( + + ) : null} - diff --git a/src/pages/Filing/ViewInstitutionProfile/DisplayField.tsx b/src/pages/Filing/ViewInstitutionProfile/DisplayField.tsx index b97088af9..94604b94e 100644 --- a/src/pages/Filing/ViewInstitutionProfile/DisplayField.tsx +++ b/src/pages/Filing/ViewInstitutionProfile/DisplayField.tsx @@ -21,11 +21,11 @@ export function DisplayField({ return (
{label ? ( - + {label} ) : undefined} -

{value ?? fallbackValue}

+

{value ?? fallbackValue}

); } diff --git a/src/pages/PointOfContact/index.tsx b/src/pages/PointOfContact/index.tsx index 0521a3768..1ecb29d98 100644 --- a/src/pages/PointOfContact/index.tsx +++ b/src/pages/PointOfContact/index.tsx @@ -41,6 +41,7 @@ import type { PointOfContactSchema, } from 'types/formTypes'; import { ContactInfoMap, pointOfContactSchema } from 'types/formTypes'; +import { inputCharLimit } from 'utils/constants'; import useAddressStates from 'utils/useAddressStates'; import useFilingStatus from 'utils/useFilingStatus'; import useInstitutionDetails from 'utils/useInstitutionDetails'; @@ -243,7 +244,7 @@ function PointOfContact(): JSX.Element { keyLogicFunc={normalKeyLogic} />
- + You are required to complete all fields with the exception of the street address lines labeled optional. Your point of contact information will not be saved until you provide all required @@ -263,7 +264,7 @@ function PointOfContact(): JSX.Element { label='First name' id='firstName' {...register('firstName')} - maxLength={255} + maxLength={inputCharLimit} errorMessage={formErrors.firstName?.message} showError /> @@ -271,18 +272,31 @@ function PointOfContact(): JSX.Element { label='Last name' id='lastName' {...register('lastName')} - maxLength={255} + maxLength={inputCharLimit} errorMessage={formErrors.lastName?.message} showError /> - +
+ + +
+ @@ -39,7 +40,7 @@ function Step1FormInfoFieldGroup({ label='Last name' id='lastName' {...register('lastName')} - maxLength={255} + maxLength={inputCharLimit} errorMessage={formErrors.lastName?.message} showError /> diff --git a/src/types/filingTypes.ts b/src/types/filingTypes.ts index 9ed5f31fb..9f7f35a05 100644 --- a/src/types/filingTypes.ts +++ b/src/types/filingTypes.ts @@ -79,6 +79,7 @@ export const FilingSchema = z.object({ hq_address_zip: z.string(), email: z.string(), phone_number: z.string(), + phone_ext: z.string(), }), z.null(), ]), diff --git a/src/types/formTypes.ts b/src/types/formTypes.ts index 6a57026be..6533a2aa9 100644 --- a/src/types/formTypes.ts +++ b/src/types/formTypes.ts @@ -336,6 +336,12 @@ export const pointOfContactSchema = z.object({ .regex(usPhoneNumberRegex, { message: PocZodSchemaErrors.phoneRegex, }), + phoneExtension: z + .string() + .max(inputCharLimit, { + message: "The phone number extension's maximum character limit is 255", + }) + .optional(), email: z .string() .trim() @@ -374,6 +380,7 @@ export const ContactInfoMap = { first_name: 'firstName', last_name: 'lastName', phone_number: 'phone', + phone_ext: 'phoneExtension', email: 'email', hq_address_street_1: 'hq_address_street_1', hq_address_street_2: 'hq_address_street_2', @@ -390,9 +397,10 @@ export type ContactInfoValues = (typeof ContactInfoMap)[ContactInfoKeys]; export type FormattedPointOfContactSchema = Omit< PointOfContactSchema, - 'firstName' | 'lastName' | 'phone' + 'firstName' | 'lastName' | 'phone' | 'phoneExtension' > & { first_name: string; last_name: string; phone_number: string; + phone_ext: string | undefined; }; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 3961a47d9..1badcb17a 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -11,7 +11,7 @@ export const Ten = 10; export const ITEMS_PER_PAGE = 20; export const Thirty = 30; export const Hundred = 100; -export const inputCharLimit = 255; +export const inputCharLimit = 254; export const EightHundred = 800; export const Thousand = 1000; export const CACHE_TIME = 600_000; diff --git a/src/utils/useWidthMatch.ts b/src/utils/useWidthMatch.ts new file mode 100644 index 000000000..36e8019dc --- /dev/null +++ b/src/utils/useWidthMatch.ts @@ -0,0 +1,24 @@ +import { useEffect, useState } from 'react'; + +function useWidthMatch(query: string): boolean { + const [matches, setMatches] = useState(false); + + useEffect(() => { + const mediaQuery = window.matchMedia(query); + setMatches(mediaQuery.matches); // Initial check + + const handleChange = (event: MediaQueryListEvent) => { + setMatches(event.matches); + }; + + mediaQuery.addEventListener('change', handleChange); + + return () => { + mediaQuery.removeEventListener('change', handleChange); + }; + }, [query]); + + return matches; +} + +export default useWidthMatch; diff --git a/tailwind.config.js b/tailwind.config.js index 9f454c6c3..2499ea55d 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -25,6 +25,15 @@ const config = { fontFamily: { inter: ['Inter', ...defaultConfig.theme.fontFamily.sans], }, + // See `vars-breakpoints.js` of the `design-system` repo + screens: { + bpXS: '0px', + bpSM: '601px', + bpMED: '901px', + bpLG: '1021px', + bpXL: '1201px' + + } }, }, experimental: { optimizeUniversalDefaults: true }, From 41bb357ea17340d08341dee55ffef4b7d0e2ddb8 Mon Sep 17 00:00:00 2001 From: S T Date: Tue, 1 Oct 2024 14:39:34 -0700 Subject: [PATCH 05/12] stylefix(Point of Contact): Responsive break changed from 600px to 900px (#977) Follow-up to #945 ## Style Problem Screenshot 2024-10-01 at 11 24 06 AM --- src/pages/PointOfContact/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/PointOfContact/index.tsx b/src/pages/PointOfContact/index.tsx index 1ecb29d98..8741b3d02 100644 --- a/src/pages/PointOfContact/index.tsx +++ b/src/pages/PointOfContact/index.tsx @@ -276,9 +276,9 @@ function PointOfContact(): JSX.Element { errorMessage={formErrors.lastName?.message} showError /> -
+
Date: Tue, 1 Oct 2024 14:44:58 -0700 Subject: [PATCH 06/12] [Point of contact] Stale form input fields when actuating 'Go Back' button on Sign-and-Submit (#976) closes #975 ## Changes - bugfix(Point of Contact): Form fields no longer stale upon actuating 'Go Back' button on Sign-and-Submit ## How to Test ('Go Back' Button) - Filling out a value in `Extension` - Submit - Verify Phone Extension value in Sign-and-Submit - Actuate the 'Go Back' button - Verify value is still the same ## How to Test (Browser's Back Button) - Test the same but with the browser's Back button --- src/utils/useFilingStatus.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/useFilingStatus.tsx b/src/utils/useFilingStatus.tsx index e2377851e..5f791c94e 100644 --- a/src/utils/useFilingStatus.tsx +++ b/src/utils/useFilingStatus.tsx @@ -15,6 +15,9 @@ const useFilingStatus = ( queryKey: [`fetch-filing`, lei, filingPeriod], queryFn: async (): Promise => fetchFiling(auth, lei, filingPeriod), + refetchOnMount: true, + staleTime: 0, + cacheTime: 0, }); }; From 88c6612e3fa0f0d6eee00a15773e697a5951f5ae Mon Sep 17 00:00:00 2001 From: S T Date: Tue, 1 Oct 2024 15:08:14 -0700 Subject: [PATCH 07/12] stylefix(Point of Contact): Phone Extension style 2 to 1 (2/3 to 1/3) (#978) Follow up to #945 ## Changes - style(PoC): Phone and Phone Extension style flex ratio: 2 to 1 (2/3 to 1/3) ## How to test this PR 1. Toggle between above 900px and below ## Screenshots Screenshot 2024-10-01 at 2 45 28 PM --- src/pages/PointOfContact/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/PointOfContact/index.tsx b/src/pages/PointOfContact/index.tsx index 8741b3d02..dc51a995a 100644 --- a/src/pages/PointOfContact/index.tsx +++ b/src/pages/PointOfContact/index.tsx @@ -278,7 +278,7 @@ function PointOfContact(): JSX.Element { />
Date: Tue, 8 Oct 2024 17:40:10 -0700 Subject: [PATCH 08/12] chore: Added Tanner Ricks to list of codeowners (#990) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 88c2b11c6..9910087bc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @billhimmelsbach @meissadia @shindigira @ojbravo +* @billhimmelsbach @meissadia @shindigira @ojbravo @tanner-ricks From 1ab38698e6f6950a960118c976114ffa92a503fa Mon Sep 17 00:00:00 2001 From: S T Date: Wed, 9 Oct 2024 11:52:44 -0700 Subject: [PATCH 09/12] [Review First][e2e] [Upload] Tests for syntax errors, logic errors and to verify a downloadable report (#938) closes #777 closes #802 closes #937 closes #958 ## Changes - Adds e2e test to check the navigation of when a user uploads a csv that produces syntax errors - Adds e2e test to check the navigation of when a user uploads a csv that produces logic errors - e2e: Verifies - a user can download a validation report after a syntax error has been upload - enhancement: Improves TypeScript handing in `playwright.config.ts` - feat: deletes individual reports in the `e2e/pages/filing-app/uploadFile/downloads` directory after the download report test finishes - chore: updated `uploadFile.ts` to be DRY - feat: Integrate `uploadFile.ts` with completeUploadLogicErrors.spec.ts - feat: Integrate `uploadFile.ts` with completeUploadSyntaxErrors.spec.ts - feat: Update `unavailableApis.spec.ts` with `uploadFile.ts` accordingly ## How to Test - Run `npx playwright test --ui` - Run the `completeSyntaxErrors.spec.ts` test - Run the `completeLogicErrors.spec.ts` test - Run the `unavailableApis.spec.ts` test - **Verify downloaded reports are being deleted from `e2e/pages/filing-app/uploadFile/downloads`** ## Screenshot Screenshot 2024-09-20 at 2 15 50 PM --- .gitignore | 2 + e2e/fixtures/testFixture.ts | 2 +- e2e/pages/filing-app/unavailableApis.spec.ts | 12 +- .../completeUploadLogicErrors.spec.ts | 57 +++++++ .../completeUploadSyntaxErrors.spec.ts | 43 ++++++ .../sample-sblar-files/all_syntax_errors.csv | 140 ++++++++++++++++++ ...logic-errors_single&multi_and_warnings.csv | 68 +++++++++ e2e/utils/uploadFile.ts | 123 +++++++-------- e2e/utils/verifyDownloadableReport.ts | 78 ++++++++++ playwright.config.ts | 8 +- 10 files changed, 459 insertions(+), 74 deletions(-) create mode 100644 e2e/pages/filing-app/uploadFile/completeUploadLogicErrors.spec.ts create mode 100644 e2e/pages/filing-app/uploadFile/completeUploadSyntaxErrors.spec.ts create mode 100644 e2e/test-data/sample-sblar-files/all_syntax_errors.csv create mode 100644 e2e/test-data/sample-sblar-files/logic-errors_single&multi_and_warnings.csv create mode 100644 e2e/utils/verifyDownloadableReport.ts diff --git a/.gitignore b/.gitignore index 9725fd15d..90a6337d1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ coverage .stylelintcache cypress/videos package-lock.json +e2e/pages/filing-app/uploadFile/downloads/* +e2e/utils/downloads/* .yarn/* !.yarn/cache diff --git a/e2e/fixtures/testFixture.ts b/e2e/fixtures/testFixture.ts index 0be824bd7..44be868cb 100644 --- a/e2e/fixtures/testFixture.ts +++ b/e2e/fixtures/testFixture.ts @@ -210,7 +210,7 @@ export const test = baseTest.extend<{ ); await expect(page.getByText('File upload in progress')).toBeVisible(); await expect(page.getByText('File upload successful')).toBeVisible({ - timeout: 10_000, + timeout: 30_000, }); await expect( page.getByText('Validation checks in progress'), diff --git a/e2e/pages/filing-app/unavailableApis.spec.ts b/e2e/pages/filing-app/unavailableApis.spec.ts index 3b67af534..3ba5c71ae 100644 --- a/e2e/pages/filing-app/unavailableApis.spec.ts +++ b/e2e/pages/filing-app/unavailableApis.spec.ts @@ -1,7 +1,7 @@ import { expect } from '@playwright/test'; import { test } from '../../fixtures/testFixture'; import { blockApi } from '../../utils/blockApi'; -import uploadFile from '../../utils/uploadFile'; +import { ResultUploadMessage, uploadFile } from '../../utils/uploadFile'; test('Form Alerts and API', async ({ page, @@ -82,7 +82,15 @@ test('Form Alerts and API', async ({ }); // Upload file - await uploadFile(page, true, null); + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: true, + testTitle: 'Upload file', + filePath: + '../test-data/sample-sblar-files/sbl-validations-all-pass-small.csv', + resultMessage: ResultUploadMessage.warning, + }); // Continue to next page await test.step('Click: Continue', async () => { diff --git a/e2e/pages/filing-app/uploadFile/completeUploadLogicErrors.spec.ts b/e2e/pages/filing-app/uploadFile/completeUploadLogicErrors.spec.ts new file mode 100644 index 000000000..9429eff2f --- /dev/null +++ b/e2e/pages/filing-app/uploadFile/completeUploadLogicErrors.spec.ts @@ -0,0 +1,57 @@ +import { expect } from '@playwright/test'; +import { test } from '../../../fixtures/testFixture'; +import { ResultUploadMessage, uploadFile } from '../../../utils/uploadFile'; +import { verifyDownloadableReport } from '../../../utils/verifyDownloadableReport'; + +test('Resolve Errors (Logic)', async ({ page, navigateToUploadFile }) => { + test.slow(); + + navigateToUploadFile; + + await test.step('Upload file: navigate to Resolve Errors (Logic) after upload', async () => { + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: true, + testTitle: + 'Upload file: upload small file with only warnings (logic-errors_medium.csv)', + filePath: + '../test-data/sample-sblar-files/logic-errors_single&multi_and_warnings.csv', + resultMessage: ResultUploadMessage.logic, + }); + + await test.step('Verify Resolve Errors (syntax) and zero errors', async () => { + await page.getByRole('button', { name: 'Continue to next step' }).click(); + await expect(page.locator('h1')).toContainText( + 'Resolve errors (syntax)', + { + timeout: 30_000, + }, + ); + await expect( + page.getByText('Your register contains no syntax errors'), + ).toBeVisible({ timeout: 40_000 }); + }); + + await test.step('Verify Resolve Errors (logic) and number of errors', async () => { + await page.getByRole('button', { name: 'Continue' }).click(); + await expect(page.locator('h1')).toContainText('Resolve errors (logic)', { + timeout: 30_000, + }); + await expect(page.locator('#error-header-alert')).toContainText( + 'Your register contains logic errors', + ); + await expect(page.locator('#single-field-errors')).toContainText( + 'Single-field errors: 1 found', + ); + await expect(page.locator('#register-level-errors')).toContainText( + 'Register-level errors: 2 found', + ); + await expect(page.locator('#multi-field-errors')).toContainText( + 'Multi-field errors: 52 found', + ); + }); + + await verifyDownloadableReport({ testUsed: test, pageUsed: page }); + }); +}); diff --git a/e2e/pages/filing-app/uploadFile/completeUploadSyntaxErrors.spec.ts b/e2e/pages/filing-app/uploadFile/completeUploadSyntaxErrors.spec.ts new file mode 100644 index 000000000..2ee28ebf7 --- /dev/null +++ b/e2e/pages/filing-app/uploadFile/completeUploadSyntaxErrors.spec.ts @@ -0,0 +1,43 @@ +import { expect } from '@playwright/test'; +import { test } from '../../../fixtures/testFixture'; +import { ResultUploadMessage, uploadFile } from '../../../utils/uploadFile'; +import { verifyDownloadableReport } from '../../../utils/verifyDownloadableReport'; + +test('Resolve Errors (Syntax)', async ({ page, navigateToUploadFile }) => { + test.slow(); + + navigateToUploadFile; + + await test.step('Upload file: navigate to Resolve Errors (syntax) after upload', async () => { + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: true, + testTitle: + 'Upload file: upload small file with only warnings (all_syntax_errors.csv)', + filePath: '../test-data/sample-sblar-files/all_syntax_errors.csv', + resultMessage: ResultUploadMessage.syntax, + }); + + await test.step('Verify Resolve Errors (syntax) and number of errors', async () => { + await page.getByRole('button', { name: 'Continue to next step' }).click(); + await expect(page.locator('h1')).toContainText( + 'Resolve errors (syntax)', + { + timeout: 30_000, + }, + ); + await expect(page.locator('#error-header-alert')).toBeVisible({ + timeout: 30_000, + }); + await expect(page.locator('h2')).toContainText( + 'Single-field errors: 136 found', + { + timeout: 20_000, + }, + ); + }); + + await verifyDownloadableReport({ testUsed: test, pageUsed: page }); + }); +}); diff --git a/e2e/test-data/sample-sblar-files/all_syntax_errors.csv b/e2e/test-data/sample-sblar-files/all_syntax_errors.csv new file mode 100644 index 000000000..18d1694ab --- /dev/null +++ b/e2e/test-data/sample-sblar-files/all_syntax_errors.csv @@ -0,0 +1,140 @@ +uid,app_date,app_method,app_recipient,ct_credit_product,ct_credit_product_ff,ct_guarantee,ct_guarantee_ff,ct_loan_term_flag,ct_loan_term,credit_purpose,credit_purpose_ff,amount_applied_for_flag,amount_applied_for,amount_approved,action_taken,action_taken_date,denial_reasons,denial_reasons_ff,pricing_interest_rate_type,pricing_init_rate_period,pricing_fixed_rate,pricing_adj_margin,pricing_adj_index_name,pricing_adj_index_name_ff,pricing_adj_index_value,pricing_origination_charges,pricing_broker_fees,pricing_initial_charges,pricing_mca_addcost_flag,pricing_mca_addcost,pricing_prepenalty_allowed,pricing_prepenalty_exists,census_tract_adr_type,census_tract_number,gross_annual_revenue_flag,gross_annual_revenue,naics_code_flag,naics_code,number_of_workers,time_in_business_type,time_in_business,business_ownership_status,num_principal_owners_flag,num_principal_owners,po_1_ethnicity,po_1_ethnicity_ff,po_1_race,po_1_race_anai_ff,po_1_race_asian_ff,po_1_race_baa_ff,po_1_race_pi_ff,po_1_gender_flag,po_1_gender_ff,po_2_ethnicity,po_2_ethnicity_ff,po_2_race,po_2_race_anai_ff,po_2_race_asian_ff,po_2_race_baa_ff,po_2_race_pi_ff,po_2_gender_flag,po_2_gender_ff,po_3_ethnicity,po_3_ethnicity_ff,po_3_race,po_3_race_anai_ff,po_3_race_asian_ff,po_3_race_baa_ff,po_3_race_pi_ff,po_3_gender_flag,po_3_gender_ff,po_4_ethnicity,po_4_ethnicity_ff,po_4_race,po_4_race_anai_ff,po_4_race_asian_ff,po_4_race_baa_ff,po_4_race_pi_ff,po_4_gender_flag,po_4_gender_ff +,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4234000O91BZ220CHARS,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4234000O91BZ2SUPERCALIFRAGILISTICEXPIALI46CHARS,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4234000O91BZ2K36OTHERCHAR!!V67280Y,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4234000lowercase67280letters,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4234000O91BZ2K36V67280Y,,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4234000O91BZ2K36V67280Z,12012024,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4234000O91BZ2K36V67280Z1,20230229,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +956600PI6JSOV7ZZ3106TIW,20241201,,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +956600PI6JSOV7ZZ3106TIW1,20241201,5,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +2386009EECAG20ZLMV23XI5HSNMQCEYP,20241201,1,,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +2386009EECAG20ZLMV23XI5HSNMQCEYP1,20241201,1,3,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +6669004Q2DXWMELKL032HCW6EU9K,20241201,1,1,,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +6669004Q2DXWMELKL032HCW6EU9K1,20241201,1,1,999,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +121400XX2UX92GN0KC71AW3GMD8SG9AJV73O75,20241201,1,1,977,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +55190073SEH3UYA1XB917W7WTS6,20241201,1,1,988,,9001,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +669400C4GD7Q2LN72M85PCGMDQ5AF1GI6FR5EPZYSUB1,20241201,1,1,988,,977,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +022500XI3ZBZIE5DCB49BP1HNCTVRIUMK7BZ,20241201,1,1,988,,999,,,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +022500XI3ZBZIE5DCB49BP1HNCTVRIUMK7BZ1,20241201,1,1,988,,999,,1000,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +833600MLEY29NPXZ6Y503ST2LTBI68MUMNL17EBB4HBB,20241201,1,1,988,,999,,900,1.78,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +833600MLEY29NPXZ6Y503ST2LTBI68MUMNL17EBB4HBB1,20241201,1,1,988,,999,,900,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +739000LYJIZOKLRVXF584Z86FH,20241201,1,1,988,,999,,999,,1;2;9001,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +6987006ZF7XLRTK2XB767WTGH5QX4,20241201,1,1,988,,999,,999,,977,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +8131003OTZ6C2PDKHJ53KBIQAJAE1QC7W6C1BOJDS1,20241201,1,1,988,,999,,999,,999,,,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +8131003OTZ6C2PDKHJ53KBIQAJAE1QC7W6C1BOJDS2,20241201,1,1,988,,999,,999,,999,,1000,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +010100ICK2NVPQKI6841B639N3R,20241201,1,1,988,,999,,999,,999,,900,nonNumericValue,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +010100ICK2NVPQKI6841B639N3R1,20241201,1,1,988,,999,,999,,999,,900,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +760900JJCAT3MCVKV06438QG,20241201,1,1,988,,999,,999,,999,,999,,nonNumericValue,1,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +760900JJCAT3MCVKV06438QG1,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +923500LZ57G0IK4ETD64HDFTU1U,20241201,1,1,988,,999,,999,,999,,999,,,,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +923500LZ57G0IK4ETD64HDFTU1U1,20241201,1,1,988,,999,,999,,999,,999,,,6,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +438600FLG46UDVULW406H7TGK,20241201,1,1,988,,999,,999,,999,,999,,,5,12312024,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +438600FLG46UDVULW406H7TGK1,20241201,1,1,988,,999,,999,,999,,999,,,5,,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +3587006IEWU1OXMYCO17VXEXYG1HVXTRYBCX6A6YXD01R,20241201,1,1,988,,999,,999,,999,,999,,,3,20241231,9001,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +0279000815BBNQHM7N23JA4KGL,20241201,1,1,988,,999,,999,,999,,999,,,3,20241231,977,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +5666002FKB3UAMTDTM62F6,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +5666002FKB3UAMTDTM62F7,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,977,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +5666002FKB3UAMTDTM62F8,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,nonNumericValue,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +947800HCW5V55ZENLP42GL86,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,3,nonNumericValue,,,999,,2,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +947800HCW5V55ZENLP42GL87,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,3,3.5,,,999,,2,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +519200EYK7H2VZ93DO21126B1WPFKI348QJZM4ZO8Z,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,2,,nonNumericValue,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +208800QOK8SUWHEU5C755CP8X0OQ8MAUWJHDQC4SC5UZ,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +208800QOK8SUWHEU5C755CP8X0OQ8MAUWJHDQC4SC5UA,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,13,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +208800QOK8SUWHEU5C755CP8X0OQ8MAUWJHDQC4SC5UB,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,nonNumericValue,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +144300EH823V0RA87A48KQ2565H26X5K6WSGGPUG,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,977,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +564600TPCC0WFV22CY34VATRK5OXYIZ63GCN0QB,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,1,,nonNumericValue,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +481900WFUKMHDSY6OI11EOX9OTYIIU9,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,nonNumericValue,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +411600W24ZABFWYVR029T1JQTJW5S,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,nonNumericValue,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +9228000EBRPNTUQ3SG57FPB,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,,nonNumericValue,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4548000TKXGRV839KU65F58PXAWP9E,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4548000TKXGRV839KU65F58PXAWP9F,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,0,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4548000TKXGRV839KU65F58PXAWP9G,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,nonNumericValue,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +4617007WISXGJOFB1Y03MWVAR51OL,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,900,nonNumericValue,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +995500RE1N72ZJMSAH7866I98J1W2D76J,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,,,999,,,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +995500RE1N72ZJMSAH7866I98J1W2D76K,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,,,999,,3,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +995500RE1N72ZJMSAH7866I98J1W2D76L,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,,,999,,nonNumericValue,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +524900222U3R5SQMYW237GS42YO489SDRTVMQ6,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,,,999,,999,,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +524900222U3R5SQMYW237GS42YO489SDRTVMQ8,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,,,999,,999,nonNumericValue,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +524900222U3R5SQMYW237GS42YO489SDRTVMQ7,20241201,1,1,988,,999,,999,,999,,999,,,1,20241231,999,,999,,,,999,,,,,,999,,999,3,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1619008FAF6ESQ96KD22DHAWGTCO7YODP1A4X,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1619008FAF6ESQ96KD22DHAWGTCO7YODP1A4Y,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,4,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1619008FAF6ESQ96KD22DHAWGTCO7YODP1A4Z,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,nonNumericValue,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +025200MYCASCDDLSR022RQGPYJG75Z8RQFU,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,1,1234567890,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +025200MYCASCDDLSR022RQGPYJG75Z8RQFV,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,1,nonNumericValue,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +756000U6MPCSWDC39C3607M2KLGM53,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +756000U6MPCSWDC39C3607M2KLGM54,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,0,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +756000U6MPCSWDC39C3607M2KLGM55,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,nonNumericValue,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +0257001EM8QF36D1NJ89R8,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,900,nonNumericValue,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +983600MVQMOOWTZ69R0223670KOWF40NTV8VN,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +983600MVQMOOWTZ69R0223670KOWF40NTV8VM,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,0,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +983600MVQMOOWTZ69R0223670KOWF40NTV8VO,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,nonNumericValue,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +484200VUF1I2NJNY9D943S9V2533N3J4NSL6BSRZ5342,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,900,notDigits,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1614006AUE2H31FJCV329IPSH,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1614006AUE2H31FJCV329IPSI,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,10,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +1614006AUE2H31FJCV329IPSJ,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,nonNumericValue,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +784900N2TYCSGSHFRM17MT7EJ4503Z,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +784900N2TYCSGSHFRM17MT7EJ4503A,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,4,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +784900N2TYCSGSHFRM17MT7EJ4503B,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,nonNumericValue,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +966700OSTIM259Q6CP94X1VKYM2ZWSJ,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,must be blank,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +966700OSTIM259Q6CP94X1VKYM2ZWSJ,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,1.5,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +750400GOSOP76WU55334EJ2QRQ921TIQVKKF2D4HXQQ,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,1;2; 9001,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +750400GOSOP76WU55334EJ2QRQ921TIQVKKF2D4HXQR,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,nonNumericValue,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +856800BWNYZD262GLO73QEQTDL9FEHGRGE189DQ,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +856800BWNYZD262GLO73QEQTDL9FEHGRGE189DR,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +856800BWNYZD262GLO73QEQTDL9FEHGRGE189DS,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,nonNumericValue,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +458700OOQCHMD0HUVA16PMC2ZLA6N5NAT58YOL66AQ2,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,9001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +458700OOQCHMD0HUVA16PMC2ZLA6N5NAT58YOL66AQ3,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,nonNumericValue,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +953200W2IZVPSVLRGN24GARG,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,9001;1,,2,,,,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +953200W2IZVPSVLRGN24GARH,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,nonNumericValue,,2,,,,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +7078000SDH2MQNT0V717R4H7E7B7DHM04Z,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,977;1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,2,,,,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +00700040O75RW3NKLR04T13PT853UH3WV0JZTNTX8ZJ9X,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,9001;1,,,,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +00700040O75RW3NKLR04T13PT853UH3WV0JZTNTX8ZJ9Y,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,nonNumericValue,,,,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +368400H1B7FE9H82JJ003SHINJFYB1M,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,971;1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +296400UYONUQI7CMF5222BXL5SKIOTA,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,972;1,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +36440045G09V5RRH5H513,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,973;1,,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +025100XQUUZSD2ONZH69E8HEGBOPD8WOQ3L6N6,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,974;1,,,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,988,,,,,,,,,,,,,,,,,,,,,,,,,,,, +629800L4RJQQG75YSW97IFRTSDX6VBVNTBZMZMNFLR9NT,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,2,,,,,9001,,,,,,,,,,,,,,,,,,,,,,,,,,,, +629800L4RJQQG75YSW97IFRTSDX6VBVNTBZMZMNFLR9NU,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,2,,,,,nonNumericValue,,,,,,,,,,,,,,,,,,,,,,,,,,,, +420700T5JZSX56SFOU40S9ZOPJIW834OE18MBP8U,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,1,988,,2,,,,,1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,,,,,,,,,,,,,,,,,,,,,,,,, +774200J5EAXZO2IWU109S5MV2VEZ472HY1TKQHB,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,9001;1,,2,,,,,988,,,,,,,,,,,,,,,,,,, +774200J5EAXZO2IWU109S5MV2VEZ472HY1TKQHC,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,nonNumericValue,,2,,,,,988,,,,,,,,,,,,,,,,,,, +303800A197B9MNHQHT62EGGOXXXNQ8D6X04QKXD,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,977;1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,2,,,,,988,,,,,,,,,,,,,,,,,,, +8322000N96DIPAMONE94DZKW3KB0E1HY,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,9001;1,,,,,988,,,,,,,,,,,,,,,,,,, +8322000N96DIPAMONE94DZKW3KB0E1HZ,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,nonNumericValue,,,,,988,,,,,,,,,,,,,,,,,,, +953400ZC66FNY57FVD98JD56PBGGWW8OGHP,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,971;1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,,988,,,,,,,,,,,,,,,,,,, +0349008MKL3X8WPMYS93OKKM,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,972;1,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,988,,,,,,,,,,,,,,,,,,, +414500Y8SBL2RVDDOY94Z,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,973;1,,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,988,,,,,,,,,,,,,,,,,,, +122800M4K2CH3FL25Y97KTK4H9UAJSFLE7NVO,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,974;1,,,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,988,,,,,,,,,,,,,,,,,,, +9842007R4HCY0XOQ5L00TU0JH7EF1H2AQUYYVXXR,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,2,,,,,9001,,,,,,,,,,,,,,,,,,, +9842007R4HCY0XOQ5L00TU0JH7EF1H2AQUYYVXXS,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,2,,,,,nonNumericValue,,,,,,,,,,,,,,,,,,, +85200017SN17F1A5UL14SF57XEHW1N0IOIYM2,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,2,988,,2,,,,,988,,988,,2,,,,,1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,,,,,,,,,,,,,,,, +362500YIIQ8UVRB27812IS,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,9001;1,,2,,,,,988,,,,,,,,,, +362500YIIQ8UVRB27812IT,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,nonNumericValue,,2,,,,,988,,,,,,,,,, +420100W1AXMLNU16B456G4Q2AEXZSNHV,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,977;1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,2,,,,,988,,,,,,,,,, +105100TLHSNS7JJ18418PHX6ANI,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,9001;1,,,,,988,,,,,,,,,, +105100TLHSNS7JJ18418PHX6ANJ,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,nonNumericValue,,,,,988,,,,,,,,,, +354600GJUWVBT7YOLF75YIWERLW2JG569JM,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,971;1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,,988,,,,,,,,,, +413800VHGM6XJMYTRA38H5KB4YEKXZO,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,972;1,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,988,,,,,,,,,, +333000WW4NNIB7XTHI72MSHK1AJ97WODC4N,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,973;1,,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,988,,,,,,,,,, +624400TM8ZN8K73YMT88IAVE1I3S37,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,974;1,,,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,988,,,,,,,,,, +71090039E5LSNPB3H174W1YEUOC52R6KF792O6,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,9001,,,,,,,,,, +71090039E5LSNPB3H174W1YEUOC52R6KF792O7,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,nonNumericValue,,,,,,,,,, +185800T9RBUG5XEIQE275C212JFWUY44WH7,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,3,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,,,,,,, +279200NW36SQ744VS396D,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,9001;1,,2,,,,,988, +279200NW36SQ744VS396E,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,nonNumericValue,,2,,,,,988, +100300CBL92FBZU4FA80U,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,977;1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,2,,,,,988, +248800WFV15GUR5YQB72TZ3IO1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,9001;1,,,,,988, +248800WFV15GUR5YQB72TZ3IO2,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,nonNumericValue,,,,,988, +884200OCJ8635YVBT146RI7WQCSMFR5ICPTOJA3BOLI,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,971;1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,,988, +210600RWMYD2WHOXJ330UOWYW0ZTIY,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,972;1,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,,988, +624400V8RSEQNAR5W804KQPXCQ9MMGXD8,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,973;1,,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,,988, +644600XBVWLW5SRSW113BT,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,974;1,,,,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX,988, +1381007XS24PDR3BW6547JM8,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,9001, +1381007XS24PDR3BW6547JM9,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,nonNumericValue, +504500FRY0L3IER8X3901SSIZFKI1OAVF1S45LSR1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,4,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,988,,988,,2,,,,,1,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890XXX +000TESTFIUIDDONOTUSEXBXVID13XTC1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +000TESTFIUIDDONOTUSEXBXVID13XTC1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +000TESTFIUIDDONOTUSEXBXVID13XTC2,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,abc,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/e2e/test-data/sample-sblar-files/logic-errors_single&multi_and_warnings.csv b/e2e/test-data/sample-sblar-files/logic-errors_single&multi_and_warnings.csv new file mode 100644 index 000000000..2afa0c51c --- /dev/null +++ b/e2e/test-data/sample-sblar-files/logic-errors_single&multi_and_warnings.csv @@ -0,0 +1,68 @@ +uid,app_date,app_method,app_recipient,ct_credit_product,ct_credit_product_ff,ct_guarantee,ct_guarantee_ff,ct_loan_term_flag,ct_loan_term,credit_purpose,credit_purpose_ff,amount_applied_for_flag,amount_applied_for,amount_approved,action_taken,action_taken_date,denial_reasons,denial_reasons_ff,pricing_interest_rate_type,pricing_init_rate_period,pricing_fixed_rate,pricing_adj_margin,pricing_adj_index_name,pricing_adj_index_name_ff,pricing_adj_index_value,pricing_origination_charges,pricing_broker_fees,pricing_initial_charges,pricing_mca_addcost_flag,pricing_mca_addcost,pricing_prepenalty_allowed,pricing_prepenalty_exists,census_tract_adr_type,census_tract_number,gross_annual_revenue_flag,gross_annual_revenue,naics_code_flag,naics_code,number_of_workers,time_in_business_type,time_in_business,business_ownership_status,num_principal_owners_flag,num_principal_owners,po_1_ethnicity,po_1_ethnicity_ff,po_1_race,po_1_race_anai_ff,po_1_race_asian_ff,po_1_race_baa_ff,po_1_race_pi_ff,po_1_gender_flag,po_1_gender_ff,po_2_ethnicity,po_2_ethnicity_ff,po_2_race,po_2_race_anai_ff,po_2_race_asian_ff,po_2_race_baa_ff,po_2_race_pi_ff,po_2_gender_flag,po_2_gender_ff,po_3_ethnicity,po_3_ethnicity_ff,po_3_race,po_3_race_anai_ff,po_3_race_asian_ff,po_3_race_baa_ff,po_3_race_pi_ff,po_3_gender_flag,po_3_gender_ff,po_4_ethnicity,po_4_ethnicity_ff,po_4_race,po_4_race_anai_ff,po_4_race_asian_ff,po_4_race_baa_ff,po_4_race_pi_ff,po_4_gender_flag,po_4_gender_ff +123456789TESTBANK123C2,20241201,2,1,988,,1;2;3;4;5;6,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300019,20241201,1,1,988,Bad Text,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300020,20241201,1,1,977,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300021,20241201,1,1,988,More Bad Text,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300022,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300023,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300024,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300025,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300026,20241201,1,1,988,,999,,999,,999,,900,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300027,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300028,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK45600029,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK78900030,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK00000031,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300032,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300033,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300034,20241201,1,1,988,,999,,999,2222,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300035,20241201,1,1,988,,999,,999,3333,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300036,20241201,1,1,988,,999,,999,4444,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300037,20241201,1,1,988,,999,,999,5555,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300038,20241201,1,1,988,,999,,999,6666,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300039,20241201,1,1,988,,999,,999,1210,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300040,20241201,1,1,988,,999,,999,2000,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300041,20241201,1,1,988,,999,,999,3000,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300043,20241201,1,1,988,,999,,999,5000,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300042,20241201,1,1,988,,999,,999,715,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300044,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300045,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,900,0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300047,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300046,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,1,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300050,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300051,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300052,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300053,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300054,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300055,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300056,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300057,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300058,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300059,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300060,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300061,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300062,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300063,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300064,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300065,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300066,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300067,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300068,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300069,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300070,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300071,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300072,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300073,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300074,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300075,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300076,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300077,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300078,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300079,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300080,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300081,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300082,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300083,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300084,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300090,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +123456789TESTBANK12300090,20241201,1,1,988,,999,,999,1,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/e2e/utils/uploadFile.ts b/e2e/utils/uploadFile.ts index d31c8ad6e..3161cef48 100644 --- a/e2e/utils/uploadFile.ts +++ b/e2e/utils/uploadFile.ts @@ -1,79 +1,66 @@ -import type { Page } from '@playwright/test'; -import { expect, test } from '@playwright/test'; +import type { + Page, + PlaywrightTestArgs, + PlaywrightTestOptions, + PlaywrightWorkerArgs, + PlaywrightWorkerOptions, + TestType, +} from '@playwright/test'; +import { expect } from '@playwright/test'; import path from 'node:path'; -type ErrorType = 'logic' | 'syntax' | 'warning' | null; +export const ResultUploadMessage = { + syntax: 'Errors were found in your file', + logic: 'Errors were found in your file', + warning: 'Warnings were found in your file', +} as const; -async function uploadFile( - page: Page, - newUpload: boolean, - errorType: ErrorType, -) { - await test.step('Upload file', async () => { - await expect(page.locator('h1'), 'h1 is correct').toContainText( - 'Upload file', - ); +export type ResultUploadMessageType = typeof ResultUploadMessage; +export type ResultUploadMessageKeys = keyof typeof ResultUploadMessage; +export type ResultUploadMessageValues = + (typeof ResultUploadMessage)[ResultUploadMessageKeys]; + +export interface UploadFileInterface { + testUsed: TestType< + PlaywrightTestArgs & PlaywrightTestOptions, + PlaywrightWorkerArgs & PlaywrightWorkerOptions + >; + pageUsed: Page; + newUpload: boolean; + testTitle: string; + filePath: string; + resultMessage: ResultUploadMessageValues; +} - // Check for the upload header - await expect(page.locator('h2'), 'h2 is correct').toContainText( +export async function uploadFile({ + testUsed, + pageUsed, + newUpload, + testTitle, + filePath, + resultMessage, +}: UploadFileInterface): Promise { + await testUsed.step(testTitle, async () => { + await expect(pageUsed.locator('h2')).toContainText( 'Select a file to upload', ); - - await test.step('Select file', async () => { - // Set up file chooser promise - const fileChooserPromise = page.waitForEvent('filechooser'); - - // Click the appropriate file upload button based on newUpload value - await (newUpload - ? page.getByLabel('Select a .csv file to upload').click() - : page.getByLabel('Replace your previously').click()); - - // Wait for file chooser and select file - const fileChooser = await fileChooserPromise; - - // Determine which file to upload based on error type - const fileNames: Record, string> = { - syntax: 'errors-page-1-syntax-few.csv', - logic: 'errors-page-2-logic-few.csv', - warning: 'warnings-page-few.csv', - }; - const fileName = errorType - ? fileNames[errorType] - : 'sbl-validations-all-pass-small.csv'; - - await fileChooser.setFiles( - path.join(__dirname, `../test-data/sample-sblar-files/${fileName}`), - ); + const fileChooserPromise = pageUsed.waitForEvent('filechooser'); + await (newUpload + ? pageUsed.getByLabel('Select a .csv file to upload').click() + : pageUsed.getByLabel('Replace your previously').click()); + const fileChooser = await fileChooserPromise; + await fileChooser.setFiles(path.join(__dirname, filePath)); + await expect(pageUsed.getByText('File upload in progress')).toBeVisible(); + await expect(pageUsed.getByText('File upload successful')).toBeVisible({ + timeout: 10_000, }); - - await test.step('File uploaded', async () => { - // Check for upload progress message - await expect(page.getByText('File upload in progress')).toBeVisible(); - - // Check for upload success message - await expect(page.getByText('File upload successful')).toBeVisible({ - timeout: 10_000, - }); + await expect( + pageUsed.getByText('Validation checks in progress'), + ).toBeVisible({ + timeout: 10_000, }); - await test.step('File validated', async () => { - // Check for validation progress message - await expect(page.getByText('Validation checks in progress')).toBeVisible( - { - timeout: 10_000, - }, - ); - - const errorMessages = { - syntax: 'Errors were found in your file', - logic: 'Errors were found in your file', - warning: 'Warnings were found in your file', - null: 'Warnings were found in your file', - }; - - const message = errorMessages[errorType ?? 'null']; - const timeout = errorType ? 60_000 : 15_000; - - await expect(page.getByText(message)).toBeVisible({ timeout }); + await expect(pageUsed.getByText(resultMessage)).toBeVisible({ + timeout: 60_000, }); }); } diff --git a/e2e/utils/verifyDownloadableReport.ts b/e2e/utils/verifyDownloadableReport.ts new file mode 100644 index 000000000..a947011d4 --- /dev/null +++ b/e2e/utils/verifyDownloadableReport.ts @@ -0,0 +1,78 @@ +import type { + Page, + PlaywrightTestArgs, + PlaywrightTestOptions, + PlaywrightWorkerArgs, + PlaywrightWorkerOptions, + TestType, +} from '@playwright/test'; +import { expect } from '@playwright/test'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; + +const downloadPath = path.resolve(__dirname, 'downloads'); +let downloadFilePath: string; + +export interface DownloadableReportInterface { + testUsed: TestType< + PlaywrightTestArgs & PlaywrightTestOptions, + PlaywrightWorkerArgs & PlaywrightWorkerOptions + >; + pageUsed: Page; +} + +export async function verifyDownloadableReport({ + testUsed, + pageUsed, +}: DownloadableReportInterface): Promise { + await testUsed.step('Verify downloadable report', async () => { + // Set up listener for the download event + const downloadPromise = pageUsed.waitForEvent('download'); + await pageUsed.getByRole('button', { name: 'Download report' }).click(); + const download = await downloadPromise; + + // Save downloaded file to the specified location + downloadFilePath = path.join( + downloadPath, + await download.suggestedFilename(), + ); + await download.saveAs(downloadFilePath); + + // Wait for the download to complete + await download.path(); + + // Verify the file exists + expect(fs.existsSync(downloadFilePath)).toBeTruthy(); + + // Verify the file is not empty + const fileSize = fs.statSync(downloadFilePath).size; + expect(fileSize).toBeGreaterThan(0); + + // eslint-disable-next-line no-console + console.log(`Downloaded file path: ${downloadFilePath}`); + + // Cleanup Test File + try { + // Small delay to ensure the test is fully complete + await new Promise(resolve => { + setTimeout(resolve, 1000); + }); + + // Delete the downloaded file if it exists + if (downloadFilePath && fs.existsSync(downloadFilePath)) { + fs.unlinkSync(downloadFilePath); + // eslint-disable-next-line no-console + console.log(`Deleted the downloaded file: ${downloadFilePath}`); + } + } catch (error) { + // eslint-disable-next-line no-console + console.error( + `Failed to delete file: ${downloadFilePath}. Error: ${ + (error as Error).message + }`, + ); + } + }); +} + +export default verifyDownloadableReport; diff --git a/playwright.config.ts b/playwright.config.ts index 04407b8b2..c1def5e0c 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, devices } from '@playwright/test'; +import { PlaywrightTestConfig, devices } from '@playwright/test'; /** * Read environment variables from file. @@ -9,7 +9,7 @@ require('dotenv').config(); /** * See https://playwright.dev/docs/test-configuration. */ -export default defineConfig({ +const config: PlaywrightTestConfig = { testDir: './e2e', /* Run tests in files in parallel */ fullyParallel: true, @@ -73,4 +73,6 @@ export default defineConfig({ // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, // }, ], -}); +}; + +export default config; From 1513c6af564f16fa71afa64c7fd4ccd93bd548f7 Mon Sep 17 00:00:00 2001 From: S T Date: Wed, 9 Oct 2024 16:52:05 -0700 Subject: [PATCH 10/12] [e2e] speed up `unavailableApis.spec.ts`, make api calls retries env variable (#968) closes #916 closes #993 ## Changes - dev: Adds `SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS` as an environment variable - dev: Disables `React-Query` _retries_ based on `SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS` - e2e: Updates `unavailableApis.spec.ts` to not wait for retries - e2e: further utilized `uploadFile.ts` to deduplicate code usage - e2e: `yarn test:e2e` edited to include chmod and `./run-playwright.sh` ## How to test this PR 1. Add `SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="false"` to your `.env` 2. ~~`chmod +x run-playwright.sh`~~ 3. ~~`sh run-playwright.sh` or `sh run-playwright.sh --headless`~~ 4. Run `yarn test:e2e` 5. Run `unavailableApis.spec.ts` 6. Verify the test passes and that the blocked APIs show up only once (see screenshot) ## Screenshots Screenshot 2024-10-03 at 3 57 20 PM ## Notes - ~~The tester must now manually set `SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS` to `true` before running tests~~ - The script `run-playwright.sh` is used so that the tester doesn't need to manually flip `SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS` before tests ## Questions - Do we want an actual environment variable to manually control the amount of `React-Query` retries for all requests or is this approach (i.e. `SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS` -- a test flag) sufficient? --- .env.example | 1 + .github/workflows/test.yml | 3 +- e2e/example.spec.demo.ts | 35 ++++++------------- e2e/fixtures/testFixture.ts | 34 ++++++------------ e2e/pages/filing-app/formAlerts.spec.ts | 33 ++++++++++++++--- e2e/pages/filing-app/unavailableApis.spec.ts | 34 ++++++------------ .../completeUploadLogicErrors.spec.ts | 2 +- .../completeUploadSyntaxErrors.spec.ts | 2 +- .../logic-warnings_small.csv | 8 +++++ e2e/utils/uploadFile.ts | 4 ++- package.json | 3 +- run-playwright.sh | 33 +++++++++++++++++ src/api/common.ts | 7 ++++ src/main.tsx | 6 ++-- .../TypesFinancialInstitutions/index.tsx | 3 +- src/utils/useInstitutionDetails.tsx | 3 +- src/utils/useSubmitPointOfContact.tsx | 3 +- src/utils/useSubmitUpdateFinancialProfile.tsx | 3 +- src/utils/useSubmitUserProfile.tsx | 3 +- src/utils/useSubmitUserProfileFi.tsx | 2 +- src/utils/useSubmitWarningsAccept.tsx | 3 +- src/utils/useUploadMutation.tsx | 3 +- 22 files changed, 133 insertions(+), 95 deletions(-) create mode 100644 e2e/test-data/sample-sblar-files/logic-warnings_small.csv create mode 100755 run-playwright.sh diff --git a/.env.example b/.env.example index 8c0317f5f..29fde1bcd 100644 --- a/.env.example +++ b/.env.example @@ -9,3 +9,4 @@ SBL_LOGOUT_REDIRECT_URL="" SBL_VALIDATION_TIMEOUT_SECONDS="1200" SBL_LONGPOLLING_DELAY_SECONDS="backoff" SBL_UPLOAD_FILE_SIZE_LIMIT_BYTES="50000000" +SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="false" \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d53b5e3e..c1e684ca9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,8 @@ env: SBL_VALIDATION_TIMEOUT_SECONDS: "1200" SBL_LONGPOLLING_DELAY_SECONDS: "backoff" SBL_UPLOAD_FILE_SIZE_LIMIT_BYTES: "50000000" - + SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS: "false" + jobs: React: runs-on: ubuntu-latest diff --git a/e2e/example.spec.demo.ts b/e2e/example.spec.demo.ts index 804fde942..346785d27 100644 --- a/e2e/example.spec.demo.ts +++ b/e2e/example.spec.demo.ts @@ -1,14 +1,12 @@ // this test won't run, but may be helpful as an example when writing future tests import { expect } from '@playwright/test'; -import path from 'node:path'; import { test } from './fixtures/testFixture'; import pointOfContactJson from './test-data/point-of-contact/point-of-contact-data-1.json'; +import { ResultUploadMessage, uploadFile } from './utils/uploadFile'; test('proof of concept', async ({ page }) => { test.slow(); - const tenSecondTimeout = 10_000; - const sixtySecondTimeout = 60_000; const minorDelay = 500; await test.step('Unauthenticated homepage: navigate to Authenticated homepage', async () => { @@ -45,28 +43,15 @@ test('proof of concept', async ({ page }) => { }); await test.step('Upload file: navigate to Review warnings after only warnings upload', async () => { - await test.step('Upload file: upload small file with only warnings (sbl-validations-all-pass-small.csv)', async () => { - await expect(page.locator('h2')).toContainText('Select a file to upload'); - const fileChooserPromise = page.waitForEvent('filechooser'); - await page.getByLabel('Select a .csv file to upload').click(); - const fileChooser = await fileChooserPromise; - await fileChooser.setFiles( - path.join( - // eslint-disable-next-line unicorn/prefer-module - __dirname, - './test-data/sample-sblar-files/sbl-validations-all-pass-small.csv', - ), - ); - await expect(page.getByText('File upload in progress')).toBeVisible(); - await expect(page.getByText('File upload successful')).toBeVisible({ - timeout: tenSecondTimeout, - }); - await expect(page.getByText('Validation checks in progress')).toBeVisible( - { timeout: tenSecondTimeout }, - ); - await expect( - page.getByText('Warnings were found in your file'), - ).toBeVisible({ timeout: sixtySecondTimeout }); + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: true, + testTitle: + 'Upload file: upload small file with only warnings (sbl-validations-all-pass-small.csv)', + filePath: + '../test-data/sample-sblar-files/sbl-validations-all-pass-small.csv', + resultMessage: ResultUploadMessage.warning, }); await test.step('Upload file: navigate to Resolve errors (syntax) with no errors after upload', async () => { diff --git a/e2e/fixtures/testFixture.ts b/e2e/fixtures/testFixture.ts index 44be868cb..37be6e2a8 100644 --- a/e2e/fixtures/testFixture.ts +++ b/e2e/fixtures/testFixture.ts @@ -1,6 +1,5 @@ import type { Page } from '@playwright/test'; import { test as baseTest, expect } from '@playwright/test'; -import path from 'node:path'; import pointOfContactJson from '../test-data/point-of-contact/point-of-contact-data-1.json'; import createDomainAssociation from '../utils/createDomainAssociation'; import createInstitution from '../utils/createInstitution'; @@ -12,6 +11,7 @@ import { expectedWithAssociationsUrl, getTestDataObject, } from '../utils/testFixture.utils'; +import { ResultUploadMessage, uploadFile } from '../utils/uploadFile'; export const test = baseTest.extend<{ isNonAssociatedUser: boolean; // Skips creating a domain association and creating a financial institution @@ -195,29 +195,15 @@ export const test = baseTest.extend<{ ) => { navigateToUploadFile; await test.step('Upload file: navigate to Review warnings after only warnings upload', async () => { - await test.step('Upload file: upload small file with only warnings (sbl-validations-all-pass-small.csv)', async () => { - await expect(page.locator('h2')).toContainText( - 'Select a file to upload', - ); - const fileChooserPromise = page.waitForEvent('filechooser'); - await page.getByLabel('Select a .csv file to upload').click(); - const fileChooser = await fileChooserPromise; - await fileChooser.setFiles( - path.join( - __dirname, - '../test-data/sample-sblar-files/sbl-validations-all-pass-small.csv', - ), - ); - await expect(page.getByText('File upload in progress')).toBeVisible(); - await expect(page.getByText('File upload successful')).toBeVisible({ - timeout: 30_000, - }); - await expect( - page.getByText('Validation checks in progress'), - ).toBeVisible({ timeout: 10_000 }); - await expect( - page.getByText('Warnings were found in your file'), - ).toBeVisible({ timeout: 60_000 }); + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: true, + testTitle: + 'Upload file: upload small file with only warnings (sbl-validations-all-pass-small.csv)', + filePath: + '../test-data/sample-sblar-files/sbl-validations-all-pass-small.csv', + resultMessage: ResultUploadMessage.warning, }); await test.step('Upload file: navigate to Resolve errors (syntax) with no errors after upload', async () => { diff --git a/e2e/pages/filing-app/formAlerts.spec.ts b/e2e/pages/filing-app/formAlerts.spec.ts index ec70e1134..1cd3482ee 100644 --- a/e2e/pages/filing-app/formAlerts.spec.ts +++ b/e2e/pages/filing-app/formAlerts.spec.ts @@ -1,6 +1,6 @@ import { expect } from '@playwright/test'; import { test } from '../../fixtures/testFixture'; -import uploadFile from '../../utils/uploadFile'; +import { ResultUploadMessage, uploadFile } from '../../utils/uploadFile'; test('Form Alerts', async ({ page, @@ -48,7 +48,15 @@ test('Form Alerts', async ({ // Upload file with syntax errors await test.step('Upload syntax errors file', async () => { - await uploadFile(page, true, 'syntax'); + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: true, + testTitle: + 'Upload file: upload small file with syntax errors (all_syntax_errors.csv)', + filePath: '../test-data/sample-sblar-files/all_syntax_errors.csv', + resultMessage: ResultUploadMessage.syntax, + }); // Continue to next page await test.step('Click: Continue', async () => { @@ -87,7 +95,16 @@ test('Form Alerts', async ({ // Upload file with logic errors await test.step('Upload logic errors file', async () => { - await uploadFile(page, false, 'logic'); + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: false, + testTitle: + 'Upload file: upload small file with logic errors (logic-errors_single&multi_and_warnings.csv)', + filePath: + '../test-data/sample-sblar-files/logic-errors_single&multi_and_warnings.csv', + resultMessage: ResultUploadMessage.logic, + }); // Continue to next page await test.step('Click: Continue', async () => { @@ -141,7 +158,15 @@ test('Form Alerts', async ({ // Upload file with warnings await test.step('Upload warnings file', async () => { - await uploadFile(page, false, 'warning'); + // Upload file + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: false, + testTitle: 'Upload Warnings file', + filePath: '../test-data/sample-sblar-files/logic-warnings_small.csv', + resultMessage: ResultUploadMessage.warning, + }); await test.step('Click: Continue', async () => { await page diff --git a/e2e/pages/filing-app/unavailableApis.spec.ts b/e2e/pages/filing-app/unavailableApis.spec.ts index 3ba5c71ae..8e39b94f3 100644 --- a/e2e/pages/filing-app/unavailableApis.spec.ts +++ b/e2e/pages/filing-app/unavailableApis.spec.ts @@ -3,7 +3,7 @@ import { test } from '../../fixtures/testFixture'; import { blockApi } from '../../utils/blockApi'; import { ResultUploadMessage, uploadFile } from '../../utils/uploadFile'; -test('Form Alerts and API', async ({ +test('Blocking API Calls - Error Boundaries', async ({ page, navigateToProvideTypeOfFinancialInstitution, }) => { @@ -26,10 +26,6 @@ test('Form Alerts and API', async ({ await test.step('Refresh page', async () => { await page.reload(); }); - // ToDo: Make retries less when testing (#916) - await test.step('Waiting for retries timeout', async () => { - await page.waitForSelector('h1', { state: 'visible' }); - }); await expect(page.locator('h1'), 'h1 is correct').toContainText( 'An unknown error occurred', ); @@ -66,10 +62,6 @@ test('Form Alerts and API', async ({ await test.step('Refresh page', async () => { await page.reload(); }); - // ToDo: Make retries less when testing (#916) - await test.step('Waiting for retries timeout', async () => { - await page.waitForSelector('h1', { state: 'visible' }); - }); await expect(page.locator('h1'), 'h1 is correct').toContainText( 'An unknown error occurred', ); @@ -86,7 +78,7 @@ test('Form Alerts and API', async ({ testUsed: test, pageUsed: page, newUpload: true, - testTitle: 'Upload file', + testTitle: 'Upload passing file with warnings', filePath: '../test-data/sample-sblar-files/sbl-validations-all-pass-small.csv', resultMessage: ResultUploadMessage.warning, @@ -116,10 +108,6 @@ test('Form Alerts and API', async ({ await test.step('Refresh page', async () => { await page.reload(); }); - // ToDo: Make retries less when testing (#916) - await test.step('Waiting for retries timeout', async () => { - await page.waitForSelector('h1', { state: 'visible' }); - }); await expect(page.locator('h1'), 'h1 is correct').toContainText( 'An unknown error occurred', ); @@ -146,7 +134,9 @@ test('Form Alerts and API', async ({ // Review warnings page await test.step('Review warnings page', async () => { - await expect(page.locator('h1')).toContainText('Review warnings'); + await expect(page.locator('h1')).toContainText('Review warnings', { + timeout: 50_000, + }); // Block API Call: **/v1/institutions/ await test.step('Block API: /v1/institutions', async () => { @@ -155,17 +145,16 @@ test('Form Alerts and API', async ({ // Confirm Error Alert await test.step('Error Alert is visible', async () => { - // ToDo: Make retries less when testing (#916) test.setTimeout(150_000); await test.step('Refresh page', async () => { await page.reload(); }); - // ToDo: Make retries less when testing (#916) - await test.step('Waiting for retries timeout', async () => { - await page.waitForSelector('h1', { state: 'visible' }); - }); + await expect(page.locator('h1'), 'h1 is visible').toContainText( 'Review warnings', + { + timeout: 50_000, + }, ); await expect( page.locator('#main .m-notification__error'), @@ -204,10 +193,7 @@ test('Form Alerts and API', async ({ await test.step('Refresh page', async () => { await page.reload(); }); - // ToDo: Make retries less when testing (#916) - await test.step('Waiting for retries timeout', async () => { - await page.waitForSelector('h1', { state: 'visible' }); - }); + await expect(page.locator('h1'), 'h1 is correct').toContainText( 'An unknown error occurred', ); diff --git a/e2e/pages/filing-app/uploadFile/completeUploadLogicErrors.spec.ts b/e2e/pages/filing-app/uploadFile/completeUploadLogicErrors.spec.ts index 9429eff2f..92aa8d6eb 100644 --- a/e2e/pages/filing-app/uploadFile/completeUploadLogicErrors.spec.ts +++ b/e2e/pages/filing-app/uploadFile/completeUploadLogicErrors.spec.ts @@ -14,7 +14,7 @@ test('Resolve Errors (Logic)', async ({ page, navigateToUploadFile }) => { pageUsed: page, newUpload: true, testTitle: - 'Upload file: upload small file with only warnings (logic-errors_medium.csv)', + 'Upload file: upload small file with logic errors (logic-errors_single&multi_and_warnings.csv)', filePath: '../test-data/sample-sblar-files/logic-errors_single&multi_and_warnings.csv', resultMessage: ResultUploadMessage.logic, diff --git a/e2e/pages/filing-app/uploadFile/completeUploadSyntaxErrors.spec.ts b/e2e/pages/filing-app/uploadFile/completeUploadSyntaxErrors.spec.ts index 2ee28ebf7..6795a3d5e 100644 --- a/e2e/pages/filing-app/uploadFile/completeUploadSyntaxErrors.spec.ts +++ b/e2e/pages/filing-app/uploadFile/completeUploadSyntaxErrors.spec.ts @@ -14,7 +14,7 @@ test('Resolve Errors (Syntax)', async ({ page, navigateToUploadFile }) => { pageUsed: page, newUpload: true, testTitle: - 'Upload file: upload small file with only warnings (all_syntax_errors.csv)', + 'Upload file: upload small file with syntax errors (all_syntax_errors.csv)', filePath: '../test-data/sample-sblar-files/all_syntax_errors.csv', resultMessage: ResultUploadMessage.syntax, }); diff --git a/e2e/test-data/sample-sblar-files/logic-warnings_small.csv b/e2e/test-data/sample-sblar-files/logic-warnings_small.csv new file mode 100644 index 000000000..84d427041 --- /dev/null +++ b/e2e/test-data/sample-sblar-files/logic-warnings_small.csv @@ -0,0 +1,8 @@ +uid,app_date,app_method,app_recipient,ct_credit_product,ct_credit_product_ff,ct_guarantee,ct_guarantee_ff,ct_loan_term_flag,ct_loan_term,credit_purpose,credit_purpose_ff,amount_applied_for_flag,amount_applied_for,amount_approved,action_taken,action_taken_date,denial_reasons,denial_reasons_ff,pricing_interest_rate_type,pricing_init_rate_period,pricing_fixed_rate,pricing_adj_margin,pricing_adj_index_name,pricing_adj_index_name_ff,pricing_adj_index_value,pricing_origination_charges,pricing_broker_fees,pricing_initial_charges,pricing_mca_addcost_flag,pricing_mca_addcost,pricing_prepenalty_allowed,pricing_prepenalty_exists,census_tract_adr_type,census_tract_number,gross_annual_revenue_flag,gross_annual_revenue,naics_code_flag,naics_code,number_of_workers,time_in_business_type,time_in_business,business_ownership_status,num_principal_owners_flag,num_principal_owners,po_1_ethnicity,po_1_ethnicity_ff,po_1_race,po_1_race_anai_ff,po_1_race_asian_ff,po_1_race_baa_ff,po_1_race_pi_ff,po_1_gender_flag,po_1_gender_ff,po_2_ethnicity,po_2_ethnicity_ff,po_2_race,po_2_race_anai_ff,po_2_race_asian_ff,po_2_race_baa_ff,po_2_race_pi_ff,po_2_gender_flag,po_2_gender_ff,po_3_ethnicity,po_3_ethnicity_ff,po_3_race,po_3_race_anai_ff,po_3_race_asian_ff,po_3_race_baa_ff,po_3_race_pi_ff,po_3_gender_flag,po_3_gender_ff,po_4_ethnicity,po_4_ethnicity_ff,po_4_race,po_4_race_anai_ff,po_4_race_asian_ff,po_4_race_baa_ff,po_4_race_pi_ff,po_4_gender_flag,po_4_gender_ff +000TESTFIUIDDONOTUSEXGXVID11XTC1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +000TESTFIUIDDONOTUSEXGXVID12XTC1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +000TESTFIUIDDONOTUSEXGXVID13XTC1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +000TESTFIUIDDONOTUSEXGXVID14XTC1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +000TESTFIUIDDONOTUSEXGXVID21XTC1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +000TESTFIUIDDONOTUSEXGXVID31XTC1,20241201,1,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +000TESTFIUIDDONOTUSEXGXVID31XTC2,20241201,2,1,988,,999,,999,,999,,999,,,5,20241231,999,,999,,,,999,,,,,,999,,999,999,988,,988,,988,,988,988,,988,988,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/e2e/utils/uploadFile.ts b/e2e/utils/uploadFile.ts index 3161cef48..b3425ec43 100644 --- a/e2e/utils/uploadFile.ts +++ b/e2e/utils/uploadFile.ts @@ -47,7 +47,9 @@ export async function uploadFile({ const fileChooserPromise = pageUsed.waitForEvent('filechooser'); await (newUpload ? pageUsed.getByLabel('Select a .csv file to upload').click() - : pageUsed.getByLabel('Replace your previously').click()); + : pageUsed + .getByLabel('Replace your previously uploaded .csv file') + .click()); const fileChooser = await fileChooserPromise; await fileChooser.setFiles(path.join(__dirname, filePath)); await expect(pageUsed.getByText('File upload in progress')).toBeVisible(); diff --git a/package.json b/package.json index 9eceb2cbe..4465794bd 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,7 @@ "seed": "cd ../sbl-project/dev_setup/mock_data/ && sh create_institutions.sh && sh insert_filing_period.sh", "test": "vitest", "test:ci": "vitest run", - "test:e2e": "yarn playwright test --ui --workers 4", - "test:e2e:headless": "yarn playwright test --workers 4", + "test:e2e": "chmod +x ./run-playwright.sh && sh ./run-playwright.sh", "test:e2e:ci": "vite build && yarn preview:test 'cypress run --record'", "format": "prettier -uw --cache .", "run-tsc": "tsc", diff --git a/run-playwright.sh b/run-playwright.sh new file mode 100755 index 000000000..17f468c1a --- /dev/null +++ b/run-playwright.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Set SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS to "true" in the .env file and check if SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS exists in the .env file +if grep -q 'SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS' .env; then + echo 'Updating SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="true" in .env' + sed -i '' 's/SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS=.*/SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="true"/' .env +else + echo 'SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS not found, adding SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="true" to .env' + echo 'SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="true"' >> .env +fi + +# Check for --headless argument +if [ "$1" == "--headless" ]; then + echo "Running Playwright tests in headless mode..." + yarn playwright test --workers 4 +else + echo "Running Playwright tests with UI..." + yarn playwright test --ui --workers 4 +fi + +# Check if Playwright exited successfully +if [ $? -eq 0 ]; then + echo "Playwright tests completed successfully." +else + echo "Playwright tests failed." +fi + +# Reset SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS to "false" in the .env file +echo 'Resetting SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="false" in .env' +sed -i '' 's/SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS=.*/SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="false"/' .env + +# Confirm the changes +echo 'SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS has been reset to "false" in .env' \ No newline at end of file diff --git a/src/api/common.ts b/src/api/common.ts index d6a2968e4..69cf04280 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -47,6 +47,13 @@ export const FILE_SIZE_LIMIT_BYTES = convertEnvVarNumber( FILE_SIZE_LIMIT_50MB, ); +export const IS_PLAYWRIGHT_TEST: boolean = + String(import.meta.env.SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS) === 'true'; + +// React-Query set retries based on if Playwright test settings are enabled +export const getRetries = (retries = 0): boolean | number => + IS_PLAYWRIGHT_TEST ? false : retries; + export interface ValidationError { message: string; errors: Record; diff --git a/src/main.tsx b/src/main.tsx index 8bbdf9f25..1b613b197 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,5 +1,6 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import App from 'App'; +import { getRetries } from 'api/common'; import { createRoot } from 'react-dom/client'; import { AuthProvider } from 'react-oidc-context'; import { MAX_RETRIES } from 'utils/constants'; @@ -21,10 +22,7 @@ const queryClient = new QueryClient({ defaultOptions: { queries: { // staleTime: Number.POSITIVE_INFINITY, - // retry: MAX_RETRIES, - retry: (failureCount, error): boolean => { - return failureCount <= MAX_RETRIES; - }, + retry: getRetries(MAX_RETRIES), refetchOnWindowFocus: false, // default: true }, }, diff --git a/src/pages/TypesFinancialInstitutions/index.tsx b/src/pages/TypesFinancialInstitutions/index.tsx index b54c38bb3..3b98f3471 100644 --- a/src/pages/TypesFinancialInstitutions/index.tsx +++ b/src/pages/TypesFinancialInstitutions/index.tsx @@ -1,5 +1,6 @@ import { zodResolver } from '@hookform/resolvers/zod'; import { useMutation } from '@tanstack/react-query'; +import { getRetries } from 'api/common'; import submitUpdateInstitutionTypeSbl from 'api/requests/submitUpdateInstitutionTypeSbl'; import useSblAuth from 'api/useSblAuth'; import AlertApiUnavailable from 'components/AlertApiUnavailable'; @@ -62,7 +63,7 @@ function TypesFinancialInstitutions(): JSX.Element { mutationFn: async () => // @ts-expect-error Part of code cleanup for post-mvp see: https://github.com/cfpb/sbl-frontend/issues/717 submitUpdateInstitutionTypeSbl(auth, lei, formatTypesForApi(getValues())), - retry: UPLOAD_SUBMIT_MAX_RETRIES, + retry: getRetries(UPLOAD_SUBMIT_MAX_RETRIES), }); // @ts-expect-error Part of code cleanup for post-mvp see: https://github.com/cfpb/sbl-frontend/issues/717 diff --git a/src/utils/useInstitutionDetails.tsx b/src/utils/useInstitutionDetails.tsx index 4c18168df..65032c765 100644 --- a/src/utils/useInstitutionDetails.tsx +++ b/src/utils/useInstitutionDetails.tsx @@ -1,5 +1,6 @@ import type { UseQueryResult } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query'; +import { getRetries } from 'api/common'; import { fetchInstitutionDetails } from 'api/requests'; import useSblAuth from 'api/useSblAuth'; import type { InstitutionDetailsApiType } from 'types/formTypes'; @@ -15,7 +16,7 @@ const useInstitutionDetails = ( queryKey: [`fetch-institution`, lei], queryFn: async (): Promise => fetchInstitutionDetails(auth, lei), - retry: Five, + retry: getRetries(Five), retryDelay: attempt => Math.min( attempt > One ? Two ** attempt * STANDARD_TIMEOUT : STANDARD_TIMEOUT, diff --git a/src/utils/useSubmitPointOfContact.tsx b/src/utils/useSubmitPointOfContact.tsx index 6e54813e1..6494a4a74 100644 --- a/src/utils/useSubmitPointOfContact.tsx +++ b/src/utils/useSubmitPointOfContact.tsx @@ -1,5 +1,6 @@ import type { UseMutationResult } from '@tanstack/react-query'; import { useMutation } from '@tanstack/react-query'; +import { getRetries } from 'api/common'; import submitPointOfContact from 'api/requests/submitPointOfContact'; import useSblAuth from 'api/useSblAuth'; import type { AxiosError } from 'axios'; @@ -35,7 +36,7 @@ const useSubmitPointOfContact = ({ return submitPointOfContact(auth, { data, lei, filingPeriod }); }, - retry: UPLOAD_SUBMIT_MAX_RETRIES, + retry: getRetries(UPLOAD_SUBMIT_MAX_RETRIES), }); }; diff --git a/src/utils/useSubmitUpdateFinancialProfile.tsx b/src/utils/useSubmitUpdateFinancialProfile.tsx index bad91c94e..14f466a38 100644 --- a/src/utils/useSubmitUpdateFinancialProfile.tsx +++ b/src/utils/useSubmitUpdateFinancialProfile.tsx @@ -1,5 +1,6 @@ import type { UseMutationResult } from '@tanstack/react-query'; import { useMutation } from '@tanstack/react-query'; +import { getRetries } from 'api/common'; import { submitUpdateFinancialProfile } from 'api/requests'; import useSblAuth from 'api/useSblAuth'; import type { AxiosError } from 'axios'; @@ -21,7 +22,7 @@ const useSubmitUpdateFinancialProfile = (): UseMutationResult< }: SubmitUpdateFinancialProfileProperties): Promise => { return submitUpdateFinancialProfile(auth, financialProfileObject); }, - retry: UPLOAD_SUBMIT_MAX_RETRIES, + retry: getRetries(UPLOAD_SUBMIT_MAX_RETRIES), }); }; diff --git a/src/utils/useSubmitUserProfile.tsx b/src/utils/useSubmitUserProfile.tsx index 65ef7367e..ec8c51677 100644 --- a/src/utils/useSubmitUserProfile.tsx +++ b/src/utils/useSubmitUserProfile.tsx @@ -1,6 +1,7 @@ import type { UseMutationResult } from '@tanstack/react-query'; import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { getRetries } from 'api/common'; import { submitUserProfile } from 'api/requests'; import useSblAuth from 'api/useSblAuth'; import type { AxiosError } from 'axios'; @@ -36,7 +37,7 @@ const useSubmitUserProfile = (): UseMutationResult< queryKey: ['fetch-user-profile', email], }); }, - retry: UPLOAD_SUBMIT_MAX_RETRIES, + retry: getRetries(UPLOAD_SUBMIT_MAX_RETRIES), }); }; diff --git a/src/utils/useSubmitUserProfileFi.tsx b/src/utils/useSubmitUserProfileFi.tsx index 92ab09e5a..7079f6286 100644 --- a/src/utils/useSubmitUserProfileFi.tsx +++ b/src/utils/useSubmitUserProfileFi.tsx @@ -24,7 +24,7 @@ const useSubmitUserProfileFi = (): UseMutationResult< }: SubmitUserProfileFiProperties): Promise => { return submitUserProfileFi(auth, formFieldsObject); }, - retry: UPLOAD_SUBMIT_MAX_RETRIES, + retry: getRetries(UPLOAD_SUBMIT_MAX_RETRIES), }); }; diff --git a/src/utils/useSubmitWarningsAccept.tsx b/src/utils/useSubmitWarningsAccept.tsx index 4575c99f6..d95f3aed4 100644 --- a/src/utils/useSubmitWarningsAccept.tsx +++ b/src/utils/useSubmitWarningsAccept.tsx @@ -1,5 +1,6 @@ import type { UseMutationResult } from '@tanstack/react-query'; import { useMutation } from '@tanstack/react-query'; +import { getRetries } from 'api/common'; import submitWarningsAccept from 'api/requests/submitWarningsAccept'; import useSblAuth from 'api/useSblAuth'; import type { AxiosError } from 'axios'; @@ -33,7 +34,7 @@ const useSubmitWarningsAccept = ({ throw new Error('submitWarningsAccept: Missing required parameter'); return submitWarningsAccept(auth, { submissionId, lei, filingPeriod }); }, - retry: UPLOAD_SUBMIT_MAX_RETRIES, + retry: getRetries(UPLOAD_SUBMIT_MAX_RETRIES), }); }; diff --git a/src/utils/useUploadMutation.tsx b/src/utils/useUploadMutation.tsx index d76115c3e..b509aec67 100644 --- a/src/utils/useUploadMutation.tsx +++ b/src/utils/useUploadMutation.tsx @@ -1,5 +1,6 @@ import type { UseMutationResult } from '@tanstack/react-query'; import { useMutation } from '@tanstack/react-query'; +import { getRetries } from 'api/common'; import uploadCsvAxios from 'api/requests/uploadCsvAxios'; import useSblAuth from 'api/useSblAuth'; import type { AxiosError } from 'axios'; @@ -48,7 +49,7 @@ const useUploadMutation = ({ onSettled: () => { if (onSettledCallback) void onSettledCallback(); }, - retry: UPLOAD_SUBMIT_MAX_RETRIES, + retry: getRetries(UPLOAD_SUBMIT_MAX_RETRIES), }); }; From 5cc07d3073868188267a491653f786e938fecdc7 Mon Sep 17 00:00:00 2001 From: S T Date: Fri, 11 Oct 2024 14:05:07 -0700 Subject: [PATCH 11/12] fix: missing reference to getRetries (#995) ## Changes - fix: getRetries reference - fix: Complete User Profile should no longer error out ## How to test this PR 1. Create a new user 2. Completing the _Complete User Profile_ should not error out 3. `NonAssociatedUserProfile.spec.ts` e2e tests should pass --- ENV-GUIDE.md | 1 + e2e/fixtures/testFixture.ts | 1 + src/utils/useSubmitUserProfileFi.tsx | 1 + src/vite-env.d.ts | 1 + 4 files changed, 4 insertions(+) diff --git a/ENV-GUIDE.md b/ENV-GUIDE.md index e0a001abd..d683079b3 100644 --- a/ENV-GUIDE.md +++ b/ENV-GUIDE.md @@ -16,6 +16,7 @@ SBL_LOGOUT_REDIRECT_URL="" SBL_VALIDATION_TIMEOUT_SECONDS="1200" SBL_LONGPOLLING_DELAY_SECONDS="backoff" SBL_UPLOAD_FILE_SIZE_LIMIT_BYTES="50000000" +SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS="false" ``` ### To add a new environment variable diff --git a/e2e/fixtures/testFixture.ts b/e2e/fixtures/testFixture.ts index 37be6e2a8..d12ee4237 100644 --- a/e2e/fixtures/testFixture.ts +++ b/e2e/fixtures/testFixture.ts @@ -98,6 +98,7 @@ export const test = baseTest.extend<{ await page.getByRole('button', { name: 'Sign In' }).click(); await expect(page.locator('h1')).toContainText( 'Complete your user profile', + { timeout: 30_000 }, ); // Two versions of Complete User Profile - with and without associations diff --git a/src/utils/useSubmitUserProfileFi.tsx b/src/utils/useSubmitUserProfileFi.tsx index 7079f6286..ec5feb28c 100644 --- a/src/utils/useSubmitUserProfileFi.tsx +++ b/src/utils/useSubmitUserProfileFi.tsx @@ -1,6 +1,7 @@ import type { UseMutationResult } from '@tanstack/react-query'; import { useMutation } from '@tanstack/react-query'; +import { getRetries } from 'api/common'; import { submitUserProfileFi } from 'api/requests'; import useSblAuth from 'api/useSblAuth'; import type { AxiosError } from 'axios'; diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 727e3cef3..6607d7cce 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -17,6 +17,7 @@ interface ImportMetaEnv { readonly SBL_VALIDATION_TIMEOUT_SECONDS: string; readonly SBL_LONGPOLLING_DELAY_SECONDS: string; readonly SBL_UPLOAD_FILE_SIZE_LIMIT_BYTES: string; + readonly SBL_ENABLE_PLAYWRIGHT_TEST_SETTINGS: string; } interface ImportMeta { From eb225ac074f4c88ae606ae9eec3901e83e57d4f1 Mon Sep 17 00:00:00 2001 From: Meis Date: Tue, 15 Oct 2024 10:04:36 -0600 Subject: [PATCH 12/12] [e2e] Verify users cannot skip Filing steps (#989) Closes #980 Verify that, from a given step in the Filing process, a user is prevented from accessing future Filing steps. --- e2e/fixtures/testFixture.ts | 73 +++++++++++++++++++ .../filing-app/filing-step-routing/_shared.ts | 39 ++++++++++ .../filing-step-routing/errorsLogic.spec.ts | 30 ++++++++ .../filing-step-routing/errorsSyntax.spec.ts | 35 +++++++++ .../filing-step-routing/noUpload.spec.ts | 27 +++++++ .../pointOfContact.spec.ts | 27 +++++++ .../filing-step-routing/warnings.spec.ts | 30 ++++++++ 7 files changed, 261 insertions(+) create mode 100644 e2e/pages/filing-app/filing-step-routing/_shared.ts create mode 100644 e2e/pages/filing-app/filing-step-routing/errorsLogic.spec.ts create mode 100644 e2e/pages/filing-app/filing-step-routing/errorsSyntax.spec.ts create mode 100644 e2e/pages/filing-app/filing-step-routing/noUpload.spec.ts create mode 100644 e2e/pages/filing-app/filing-step-routing/pointOfContact.spec.ts create mode 100644 e2e/pages/filing-app/filing-step-routing/warnings.spec.ts diff --git a/e2e/fixtures/testFixture.ts b/e2e/fixtures/testFixture.ts index d12ee4237..569fbba7d 100644 --- a/e2e/fixtures/testFixture.ts +++ b/e2e/fixtures/testFixture.ts @@ -22,6 +22,8 @@ export const test = baseTest.extend<{ navigateToProvideTypeOfFinancialInstitution: Page; navigateToUploadFile: Page; navigateToReviewWarningsAfterOnlyWarningsUpload: Page; + navigateToSyntaxErrorsAfterSyntaxErrorsUpload: Page; + navigateToLogicErrorsAfterLogicErrorsUpload: Page; navigateToProvidePointOfContact: Page; navigateToSignAndSubmit: Page; }>({ @@ -190,6 +192,77 @@ export const test = baseTest.extend<{ }); }, + navigateToSyntaxErrorsAfterSyntaxErrorsUpload: async ( + { page, navigateToUploadFile }, + use, + ) => { + navigateToUploadFile; + await test.step('Upload file: navigate to Syntax Errors page after only errors upload', async () => { + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: true, + testTitle: + 'Upload file: upload small file with only syntax errors (errors-page-1-syntax-few.csv)', + filePath: + '../test-data/sample-sblar-files/errors-page-1-syntax-few.csv', + resultMessage: ResultUploadMessage.syntax, + }); + + await test.step('Upload file: navigate to Resolve errors (syntax) with no errors after upload', async () => { + await page.waitForSelector('#nav-next'); + await page.waitForTimeout(500); + await page + .getByRole('button', { name: 'Continue to next step' }) + .click(); + await expect(page.locator('h1')).toContainText( + 'Resolve errors (syntax)', + ); + }); + + await use(page); + }); + }, + + navigateToLogicErrorsAfterLogicErrorsUpload: async ( + { page, navigateToUploadFile }, + use, + ) => { + navigateToUploadFile; + await test.step('Upload file: navigate to Logic Errors page after only errors upload', async () => { + await uploadFile({ + testUsed: test, + pageUsed: page, + newUpload: true, + testTitle: + 'Upload file: upload small file with only logic errors (errors-page-2-logic-few.csv)', + filePath: + '../test-data/sample-sblar-files/logic-errors_single&multi_and_warnings.csv', + resultMessage: ResultUploadMessage.logic, + }); + + await test.step('Upload file: navigate to Resolve errors (syntax) with no errors after upload', async () => { + await page.waitForSelector('#nav-next'); + await page.waitForTimeout(500); + await page + .getByRole('button', { name: 'Continue to next step' }) + .click(); + await expect(page.locator('h1')).toContainText( + 'Resolve errors (syntax)', + ); + }); + + await test.step('Resolve errors (logic): navigate to Resolve errors (logic) with errors after upload', async () => { + await page.getByRole('button', { name: 'Continue' }).click(); + await expect(page.locator('h1')).toContainText( + 'Resolve errors (logic)', + ); + }); + + await use(page); + }); + }, + navigateToReviewWarningsAfterOnlyWarningsUpload: async ( { page, navigateToUploadFile }, use, diff --git a/e2e/pages/filing-app/filing-step-routing/_shared.ts b/e2e/pages/filing-app/filing-step-routing/_shared.ts new file mode 100644 index 000000000..2988bc8c9 --- /dev/null +++ b/e2e/pages/filing-app/filing-step-routing/_shared.ts @@ -0,0 +1,39 @@ +/* eslint-disable no-await-in-loop */ + +import type { Page } from '@playwright/test'; +import { expect } from '@playwright/test'; +import type { test } from '../../../fixtures/testFixture'; + +interface VerifyRedirects { + page: Page; + userShouldNotAccess: string[]; // List of paths that a user should not be able to access + afterRedirectURL: RegExp; // RegExp that matches the URL a user should land on after redirect + afterRedirectHeading: string; // H1 text a user should see after redirect + currentStepPath: string; // A string at which to split the URL while preserving the LEI + testLabel: string; // Label displayed in the Playwright logs + test: typeof test; +} + +/** + * Ensure that, from the current Filing step, users cannot inappropriately access future steps. + */ +export const verifyRedirects = async ({ + page, + test, + userShouldNotAccess, + afterRedirectURL, + afterRedirectHeading, + currentStepPath, + testLabel, +}: VerifyRedirects) => { + const [baseURL] = page.url().split(currentStepPath); + + // Note: Tests failed when using Promise.all in place of this loop approach + for (const futureStep of userShouldNotAccess) { + await test.step(`${testLabel}: Verify user cannot access ${futureStep}`, async () => { + await page.goto(baseURL + futureStep); + await expect(page).toHaveURL(afterRedirectURL, { timeout: 10_000 }); + await expect(page.locator('h1')).toContainText(afterRedirectHeading); + }); + } +}; diff --git a/e2e/pages/filing-app/filing-step-routing/errorsLogic.spec.ts b/e2e/pages/filing-app/filing-step-routing/errorsLogic.spec.ts new file mode 100644 index 000000000..cfaf71938 --- /dev/null +++ b/e2e/pages/filing-app/filing-step-routing/errorsLogic.spec.ts @@ -0,0 +1,30 @@ +import { test } from '../../../fixtures/testFixture'; +import { verifyRedirects } from './_shared'; + +const testLabel = 'Filing step routing (Errors: Logic)'; + +const currentStepPath = '/error'; + +const userShouldNotAccess = ['/warnings', '/contact', '/submit']; + +const afterRedirectHeading = 'Resolve errors (syntax)'; +const afterRedirectURL = /.*errors\/errors-syntax$/; + +test( + testLabel, + async ({ page, navigateToLogicErrorsAfterLogicErrorsUpload }) => { + test.slow(); + + navigateToLogicErrorsAfterLogicErrorsUpload; + + await verifyRedirects({ + afterRedirectHeading, + afterRedirectURL, + currentStepPath, + page, + test, + testLabel, + userShouldNotAccess, + }); + }, +); diff --git a/e2e/pages/filing-app/filing-step-routing/errorsSyntax.spec.ts b/e2e/pages/filing-app/filing-step-routing/errorsSyntax.spec.ts new file mode 100644 index 000000000..ad27d1d8c --- /dev/null +++ b/e2e/pages/filing-app/filing-step-routing/errorsSyntax.spec.ts @@ -0,0 +1,35 @@ +import { test } from '../../../fixtures/testFixture'; +import { verifyRedirects } from './_shared'; + +const testLabel = 'Filing step routing (Errors: Syntax)'; + +const currentStepPath = '/error'; + +const userShouldNotAccess = [ + '/errors/errors-logic', + '/warnings', + '/contact', + '/submit', +]; + +const afterRedirectHeading = 'Resolve errors (syntax)'; +const afterRedirectURL = /.*errors\/errors-syntax$/; + +test( + testLabel, + async ({ page, navigateToSyntaxErrorsAfterSyntaxErrorsUpload }) => { + test.slow(); + + navigateToSyntaxErrorsAfterSyntaxErrorsUpload; + + await verifyRedirects({ + afterRedirectHeading, + afterRedirectURL, + currentStepPath, + page, + test, + testLabel, + userShouldNotAccess, + }); + }, +); diff --git a/e2e/pages/filing-app/filing-step-routing/noUpload.spec.ts b/e2e/pages/filing-app/filing-step-routing/noUpload.spec.ts new file mode 100644 index 000000000..78b7c39a0 --- /dev/null +++ b/e2e/pages/filing-app/filing-step-routing/noUpload.spec.ts @@ -0,0 +1,27 @@ +import { test } from '../../../fixtures/testFixture'; +import { verifyRedirects } from './_shared'; + +const testLabel = 'Filing step routing (Upload)'; + +const currentStepPath = '/upload'; + +const userShouldNotAccess = ['/errors', '/warnings', '/contact', '/submit']; + +const afterRedirectHeading = 'Upload file'; +const afterRedirectURL = /.*\/upload$/; + +test(testLabel, async ({ page, navigateToUploadFile }) => { + test.slow(); + + navigateToUploadFile; + + await verifyRedirects({ + afterRedirectHeading, + afterRedirectURL, + currentStepPath, + page, + test, + testLabel, + userShouldNotAccess, + }); +}); diff --git a/e2e/pages/filing-app/filing-step-routing/pointOfContact.spec.ts b/e2e/pages/filing-app/filing-step-routing/pointOfContact.spec.ts new file mode 100644 index 000000000..05720496b --- /dev/null +++ b/e2e/pages/filing-app/filing-step-routing/pointOfContact.spec.ts @@ -0,0 +1,27 @@ +import { test } from '../../../fixtures/testFixture'; +import { verifyRedirects } from './_shared'; + +const testLabel = 'Filing step routing (Point of Contact)'; + +const currentStepPath = '/contact'; + +const userShouldNotAccess = ['/submit']; + +const afterRedirectHeading = 'Provide point of contact'; +const afterRedirectURL = /.*\/contact$/; + +test(testLabel, async ({ page, navigateToProvidePointOfContact }) => { + test.slow(); + + navigateToProvidePointOfContact; + + await verifyRedirects({ + testLabel, + currentStepPath, + userShouldNotAccess, + afterRedirectHeading, + afterRedirectURL, + page, + test, + }); +}); diff --git a/e2e/pages/filing-app/filing-step-routing/warnings.spec.ts b/e2e/pages/filing-app/filing-step-routing/warnings.spec.ts new file mode 100644 index 000000000..c85670f55 --- /dev/null +++ b/e2e/pages/filing-app/filing-step-routing/warnings.spec.ts @@ -0,0 +1,30 @@ +import { test } from '../../../fixtures/testFixture'; +import { verifyRedirects } from './_shared'; + +const testLabel = 'Filing step routing (Warnings)'; + +const currentStepPath = '/warnings'; + +const userShouldNotAccess = ['/contact', '/submit']; + +const afterRedirectHeading = 'Review warnings'; +const afterRedirectURL = /.*\/warnings$/; + +test( + testLabel, + async ({ page, navigateToReviewWarningsAfterOnlyWarningsUpload }) => { + test.slow(); + + navigateToReviewWarningsAfterOnlyWarningsUpload; + + await verifyRedirects({ + afterRedirectHeading, + afterRedirectURL, + currentStepPath, + page, + test, + testLabel, + userShouldNotAccess, + }); + }, +);