diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index 1c4c8fdb..f4f222ac 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -13,6 +13,7 @@ jobs: NEXT_PUBLIC_SUPABASE_URL: http://127.0.0.1:54321 NEXT_PUBLIC_SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 SUPABASE_SERVICE_ROLE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU + GOOGLE_MAPS_API_KEY: dummy_key steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 diff --git a/src/__tests__/unit/app/progress/__snapshots__/page.snapshot.tsx.snap b/src/__tests__/unit/app/progress/__snapshots__/page.snapshot.tsx.snap index 26156210..2d194cbf 100644 --- a/src/__tests__/unit/app/progress/__snapshots__/page.snapshot.tsx.snap +++ b/src/__tests__/unit/app/progress/__snapshots__/page.snapshot.tsx.snap @@ -94,11 +94,12 @@ exports[`Progress renders progress page unchanged 1`] = ` Not registered to vote yet?
Register now - and earn a badge! + + and earn a badge!

@@ -355,11 +356,12 @@ exports[`Progress renders progress page unchanged 1`] = ` Not registered to vote yet?
Register now - and earn a badge! + + and earn a badge!

diff --git a/src/__tests__/unit/components/form-components/input-group.test.tsx b/src/__tests__/unit/components/form-components/input-group.test.tsx index 7c975004..19a3ff54 100644 --- a/src/__tests__/unit/components/form-components/input-group.test.tsx +++ b/src/__tests__/unit/components/form-components/input-group.test.tsx @@ -27,7 +27,7 @@ describe('InputGroup', () => { expect(input.id).toBe(field.id); }); - it(`renders an input element whose aria-describedby attribute is set to the id + it(`renders an input element whose aria-describedby attribute includes the id of the Messages component it renders.`, () => { const invalidEmailMessage = 'Please enter a valid email address.'; @@ -52,7 +52,7 @@ describe('InputGroup', () => { const input = screen.getByRole('textbox') as HTMLInputElement; const messagesId = `${email.id}-messages`; - expect(input.getAttribute('aria-describedby')).toBe(messagesId); + expect(input.getAttribute('aria-describedby')).toContain(messagesId); const messages = document.getElementById(messagesId); expect(messages).toBeTruthy(); diff --git a/src/__tests__/unit/components/form-components/phone-input-group.test.tsx b/src/__tests__/unit/components/form-components/phone-input-group.test.tsx index 0b31764e..128479aa 100644 --- a/src/__tests__/unit/components/form-components/phone-input-group.test.tsx +++ b/src/__tests__/unit/components/form-components/phone-input-group.test.tsx @@ -26,7 +26,7 @@ describe('PhoneInputGroup', () => { expect(input.id).toBe(phoneNumber.id); }); - it(`renders an input element whose aria-describedby attribute is set to the id + it(`renders an input element whose aria-describedby attribute includes the id of the Messages component it renders.`, () => { const invalidMessage = 'Please enter a valid phone number.'; @@ -51,7 +51,7 @@ describe('PhoneInputGroup', () => { const input = screen.getByRole('textbox') as HTMLInputElement; const messagesId = `${phoneNumber.id}-messages`; - expect(input.getAttribute('aria-describedby')).toBe(messagesId); + expect(input.getAttribute('aria-describedby')).toContain(messagesId); const messages = document.getElementById(messagesId); expect(messages).toBeTruthy(); diff --git a/src/__tests__/unit/components/form-components/select/select.test.tsx b/src/__tests__/unit/components/form-components/select/select.test.tsx index 0c1e188c..26521ee2 100644 --- a/src/__tests__/unit/components/form-components/select/select.test.tsx +++ b/src/__tests__/unit/components/form-components/select/select.test.tsx @@ -514,40 +514,6 @@ describe('Select', () => { expect(outerContainer.classList).toContain(className); }); - it(`displays any messages associated with the field if the field has been - blurred.`, async () => { - const invalidMessage = 'Please select an option.'; - - const requiredField = new Field({ - name: 'requiredField', - defaultValue: '', - validators: [ - StringValidators.required({ - invalidMessage, - }), - ], - }); - - render( -