From 64a8f15a9b6159b7b900423c30d1d9feca8c6e2e Mon Sep 17 00:00:00 2001 From: LightCreator1007 Date: Sat, 9 May 2026 20:39:05 +0530 Subject: [PATCH 1/3] tests: Converted Accessibility Options test to VTL - covered all the original tests. - coverage includes user interaction tests. --- .../__tests__/accessibilityOptions.spec.js | 197 +++++++++++------- 1 file changed, 122 insertions(+), 75 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js b/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js index 3248b7180e..f9fad8f146 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js +++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js @@ -1,101 +1,148 @@ -import { shallowMount, mount } from '@vue/test-utils'; +import { render, screen, configure, within } from '@testing-library/vue'; +import userEvent from '@testing-library/user-event'; import AccessibilityOptions from '../AccessibilityOptions.vue'; +import { AccessibilityCategories } from 'shared/constants'; describe('AccessibilityOptions', () => { - it('smoke test', () => { - const wrapper = shallowMount(AccessibilityOptions, { - propsData: { - kind: 'document', - }, - }); - expect(wrapper.exists()).toBe(true); + beforeAll(() => { + configure({ testIdAttribute: 'data-test' }); + }); + + afterAll(() => { + configure({ testIdAttribute: 'data-testid' }); }); - it('should display the correct list of accessibility options if resource is a document', () => { - const wrapper = mount(AccessibilityOptions, { - propsData: { + const mockConstantsMixin = {}; + const mockMetadataMixin = { + methods: { + translateMetadataString: (str) => str, + } + }; + + const renderComponent = props => { + return render(AccessibilityOptions, { + props: { kind: 'document', + value: [], + ...props, }, + routes: [], + mixins: [mockConstantsMixin, mockMetadataMixin], + mocks: { + $tr: (key) => key, + } }); + }; - expect(wrapper.findComponent('[data-test="checkbox-altText"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-highContrast"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-taggedPdf"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-signLanguage"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-audioDescription"]').exists()).toBe(false); + it('smoke test', () => { + renderComponent(); + expect(screen.getByTestId('checkbox-altText')).toBeInTheDocument(); }); - it('should display the correct list of accessibility options if resource is a video', () => { - const wrapper = mount(AccessibilityOptions, { - propsData: { - kind: 'video', - }, - }); + it('displays the correct accessibility options for a document', () => { + renderComponent({ kind: 'document' }); + + expect(screen.getByTestId('checkbox-altText')).toBeInTheDocument(); + expect(screen.getByTestId('checkbox-highContrast')).toBeInTheDocument(); + expect(screen.getByTestId('checkbox-taggedPdf')).toBeInTheDocument(); - expect(wrapper.findComponent('[data-test="checkbox-altText"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-highContrast"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-taggedPdf"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-signLanguage"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-audioDescription"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-captionsSubtitles"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="tooltip-captionsSubtitles"]').exists()).toBe(false); + expect(screen.queryByTestId('checkbox-signLanguage')).not.toBeInTheDocument(); + expect(screen.queryByTestId('checkbox-audioDescription')).not.toBeInTheDocument(); }); - it('should display the correct list of accessibility options if resource is an exercise/practice', () => { - const wrapper = mount(AccessibilityOptions, { - propsData: { - kind: 'exercise', - }, - }); + it('displays the correct accessibility options for a video without captions tooltip', () => { + renderComponent({ kind: 'video' }); + + expect(screen.getByTestId('checkbox-signLanguage')).toBeInTheDocument(); + expect(screen.getByTestId('checkbox-audioDescription')).toBeInTheDocument(); + expect(screen.getByTestId('checkbox-captionsSubtitles')).toBeInTheDocument(); - expect(wrapper.findComponent('[data-test="checkbox-altText"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-highContrast"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-taggedPdf"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-signLanguage"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-audioDescription"]').exists()).toBe(false); + expect(screen.queryByTestId('checkbox-altText')).not.toBeInTheDocument(); + expect(screen.queryByTestId('checkbox-highContrast')).not.toBeInTheDocument(); + expect(screen.queryByTestId('checkbox-taggedPdf')).not.toBeInTheDocument(); + + expect(screen.queryByTestId('tooltip-captionsSubtitles')).not.toBeInTheDocument(); }); - it('should display the correct list of accessibility options if resource is html5/zip', () => { - const wrapper = mount(AccessibilityOptions, { - propsData: { - kind: 'html5', - }, - }); + it('displays the correct accessibility options for an exercise', () => { + renderComponent({ kind: 'exercise' }); + + expect(screen.getByTestId('checkbox-altText')).toBeInTheDocument(); - expect(wrapper.findComponent('[data-test="checkbox-altText"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-highContrast"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-taggedPdf"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-signLanguage"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-audioDescription"]').exists()).toBe(false); + expect(screen.queryByTestId('checkbox-highContrast')).not.toBeInTheDocument(); + expect(screen.queryByTestId('checkbox-taggedPdf')).not.toBeInTheDocument(); + expect(screen.queryByTestId('checkbox-signLanguage')).not.toBeInTheDocument(); + expect(screen.queryByTestId('checkbox-audioDescription')).not.toBeInTheDocument(); }); - it('should display the correct list of accessibility options if resource is an audio', () => { - const wrapper = mount(AccessibilityOptions, { - propsData: { - kind: 'audio', - }, - }); + it('displays the correct accessibility options for HTML5/ZIP apps', () => { + renderComponent({ kind: 'html5' }); + + expect(screen.getByTestId('checkbox-altText')).toBeInTheDocument(); + expect(screen.getByTestId('checkbox-highContrast')).toBeInTheDocument(); - expect(wrapper.findComponent('[data-test="checkbox-captionsSubtitles"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="tooltip-captionsSubtitles"]').exists()).toBe(false); + expect(screen.queryByTestId('checkbox-taggedPdf')).not.toBeInTheDocument(); + expect(screen.queryByTestId('checkbox-signLanguage')).not.toBeInTheDocument(); + expect(screen.queryByTestId('checkbox-audioDescription')).not.toBeInTheDocument(); }); - it('should render appropriate tooltips along with the checkbox', () => { - const wrapper = mount(AccessibilityOptions, { - propsData: { - kind: 'document', - }, + it('displays the correct accessibility options for an audio file without tooltip', () => { + renderComponent({ kind: 'audio' }); + + expect(screen.getByTestId('checkbox-captionsSubtitles')).toBeInTheDocument(); + expect(screen.queryByTestId('tooltip-captionsSubtitles')).not.toBeInTheDocument(); + }); + + it('renders appropriate tooltips next to the corresponding checkboxes', () => { + renderComponent({ kind: 'document' }); + + expect(screen.getByTestId('tooltip-altText')).toBeInTheDocument(); + expect(screen.getByTestId('tooltip-highContrast')).toBeInTheDocument(); + expect(screen.getByTestId('tooltip-taggedPdf')).toBeInTheDocument(); + + expect(screen.queryByTestId('tooltip-signLanguage')).not.toBeInTheDocument(); + expect(screen.queryByTestId('tooltip-audioDescription')).not.toBeInTheDocument(); + }); + + describe('User Interactions and v-model', () => { + it('emits an input event with the updated array when a user checks an option', async () => { + const { emitted } = renderComponent({ kind: 'document', value: [] }); + + const checkboxWrapper = screen.getByTestId('checkbox-altText'); + const actualCheckbox = within(checkboxWrapper).getByRole('checkbox'); + + await userEvent.click(actualCheckbox); + + expect(emitted()).toHaveProperty('input'); + expect(emitted().input[0][0]).toEqual([AccessibilityCategories.ALT_TEXT]); }); - expect(wrapper.findComponent('[data-test="checkbox-altText"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="tooltip-altText"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-highContrast"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="tooltip-highContrast"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-taggedPdf"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="tooltip-taggedPdf"]').exists()).toBe(true); - expect(wrapper.findComponent('[data-test="checkbox-signLanguage"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="tooltip-signLanguage"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="checkbox-audioDescription"]').exists()).toBe(false); - expect(wrapper.findComponent('[data-test="tooltip-audioDescription"]').exists()).toBe(false); + it('emits an updated array with the item removed when a user unchecks a pre-checked option', async () => { + const { emitted } = renderComponent({ + kind: 'video', + value: [AccessibilityCategories.SIGN_LANGUAGE], // Pre-checked state + }); + + const checkboxWrapper = screen.getByTestId('checkbox-signLanguage'); + const actualCheckbox = within(checkboxWrapper).getByRole('checkbox'); + + await userEvent.click(actualCheckbox); + expect(emitted()).toHaveProperty('input'); + expect(emitted().input[0][0]).toEqual([]); + }); + + it('renders correctly when accessibility options are pre-checked via v-model', () => { + renderComponent({ + kind: 'video', + value: [AccessibilityCategories.SIGN_LANGUAGE, AccessibilityCategories.CAPTIONS_SUBTITLES] + }); + + const signLanguageCheckbox = within(screen.getByTestId('checkbox-signLanguage')).getByRole('checkbox'); + const captionsCheckbox = within(screen.getByTestId('checkbox-captionsSubtitles')).getByRole('checkbox'); + const audioDescCheckbox = within(screen.getByTestId('checkbox-audioDescription')).getByRole('checkbox'); + expect(signLanguageCheckbox).toBeChecked(); + expect(captionsCheckbox).toBeChecked(); + expect(audioDescCheckbox).not.toBeChecked(); + }); }); -}); +}); \ No newline at end of file From f5ab93e3957dd9386f7501ca42408158d2de45d2 Mon Sep 17 00:00:00 2001 From: LightCreator1007 Date: Sat, 9 May 2026 21:02:24 +0530 Subject: [PATCH 2/3] refactored test's over-reliance on getByTestId to follow vtl's query priority --- .../__tests__/accessibilityOptions.spec.js | 104 ++++++++---------- 1 file changed, 46 insertions(+), 58 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js b/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js index f9fad8f146..667692b854 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js +++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js @@ -1,17 +1,17 @@ -import { render, screen, configure, within } from '@testing-library/vue'; +import { render, screen, configure } from '@testing-library/vue'; import userEvent from '@testing-library/user-event'; import AccessibilityOptions from '../AccessibilityOptions.vue'; import { AccessibilityCategories } from 'shared/constants'; -describe('AccessibilityOptions', () => { - beforeAll(() => { +beforeAll(() => { configure({ testIdAttribute: 'data-test' }); }); - afterAll(() => { - configure({ testIdAttribute: 'data-testid' }); - }); +afterAll(() => { + configure({ testIdAttribute: 'data-testid' }); +}); +describe('AccessibilityOptions', () => { const mockConstantsMixin = {}; const mockMetadataMixin = { methods: { @@ -34,84 +34,76 @@ describe('AccessibilityOptions', () => { }); }; - it('smoke test', () => { + it('renders successfully', () => { renderComponent(); - expect(screen.getByTestId('checkbox-altText')).toBeInTheDocument(); + expect(screen.getAllByRole('checkbox').length).toBeGreaterThan(0); }); - it('displays the correct accessibility options for a document', () => { + it('shows document-specific accessibility options to the user', () => { renderComponent({ kind: 'document' }); - expect(screen.getByTestId('checkbox-altText')).toBeInTheDocument(); - expect(screen.getByTestId('checkbox-highContrast')).toBeInTheDocument(); - expect(screen.getByTestId('checkbox-taggedPdf')).toBeInTheDocument(); + + const checkboxes = screen.getAllByRole('checkbox'); + expect(checkboxes).toHaveLength(3); - expect(screen.queryByTestId('checkbox-signLanguage')).not.toBeInTheDocument(); - expect(screen.queryByTestId('checkbox-audioDescription')).not.toBeInTheDocument(); + + expect(screen.getByRole('checkbox', { name: /altText/i })).toBeInTheDocument(); + expect(screen.getByRole('checkbox', { name: /highContrast/i })).toBeInTheDocument(); + expect(screen.getByRole('checkbox', { name: /taggedPdf/i })).toBeInTheDocument(); }); - it('displays the correct accessibility options for a video without captions tooltip', () => { + it('shows video-specific accessibility options to the user', () => { renderComponent({ kind: 'video' }); - expect(screen.getByTestId('checkbox-signLanguage')).toBeInTheDocument(); - expect(screen.getByTestId('checkbox-audioDescription')).toBeInTheDocument(); - expect(screen.getByTestId('checkbox-captionsSubtitles')).toBeInTheDocument(); - - expect(screen.queryByTestId('checkbox-altText')).not.toBeInTheDocument(); - expect(screen.queryByTestId('checkbox-highContrast')).not.toBeInTheDocument(); - expect(screen.queryByTestId('checkbox-taggedPdf')).not.toBeInTheDocument(); + const checkboxes = screen.getAllByRole('checkbox'); + expect(checkboxes).toHaveLength(3); + expect(screen.getByRole('checkbox', { name: /signLanguage/i })).toBeInTheDocument(); + expect(screen.getByRole('checkbox', { name: /audioDescription/i })).toBeInTheDocument(); + expect(screen.getByRole('checkbox', { name: /captionsSubtitles/i })).toBeInTheDocument(); + expect(screen.queryByTestId('tooltip-captionsSubtitles')).not.toBeInTheDocument(); }); - it('displays the correct accessibility options for an exercise', () => { + it('shows exercise-specific accessibility options to the user', () => { renderComponent({ kind: 'exercise' }); - expect(screen.getByTestId('checkbox-altText')).toBeInTheDocument(); - - expect(screen.queryByTestId('checkbox-highContrast')).not.toBeInTheDocument(); - expect(screen.queryByTestId('checkbox-taggedPdf')).not.toBeInTheDocument(); - expect(screen.queryByTestId('checkbox-signLanguage')).not.toBeInTheDocument(); - expect(screen.queryByTestId('checkbox-audioDescription')).not.toBeInTheDocument(); + const checkboxes = screen.getAllByRole('checkbox'); + expect(checkboxes).toHaveLength(1); + expect(screen.getByRole('checkbox', { name: /altText/i })).toBeInTheDocument(); }); - it('displays the correct accessibility options for HTML5/ZIP apps', () => { + it('shows HTML5-specific accessibility options to the user', () => { renderComponent({ kind: 'html5' }); - expect(screen.getByTestId('checkbox-altText')).toBeInTheDocument(); - expect(screen.getByTestId('checkbox-highContrast')).toBeInTheDocument(); - - expect(screen.queryByTestId('checkbox-taggedPdf')).not.toBeInTheDocument(); - expect(screen.queryByTestId('checkbox-signLanguage')).not.toBeInTheDocument(); - expect(screen.queryByTestId('checkbox-audioDescription')).not.toBeInTheDocument(); + const checkboxes = screen.getAllByRole('checkbox'); + expect(checkboxes).toHaveLength(2); + expect(screen.getByRole('checkbox', { name: /altText/i })).toBeInTheDocument(); + expect(screen.getByRole('checkbox', { name: /highContrast/i })).toBeInTheDocument(); }); - it('displays the correct accessibility options for an audio file without tooltip', () => { + it('shows audio-specific accessibility options to the user', () => { renderComponent({ kind: 'audio' }); - expect(screen.getByTestId('checkbox-captionsSubtitles')).toBeInTheDocument(); - expect(screen.queryByTestId('tooltip-captionsSubtitles')).not.toBeInTheDocument(); + const checkboxes = screen.getAllByRole('checkbox'); + expect(checkboxes).toHaveLength(1); + expect(screen.getByRole('checkbox', { name: /captionsSubtitles/i })).toBeInTheDocument(); }); - it('renders appropriate tooltips next to the corresponding checkboxes', () => { + it('renders informative tooltips next to the corresponding options', () => { renderComponent({ kind: 'document' }); expect(screen.getByTestId('tooltip-altText')).toBeInTheDocument(); expect(screen.getByTestId('tooltip-highContrast')).toBeInTheDocument(); expect(screen.getByTestId('tooltip-taggedPdf')).toBeInTheDocument(); - - expect(screen.queryByTestId('tooltip-signLanguage')).not.toBeInTheDocument(); - expect(screen.queryByTestId('tooltip-audioDescription')).not.toBeInTheDocument(); }); describe('User Interactions and v-model', () => { it('emits an input event with the updated array when a user checks an option', async () => { const { emitted } = renderComponent({ kind: 'document', value: [] }); - const checkboxWrapper = screen.getByTestId('checkbox-altText'); - const actualCheckbox = within(checkboxWrapper).getByRole('checkbox'); - - await userEvent.click(actualCheckbox); + const altTextCheckbox = screen.getByRole('checkbox', { name: /altText/i }); + await userEvent.click(altTextCheckbox); expect(emitted()).toHaveProperty('input'); expect(emitted().input[0][0]).toEqual([AccessibilityCategories.ALT_TEXT]); @@ -120,13 +112,12 @@ describe('AccessibilityOptions', () => { it('emits an updated array with the item removed when a user unchecks a pre-checked option', async () => { const { emitted } = renderComponent({ kind: 'video', - value: [AccessibilityCategories.SIGN_LANGUAGE], // Pre-checked state + value: [AccessibilityCategories.SIGN_LANGUAGE], }); - const checkboxWrapper = screen.getByTestId('checkbox-signLanguage'); - const actualCheckbox = within(checkboxWrapper).getByRole('checkbox'); - - await userEvent.click(actualCheckbox); + const signLanguageCheckbox = screen.getByRole('checkbox', { name: /signLanguage/i }); + await userEvent.click(signLanguageCheckbox); + expect(emitted()).toHaveProperty('input'); expect(emitted().input[0][0]).toEqual([]); }); @@ -137,12 +128,9 @@ describe('AccessibilityOptions', () => { value: [AccessibilityCategories.SIGN_LANGUAGE, AccessibilityCategories.CAPTIONS_SUBTITLES] }); - const signLanguageCheckbox = within(screen.getByTestId('checkbox-signLanguage')).getByRole('checkbox'); - const captionsCheckbox = within(screen.getByTestId('checkbox-captionsSubtitles')).getByRole('checkbox'); - const audioDescCheckbox = within(screen.getByTestId('checkbox-audioDescription')).getByRole('checkbox'); - expect(signLanguageCheckbox).toBeChecked(); - expect(captionsCheckbox).toBeChecked(); - expect(audioDescCheckbox).not.toBeChecked(); + expect(screen.getByRole('checkbox', { name: /signLanguage/i })).toBeChecked(); + expect(screen.getByRole('checkbox', { name: /captionsSubtitles/i })).toBeChecked(); + expect(screen.getByRole('checkbox', { name: /audioDescription/i })).not.toBeChecked(); }); }); }); \ No newline at end of file From f1944084e6ba8d37701a7332a693e1ae9369b86d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sat, 9 May 2026 15:56:02 +0000 Subject: [PATCH 3/3] [pre-commit.ci lite] apply automatic fixes --- .../__tests__/accessibilityOptions.spec.js | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js b/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js index 667692b854..f60b3ee332 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js +++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/__tests__/accessibilityOptions.spec.js @@ -4,8 +4,8 @@ import AccessibilityOptions from '../AccessibilityOptions.vue'; import { AccessibilityCategories } from 'shared/constants'; beforeAll(() => { - configure({ testIdAttribute: 'data-test' }); - }); + configure({ testIdAttribute: 'data-test' }); +}); afterAll(() => { configure({ testIdAttribute: 'data-testid' }); @@ -15,22 +15,22 @@ describe('AccessibilityOptions', () => { const mockConstantsMixin = {}; const mockMetadataMixin = { methods: { - translateMetadataString: (str) => str, - } + translateMetadataString: str => str, + }, }; const renderComponent = props => { return render(AccessibilityOptions, { props: { kind: 'document', - value: [], + value: [], ...props, }, routes: [], mixins: [mockConstantsMixin, mockMetadataMixin], mocks: { - $tr: (key) => key, - } + $tr: key => key, + }, }); }; @@ -42,11 +42,9 @@ describe('AccessibilityOptions', () => { it('shows document-specific accessibility options to the user', () => { renderComponent({ kind: 'document' }); - const checkboxes = screen.getAllByRole('checkbox'); expect(checkboxes).toHaveLength(3); - expect(screen.getByRole('checkbox', { name: /altText/i })).toBeInTheDocument(); expect(screen.getByRole('checkbox', { name: /highContrast/i })).toBeInTheDocument(); expect(screen.getByRole('checkbox', { name: /taggedPdf/i })).toBeInTheDocument(); @@ -61,7 +59,7 @@ describe('AccessibilityOptions', () => { expect(screen.getByRole('checkbox', { name: /signLanguage/i })).toBeInTheDocument(); expect(screen.getByRole('checkbox', { name: /audioDescription/i })).toBeInTheDocument(); expect(screen.getByRole('checkbox', { name: /captionsSubtitles/i })).toBeInTheDocument(); - + expect(screen.queryByTestId('tooltip-captionsSubtitles')).not.toBeInTheDocument(); }); @@ -112,20 +110,20 @@ describe('AccessibilityOptions', () => { it('emits an updated array with the item removed when a user unchecks a pre-checked option', async () => { const { emitted } = renderComponent({ kind: 'video', - value: [AccessibilityCategories.SIGN_LANGUAGE], + value: [AccessibilityCategories.SIGN_LANGUAGE], }); - + const signLanguageCheckbox = screen.getByRole('checkbox', { name: /signLanguage/i }); await userEvent.click(signLanguageCheckbox); expect(emitted()).toHaveProperty('input'); - expect(emitted().input[0][0]).toEqual([]); + expect(emitted().input[0][0]).toEqual([]); }); it('renders correctly when accessibility options are pre-checked via v-model', () => { - renderComponent({ - kind: 'video', - value: [AccessibilityCategories.SIGN_LANGUAGE, AccessibilityCategories.CAPTIONS_SUBTITLES] + renderComponent({ + kind: 'video', + value: [AccessibilityCategories.SIGN_LANGUAGE, AccessibilityCategories.CAPTIONS_SUBTITLES], }); expect(screen.getByRole('checkbox', { name: /signLanguage/i })).toBeChecked(); @@ -133,4 +131,4 @@ describe('AccessibilityOptions', () => { expect(screen.getByRole('checkbox', { name: /audioDescription/i })).not.toBeChecked(); }); }); -}); \ No newline at end of file +});