diff --git a/src/assessments/assessment-builder.tsx b/src/assessments/assessment-builder.tsx index 6bac966ce22..a6d14cc1015 100644 --- a/src/assessments/assessment-builder.tsx +++ b/src/assessments/assessment-builder.tsx @@ -23,17 +23,17 @@ import { DrawerProvider } from 'injected/visualization/drawer-provider'; import { cloneDeep } from 'lodash'; import { DictionaryStringTo } from 'types/common-types'; import { Assessment, AssistedAssessment, ManualAssessment } from './types/iassessment'; -import { ReportInstanceField } from './types/report-instance-field'; +import { ReportInstanceField, ReportInstanceFields } from './types/report-instance-field'; import { Requirement } from './types/requirement'; export class AssessmentBuilder { private static applyDefaultReportFieldMap(requirement: Requirement): void { const { comment, snippet, path, manualSnippet, manualPath } = ReportInstanceField.common; - const defaults = requirement.isManual + const defaults: ReportInstanceFields = requirement.isManual ? [comment, manualPath, manualSnippet] : [path, snippet]; - const specified = requirement.reportInstanceFields || []; + const specified: ReportInstanceFields = requirement.reportInstanceFields ?? []; requirement.reportInstanceFields = [...defaults, ...specified]; } @@ -133,11 +133,14 @@ export class AssessmentBuilder { selectorMap: DictionaryStringTo, requirement?: string, ) => { + if (requirement == null) { + return null; + } const requirementConfig = AssessmentBuilder.getRequirementConfig( requirements, requirement, ); - if (requirementConfig.getNotificationMessage == null) { + if (requirementConfig?.getNotificationMessage == null) { return null; } return requirementConfig.getNotificationMessage(selectorMap); @@ -180,7 +183,7 @@ export class AssessmentBuilder { requirements, analyzerConfig.key, ); - if (requirementConfig.getAnalyzer == null) { + if (requirementConfig?.getAnalyzer == null) { return provider.createBaseAnalyzer(analyzerConfig); } return requirementConfig.getAnalyzer(provider, analyzerConfig); @@ -195,7 +198,7 @@ export class AssessmentBuilder { requirements, requirement, ); - if (requirementConfig.getDrawer == null) { + if (requirementConfig?.getDrawer == null) { return provider.createNullDrawer(); } return requirementConfig.getDrawer(provider, featureFlagStoreData); @@ -205,11 +208,14 @@ export class AssessmentBuilder { selectorMap: DictionaryStringTo, requirement?: string, ) => { + if (requirement == null) { + return null; + } const requirementConfig = AssessmentBuilder.getRequirementConfig( requirements, requirement, ); - if (requirementConfig.getNotificationMessage == null) { + if (requirementConfig?.getNotificationMessage == null) { return null; } return requirementConfig.getNotificationMessage(selectorMap); @@ -249,7 +255,7 @@ export class AssessmentBuilder { private static getRequirementConfig( requirements: Requirement[], requirementKey: string, - ): Requirement { + ): Requirement | undefined { return requirements.find(req => req.key === requirementKey); } diff --git a/src/assessments/assessments-provider.ts b/src/assessments/assessments-provider.ts index ec862143172..c24d3929c7f 100644 --- a/src/assessments/assessments-provider.ts +++ b/src/assessments/assessments-provider.ts @@ -18,7 +18,7 @@ export class AssessmentsProviderImpl implements AssessmentsProvider { return this.assessments.slice(); } - public forType(visualizationType: VisualizationType): Assessment { + public forType(visualizationType: VisualizationType): Assessment | undefined { return this.all().find(a => a.visualizationType === visualizationType); } @@ -26,19 +26,19 @@ export class AssessmentsProviderImpl implements AssessmentsProvider { return this.forType(visualizationType) != null; } - public forKey(key: string): Assessment { + public forKey(key: string): Assessment | undefined { return this.all().find(a => a.key === key); } - public forRequirementKey(key: string): Assessment { - return this.all().find(a => a.requirements.find(r => r.key === key)); + public forRequirementKey(key: string): Assessment | undefined { + return this.all().find(a => a.requirements.find(r => r.key === key) != null); } public isValidKey(key: string): boolean { return this.forKey(key) != null; } - public getStep(visualizationType: VisualizationType, key: string): Requirement { + public getStep(visualizationType: VisualizationType, key: string): Requirement | null { const assessment = this.forType(visualizationType); if (!assessment) { return null; @@ -51,7 +51,9 @@ export class AssessmentsProviderImpl implements AssessmentsProvider { return { ...steps[index] }; } - public getStepMap(visualizationType: VisualizationType): DictionaryStringTo { + public getStepMap( + visualizationType: VisualizationType, + ): DictionaryStringTo | null { const assessment = this.forType(visualizationType); if (!assessment) { return null; diff --git a/src/assessments/assessments-requirements-filter.ts b/src/assessments/assessments-requirements-filter.ts index f23a59a1f5d..bbc6b97cd0f 100644 --- a/src/assessments/assessments-requirements-filter.ts +++ b/src/assessments/assessments-requirements-filter.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { AutomatedChecks } from 'assessments/automated-checks/assessment'; +import { Assessment } from 'assessments/types/iassessment'; import { VisualizationType } from 'common/types/visualization-type'; import { DictionaryStringTo } from 'types/common-types'; @@ -11,25 +12,24 @@ export function assessmentsProviderForRequirements( assessmentProvider: AssessmentsProvider, requirementToVisualizationTypeMap: DictionaryStringTo, ): AssessmentsProvider { - const assessments = assessmentProvider - .all() - .map(assessment => { - let type: VisualizationType; - const requirements = assessment.requirements.filter(req => { - if (requirementToVisualizationTypeMap[req.key]) { - type = requirementToVisualizationTypeMap[req.key]; - return true; - } - return false; - }); + const assessments: Assessment[] = assessmentProvider.all().reduce((accumulator, assessment) => { + // This is a filterMap operation; it can be simplified if/when lodash merges + // https://github.com/lodash/lodash/issues/5300 + const filteredRequirements = assessment.requirements.filter( + req => requirementToVisualizationTypeMap[req.key] != null, + ); + if (filteredRequirements.length > 0) { + const lastRequirement = filteredRequirements[filteredRequirements.length - 1]; + const visualizationType = requirementToVisualizationTypeMap[lastRequirement.key]; - return { + accumulator.push({ ...assessment, - requirements, - visualizationType: type, - }; - }) - .filter(assessment => assessment.requirements.length > 0); + requirements: filteredRequirements, + visualizationType, + }); + } + return accumulator; + }, [] as Assessment[]); const mediumPassAutomatedChecks = { ...AutomatedChecks }; mediumPassAutomatedChecks.visualizationType = VisualizationType.AutomatedChecksMediumPass; diff --git a/src/assessments/headings/headings-instance-details-column-renderer.tsx b/src/assessments/headings/headings-instance-details-column-renderer.tsx index 5a4fd02246e..8f42163917a 100644 --- a/src/assessments/headings/headings-instance-details-column-renderer.tsx +++ b/src/assessments/headings/headings-instance-details-column-renderer.tsx @@ -10,16 +10,13 @@ export function headingsAssessmentInstanceDetailsColumnRenderer( item: InstanceTableRow, ): JSX.Element { const propertyBag = item.instance.propertyBag; - const textContent = propertyBag ? propertyBag.headingText : null; - const headingLevel = propertyBag ? propertyBag.headingLevel : null; - const labelText = headingLevel ? `H${item.instance.propertyBag.headingLevel}` : 'N/A'; - const headingStyle = headingLevel ? HeadingFormatter.headingStyles[headingLevel] : null; - const background = headingStyle ? headingStyle.outlineColor : '#767676'; - let customClass: string = null; + const textContent = propertyBag?.headingText ?? ''; + const headingLevel = propertyBag?.headingLevel ?? null; - if (headingLevel == null) { - customClass = 'not-applicable'; - } + const labelText = headingLevel != null ? `H${headingLevel}` : 'N/A'; + const headingStyle = headingLevel != null ? HeadingFormatter.headingStyles[headingLevel] : null; + const customClass = headingLevel != null ? undefined : 'not-applicable'; + const background = headingStyle != null ? headingStyle.outlineColor : '#767676'; return ( , ): JSX.Element { const propertyBag = item.instance.propertyBag; - const background = LandmarkFormatter.getStyleForLandmarkRole(propertyBag.role).outlineColor; - let textContent = propertyBag.role; - if (propertyBag.label != null) { + const background = LandmarkFormatter.getStyleForLandmarkRole(propertyBag?.role).outlineColor; + let textContent = propertyBag?.role ?? ''; + if (propertyBag?.label != null) { textContent += `: ${propertyBag.label}`; } diff --git a/src/assessments/links/test-steps/label-in-name-get-completed-requirement-details.ts b/src/assessments/links/test-steps/label-in-name-get-completed-requirement-details.ts index 0cdb5c5a6cc..19672262bf6 100644 --- a/src/assessments/links/test-steps/label-in-name-get-completed-requirement-details.ts +++ b/src/assessments/links/test-steps/label-in-name-get-completed-requirement-details.ts @@ -2,29 +2,24 @@ // Licensed under the MIT License. import { LinksTestStep } from 'assessments/links/test-steps/test-steps'; -import { - AssessmentData, - GeneratedAssessmentInstance, - TestStepResult, -} from 'common/types/store-data/assessment-result-data'; +import { AssessmentData, TestStepResult } from 'common/types/store-data/assessment-result-data'; import { ManualTestStatus } from 'common/types/store-data/manual-test-status'; -import { forEach } from 'lodash'; +import { forOwn } from 'lodash'; export const labelInNameGetCompletedRequirementDetails = (assessmentData: AssessmentData) => { let expectedPasses = 0; let expectedFailures = 0; let confirmedPasses = 0; let confirmedFailures = 0; - forEach(Object.keys(assessmentData.generatedAssessmentInstancesMap), key => { - const instance: GeneratedAssessmentInstance = - assessmentData.generatedAssessmentInstancesMap[key]; + + forOwn(assessmentData.generatedAssessmentInstancesMap ?? {}, instance => { const testStepResult: TestStepResult = instance.testStepResults[LinksTestStep.labelInName]; if (!testStepResult) { return; } - const labelContainsVisibleText = instance.propertyBag['labelContainsVisibleText']; - if (labelContainsVisibleText === undefined) { + const labelContainsVisibleText = instance.propertyBag?.['labelContainsVisibleText']; + if (labelContainsVisibleText == null) { return; } diff --git a/src/assessments/page/frametitle-instance-details-column-renderer.tsx b/src/assessments/page/frametitle-instance-details-column-renderer.tsx index ccfc21c0370..020d866866e 100644 --- a/src/assessments/page/frametitle-instance-details-column-renderer.tsx +++ b/src/assessments/page/frametitle-instance-details-column-renderer.tsx @@ -10,7 +10,9 @@ export function frameTitleInstanceDetailsColumnRenderer( item: InstanceTableRow, ): JSX.Element { const propertyBag = item.instance.propertyBag; - const frameTitle = propertyBag ? propertyBag.frameTitle : null; + // Undefined frameTitles shouldn't occur; frames without titles are expected to be omitted from + // the instance list, since they're already covered by an automated check failure. + const frameTitle = propertyBag?.frameTitle ?? ''; const frameType = propertyBag ? propertyBag.frameType : 'default'; const frameConfig = FrameFormatter.frameStyles[frameType]; diff --git a/src/assessments/page/pagetitle-instance-details-column-renderer.tsx b/src/assessments/page/pagetitle-instance-details-column-renderer.tsx index 321e0a6ea79..5c915fdbff7 100644 --- a/src/assessments/page/pagetitle-instance-details-column-renderer.tsx +++ b/src/assessments/page/pagetitle-instance-details-column-renderer.tsx @@ -1,12 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { InstanceTableRow } from 'assessments/types/instance-table-data'; +import { PageAssessmentProperties } from 'common/types/store-data/assessment-result-data'; import { AssessmentInstanceDetailsColumn } from 'DetailsView/components/assessment-instance-details-column'; import * as React from 'react'; -export function pageTitleInstanceDetailsColumnRenderer(item: InstanceTableRow): JSX.Element { +export function pageTitleInstanceDetailsColumnRenderer( + item: InstanceTableRow, +): JSX.Element { const propertyBag = item.instance.propertyBag; - const textContent = propertyBag ? propertyBag.pageTitle : null; + // Undefined pageTitles shouldn't occur in practice; the browser will infer the title to be + // the last URL path component rather than emitting an undefined page title + const textContent = propertyBag?.pageTitle ?? ''; return ; } diff --git a/src/assessments/types/assessments-provider.ts b/src/assessments/types/assessments-provider.ts index f34bb953134..8a19d8e84fd 100644 --- a/src/assessments/types/assessments-provider.ts +++ b/src/assessments/types/assessments-provider.ts @@ -8,12 +8,12 @@ import { Requirement } from './requirement'; export interface AssessmentsProvider { all(): ReadonlyArray>; isValidType(visualizationType: VisualizationType): boolean; - forType(visualizationType: VisualizationType): Readonly; + forType(visualizationType: VisualizationType): Readonly | undefined; isValidKey(key: string): boolean; - forKey(key: string): Readonly; - forRequirementKey(key: string): Readonly; - getStep(visualizationType: VisualizationType, key: string): Readonly; + forKey(key: string): Readonly | undefined; + forRequirementKey(key: string): Readonly | undefined; + getStep(visualizationType: VisualizationType, key: string): Readonly | null; getStepMap( visualizationType: VisualizationType, - ): Readonly>>; + ): Readonly>> | null; } diff --git a/src/assessments/types/report-instance-field.ts b/src/assessments/types/report-instance-field.ts index 977d66d2ad5..3340d52aa69 100644 --- a/src/assessments/types/report-instance-field.ts +++ b/src/assessments/types/report-instance-field.ts @@ -46,7 +46,7 @@ function fromColumnValueBagField( function fromPropertyBagFunction( label: string, key: string, - accessor: (bag: PB) => string, + accessor: (bag: PB) => string | null, ): ReportInstanceField> { function getValue(i: HasPropertyBag): ColumnValue { return i.propertyBag && accessor(i.propertyBag); @@ -54,7 +54,8 @@ function fromPropertyBagFunction( return { key, label, getValue }; } -const common: ReportInstanceFieldMap = { +type CommonReportInstanceFieldKey = 'comment' | 'snippet' | 'path' | 'manualSnippet' | 'manualPath'; +const common: { [key in CommonReportInstanceFieldKey]: ReportInstanceField } = { comment: { key: 'comment', label: 'Comment', getValue: i => i.description }, snippet: { key: 'snippet', label: 'Snippet', getValue: i => i.html }, path: { key: 'path', label: 'Path', getValue: i => i.target && i.target.join(', ') }, diff --git a/src/background/create-initial-assessment-test-data.ts b/src/background/create-initial-assessment-test-data.ts index 6db6d71672b..7cdfc8ba25e 100644 --- a/src/background/create-initial-assessment-test-data.ts +++ b/src/background/create-initial-assessment-test-data.ts @@ -56,14 +56,14 @@ export const createAutomatedChecksInitialAssessmentTestData: InitialDataCreator }; function getDefaultInitialTestData(requirements: string[]): AssessmentData { - return getInitialTestDataUsingPersistedData(requirements, {}, {}, null); + return getInitialTestDataUsingPersistedData(requirements, {}, {}, undefined); } function getInitialTestDataUsingPersistedData( requirements: string[], persistedRequirementsStatus: ManualTestStatusData, - persistedManualMap: RequirementIdToResultMap, - persistedGeneratedMap: InstanceIdToInstanceDataMap, + persistedManualMap?: RequirementIdToResultMap, + persistedGeneratedMap?: InstanceIdToInstanceDataMap, ): AssessmentData { const testData: AssessmentData = getDefaultTestResult(); testData.testStepStatus = constructRequirementStatus(requirements, persistedRequirementsStatus); @@ -89,7 +89,7 @@ function allRequirementsAreScanned(requirements: string[], persistedTest: Assess function getDefaultTestResult(): AssessmentData { return { fullAxeResultsMap: null, - generatedAssessmentInstancesMap: null, + generatedAssessmentInstancesMap: undefined, manualTestStepResultMap: {}, testStepStatus: {}, }; @@ -116,7 +116,7 @@ function constructRequirementStatus( function constructManualRequirementResultMap( requirements: string[], - persistedMap: RequirementIdToResultMap, + persistedMap?: RequirementIdToResultMap, ): RequirementIdToResultMap { return constructMapFromRequirementTo( requirements, @@ -127,7 +127,7 @@ function constructManualRequirementResultMap( function constructMapFromRequirementTo( requirements: string[], - persistedMap: DictionaryStringTo, + persistedMap: DictionaryStringTo | undefined, getDefaultData: (req: string) => T, ): DictionaryStringTo { const map: DictionaryStringTo = {}; @@ -141,11 +141,11 @@ function constructMapFromRequirementTo( function constructGeneratedAssessmentInstancesMap( requirements: string[], - persistedMap: InstanceIdToInstanceDataMap, -): InstanceIdToInstanceDataMap { + persistedMap?: InstanceIdToInstanceDataMap, +): InstanceIdToInstanceDataMap | undefined { const map: InstanceIdToInstanceDataMap = {}; if (isEmpty(persistedMap)) { - return null; + return undefined; } Object.keys(persistedMap).forEach(instanceId => { const instanceData: GeneratedAssessmentInstance = persistedMap[instanceId]; @@ -156,7 +156,7 @@ function constructGeneratedAssessmentInstancesMap( } }); if (isEmpty(map)) { - return null; + return undefined; } return map; } diff --git a/src/common/types/property-bag/column-value-bag.ts b/src/common/types/property-bag/column-value-bag.ts index 7edc4df18f1..2044fcc3c99 100644 --- a/src/common/types/property-bag/column-value-bag.ts +++ b/src/common/types/property-bag/column-value-bag.ts @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. export type BagOf = { [K in string]: T }; -export type ScalarColumnValue = string | number | Date | boolean | undefined; +export type ScalarColumnValue = string | number | Date | boolean | undefined | null; export type ColumnValue = ScalarColumnValue | BagOf; export type ColumnValueBag = BagOf; export function isScalarColumnValue(value): value is ScalarColumnValue { return ( + value === null || value === undefined || typeof value === 'string' || typeof value === 'boolean' || diff --git a/src/injected/visualization/landmark-formatter.ts b/src/injected/visualization/landmark-formatter.ts index 228b43a7585..0484a30f859 100644 --- a/src/injected/visualization/landmark-formatter.ts +++ b/src/injected/visualization/landmark-formatter.ts @@ -56,8 +56,12 @@ export class LandmarkFormatter extends FailureInstanceFormatter { fontColor: '#FFFFFF', }; - public static getStyleForLandmarkRole(role: string): HeadingStyleConfiguration { - return LandmarkFormatter.landmarkStyles[role] || LandmarkFormatter.invalidLandmarkStyle; + public static getStyleForLandmarkRole(role?: string): HeadingStyleConfiguration { + if (role == null) { + return LandmarkFormatter.invalidLandmarkStyle; + } + + return LandmarkFormatter.landmarkStyles[role] ?? LandmarkFormatter.invalidLandmarkStyle; } public getDialogRenderer(): DialogRenderer | null { diff --git a/src/tests/unit/tests/assessments/frametitle-instance-details-column-renderer.test.tsx b/src/tests/unit/tests/assessments/frametitle-instance-details-column-renderer.test.tsx index 627be159003..bb09e93b9e4 100644 --- a/src/tests/unit/tests/assessments/frametitle-instance-details-column-renderer.test.tsx +++ b/src/tests/unit/tests/assessments/frametitle-instance-details-column-renderer.test.tsx @@ -20,7 +20,7 @@ describe('FrameTitleInstanceDetailsColumnRendererTest', () => { ); expect(expected).toEqual(frameTitleInstanceDetailsColumnRenderer(item)); diff --git a/src/tests/unit/tests/assessments/headings-instance-details-column-renderer.test.tsx b/src/tests/unit/tests/assessments/headings-instance-details-column-renderer.test.tsx index 5e4de10bf66..73d68bb27da 100644 --- a/src/tests/unit/tests/assessments/headings-instance-details-column-renderer.test.tsx +++ b/src/tests/unit/tests/assessments/headings-instance-details-column-renderer.test.tsx @@ -19,7 +19,7 @@ describe('HeadingsInstanceDetailsColumnRendererTest', () => { ); @@ -40,7 +40,6 @@ describe('HeadingsInstanceDetailsColumnRendererTest', () => { background={HeadingFormatter.headingStyles['3'].outlineColor} labelText={'H3'} textContent={'heading'} - customClassName={null} /> ); expect(headingsAssessmentInstanceDetailsColumnRenderer(item)).toEqual(expected); @@ -60,7 +59,6 @@ describe('HeadingsInstanceDetailsColumnRendererTest', () => { background={'#767676'} labelText={'H7'} textContent={'heading'} - customClassName={null} /> ); expect(headingsAssessmentInstanceDetailsColumnRenderer(item)).toEqual(expected); diff --git a/src/tests/unit/tests/assessments/pagetitle-instance-details-column-renderer.test.tsx b/src/tests/unit/tests/assessments/pagetitle-instance-details-column-renderer.test.tsx index c22a4bffeaa..f9b1a8f4316 100644 --- a/src/tests/unit/tests/assessments/pagetitle-instance-details-column-renderer.test.tsx +++ b/src/tests/unit/tests/assessments/pagetitle-instance-details-column-renderer.test.tsx @@ -4,7 +4,7 @@ import { pageTitleInstanceDetailsColumnRenderer } from 'assessments/page/pagetitle-instance-details-column-renderer'; import { InstanceTableRow } from 'assessments/types/instance-table-data'; import * as React from 'react'; -import { HeadingsAssessmentProperties } from '../../../../common/types/store-data/assessment-result-data'; +import { PageAssessmentProperties } from '../../../../common/types/store-data/assessment-result-data'; import { AssessmentInstanceDetailsColumn } from '../../../../DetailsView/components/assessment-instance-details-column'; describe('PageTitleInstanceDetailsColumnRendererTest', () => { @@ -13,8 +13,8 @@ describe('PageTitleInstanceDetailsColumnRendererTest', () => { instance: { propertyBag: null, }, - } as InstanceTableRow; - const expected = ; + } as InstanceTableRow; + const expected = ; expect(expected).toEqual(pageTitleInstanceDetailsColumnRenderer(item)); }); @@ -26,7 +26,7 @@ describe('PageTitleInstanceDetailsColumnRendererTest', () => { pageTitle: pageTitle, }, }, - } as InstanceTableRow; + } as InstanceTableRow; const expected = ; expect(expected).toEqual(pageTitleInstanceDetailsColumnRenderer(item)); }); diff --git a/src/tests/unit/tests/background/create-initial-assessment-test-data.test.ts b/src/tests/unit/tests/background/create-initial-assessment-test-data.test.ts index eaab9f19510..d03394859b4 100644 --- a/src/tests/unit/tests/background/create-initial-assessment-test-data.test.ts +++ b/src/tests/unit/tests/background/create-initial-assessment-test-data.test.ts @@ -154,7 +154,7 @@ describe('createAutomatedChecksInitialAssessmentTestData', () => { }, ); - expect(actual.generatedAssessmentInstancesMap).toEqual(null); + expect(actual.generatedAssessmentInstancesMap).toBeUndefined(); expect(actual.manualTestStepResultMap).toEqual(expectedManual); expect(actual.testStepStatus).toEqual(expectedTestStepStatus); }); @@ -246,7 +246,7 @@ describe('createAutomatedChecksInitialAssessmentTestData', () => { const persistedGenerated = { id1: createGeneratedAssessmentInstance('id1', [knownRequirement1, unknownRequirement]), }; - const expectedGenerated = null; + const expectedGenerated = undefined; const actual = createAutomatedChecksInitialAssessmentTestData( assessmentsProvider.forKey(knownTestIds[0]), diff --git a/src/tests/unit/tests/injected/visualization/landmark-formatter.test.ts b/src/tests/unit/tests/injected/visualization/landmark-formatter.test.ts index 42bf486fb4c..dcdaf2c97aa 100644 --- a/src/tests/unit/tests/injected/visualization/landmark-formatter.test.ts +++ b/src/tests/unit/tests/injected/visualization/landmark-formatter.test.ts @@ -48,7 +48,7 @@ describe('LandmarkFormatterTests', () => { testStyling(config, role); }); - test.each(['application', 'unrecognized-role'])( + test.each(['application', 'unrecognized-role', undefined])( 'verify styling for non-landmark-role %s', role => { const axeData = getAxeData(role, true); diff --git a/tsconfig.strictNullChecks.json b/tsconfig.strictNullChecks.json index 557241fbe5f..fba9d2981c4 100644 --- a/tsconfig.strictNullChecks.json +++ b/tsconfig.strictNullChecks.json @@ -70,7 +70,10 @@ "./src/DetailsView/tab-stops-failed-counter.ts", "./src/DetailsView/tab-stops-requirement-instances-collapsible-content.tsx", "./src/DetailsView/tab-stops-requirement-result.ts", + "./src/assessments/assessment-builder.tsx", "./src/assessments/assessment-default-message-generator.tsx", + "./src/assessments/assessments-provider.ts", + "./src/assessments/assessments-requirements-filter.ts", "./src/assessments/auto-pass-if-no-results.ts", "./src/assessments/automated-checks/automated-checks-visualization-enabled-toggle.tsx", "./src/assessments/automated-checks/build-test-steps-from-rules.tsx", @@ -78,21 +81,13 @@ "./src/assessments/custom-widgets/custom-widgets-column-renderer.tsx", "./src/assessments/custom-widgets/design-pattern.ts", "./src/assessments/custom-widgets/test-steps/test-steps.ts", - "./src/assessments/headings/test-steps/no-missing-headings.tsx", - "./src/assessments/headings/test-steps/test-steps.ts", + "./src/assessments/headings/headings-instance-details-column-renderer.tsx", "./src/assessments/landmarks/does-result-have-main-role.ts", - "./src/assessments/landmarks/test-steps/no-repeating-content.tsx", - "./src/assessments/landmarks/test-steps/primary-content.tsx", - "./src/assessments/landmarks/test-steps/test-steps.ts", - "./src/assessments/links/test-steps/link-function.tsx", - "./src/assessments/links/test-steps/link-purpose.tsx", - "./src/assessments/links/test-steps/test-steps.ts", + "./src/assessments/landmarks/landmarks-instance-details-column-renderer.tsx", "./src/assessments/markup.tsx", "./src/assessments/medium-pass-requirements.ts", + "./src/assessments/page/frametitle-instance-details-column-renderer.tsx", "./src/assessments/page/pagetitle-instance-details-column-renderer.tsx", - "./src/assessments/page/test-steps/general-navigation.tsx", - "./src/assessments/page/test-steps/page-title.tsx", - "./src/assessments/page/test-steps/test-steps.ts", "./src/assessments/types/instance-table-data.ts", "./src/assessments/types/report-instance-field.ts", "./src/assessments/types/requirement.ts", @@ -138,6 +133,7 @@ "./src/background/assessment-data-remover.ts", "./src/background/browser-message-broadcaster-factory.ts", "./src/background/browser-permissions-tracker.ts", + "./src/background/create-initial-assessment-test-data.ts", "./src/background/details-view-controller.ts", "./src/background/dev-tools-monitor.ts", "./src/background/extension-details-view-controller.ts", @@ -554,22 +550,26 @@ "src/ad-hoc-visualizations/**/*", "src/ad-hoc-visualizations/calculated-tab-stops/**/*", "src/assessments/adaptable-content/test-steps/**/*", - "src/assessments/audio-video-only/test-steps/**/*", + "src/assessments/audio-video-only/**/*", "src/assessments/color/test-steps/**/*", "src/assessments/common/**/*", "src/assessments/contrast/test-steps/**/*", - "src/assessments/errors/test-steps/**/*", + "src/assessments/custom-widgets/test-steps/**/*", + "src/assessments/errors/**/*", + "src/assessments/headings/test-steps/**/*", "src/assessments/images/test-steps/**/*", "src/assessments/keyboard-interaction/test-steps/**/*", - "src/assessments/language/common/**/*", - "src/assessments/language/test-steps/**/*", - "src/assessments/live-multimedia/test-steps/**/*", + "src/assessments/landmarks/test-steps/**/*", + "src/assessments/language/**/*", + "src/assessments/links/**/*", + "src/assessments/live-multimedia/**/*", "src/assessments/native-widgets/test-steps/**/*", - "src/assessments/parsing/test-steps/**/*", + "src/assessments/page/test-steps/**/*", + "src/assessments/parsing/**/*", "src/assessments/pointer-motion/test-steps/**/*", - "src/assessments/prerecorded-multimedia/test-steps/**/*", - "src/assessments/repetitive-content/test-steps/**/*", - "src/assessments/semantics/test-steps/**/*", + "src/assessments/prerecorded-multimedia/**/*", + "src/assessments/repetitive-content/**/*", + "src/assessments/semantics/**/*", "src/assessments/sequence/test-steps/**/*", "src/assessments/timed-events/test-steps/**/*", "src/assessments/visible-focus-order/test-steps/**/*",