diff --git a/.prettierignore b/.prettierignore index e9a7aec4642..5d79e8f0f2c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -6,6 +6,7 @@ **/*.gitignore **/*.icns **/*.ico +**/*.mp3 **/*.nsh **/*.png **/*.snap diff --git a/build.yaml b/build.yaml index 4e339f3e968..c90b7b5fb30 100644 --- a/build.yaml +++ b/build.yaml @@ -97,17 +97,23 @@ jobs: displayName: publish drop timeoutInMinutes: 5 - - job: 'e2e_mac_web_unified' + - job: 'e2e_web_mac' pool: vmImage: macOS-10.15 steps: - template: pipeline/install-node-prerequisites.yaml - template: pipeline/e2e-test-from-agent.yaml - template: pipeline/e2e-test-publish-results.yaml + + - job: 'e2e_unified_mac' + pool: + vmImage: macOS-10.15 + steps: + - template: pipeline/install-node-prerequisites.yaml - template: pipeline/unified/unified-e2e-test-interactive.yaml - template: pipeline/unified/unified-e2e-publish-results.yaml - - job: 'e2e_linux_unified' + - job: 'e2e_unified_linux' pool: vmImage: ubuntu-18.04 steps: @@ -115,7 +121,7 @@ jobs: - template: pipeline/unified/unified-e2e-test-linux.yaml - template: pipeline/unified/unified-e2e-publish-results.yaml - - job: 'e2e_windows_unified' + - job: 'e2e_unified_windows' pool: vmImage: windows-2019 steps: diff --git a/package.json b/package.json index 4940915f41a..f40fa5c4a48 100644 --- a/package.json +++ b/package.json @@ -64,12 +64,12 @@ "@types/enzyme": "^3.10.5", "@types/enzyme-adapter-react-16": "^1.0.6", "@types/jest": "^25.2.2", - "@types/jsdom": "^16.2.2", + "@types/jsdom": "^16.2.3", "@types/lodash": "^4.14.151", "@types/make-dir": "^2.1.0", "@types/moment": "^2.13.0", "@types/puppeteer": "^2.1.0", - "@types/q": "^1.5.3", + "@types/q": "^1.5.4", "@types/react": "^16.9.35", "@types/react-copy-to-clipboard": "^4.3.0", "@types/react-dom": "^16.9.8", @@ -80,7 +80,7 @@ "@types/uuid": "^7.0.3", "app-builder-lib": "^22.6.1", "case-sensitive-paths-webpack-plugin": "^2.3.0", - "codecov": "^3.6.5", + "codecov": "^3.7.0", "commander": "^5.1.0", "core-js-bundle": "^3.6.5", "cross-env": "^7.0.2", @@ -113,7 +113,7 @@ "npm-run-all": "^4.1.5", "preprocess": "^3.2.0", "prettier": "^2.0.5", - "puppeteer": "^3.0.4", + "puppeteer": "^3.1.0", "react-devtools": "^4.6.0", "regenerator-runtime": "^0.13.5", "sass-loader": "^8.0.2", @@ -123,7 +123,7 @@ "source-map-loader": "^0.2.4", "spectron": "^10.0.1", "terser-webpack-plugin": "^3.0.1", - "ts-jest": "^25.5.1", + "ts-jest": "^26.0.0", "ts-loader": "^7.0.4", "tslint": "^5.20.1", "tslint-microsoft-contrib": "6.2.0", diff --git a/src/DetailsView/Styles/detailsview.scss b/src/DetailsView/Styles/detailsview.scss index 32fd661cbe3..6a255fe5900 100644 --- a/src/DetailsView/Styles/detailsview.scss +++ b/src/DetailsView/Styles/detailsview.scss @@ -235,7 +235,9 @@ div.insights-file-issue-details-dialog-container { grid-template-rows: 1fr; width: 100%; min-height: 0; - + &.reflow-ui { + grid-template-columns: $detailsViewReflowLeftNavWidth 1fr; + } .details-view-test-nav-area { box-sizing: border-box; max-height: calc( @@ -393,10 +395,14 @@ div.insights-file-issue-details-dialog-container { .dark-gray { color: $neutral-60; } + .is-selected .button-flex-container { + color: $always-black; + } .button-flex-container { padding-left: 5%; padding-right: 8%; width: $detailsViewLeftNavWidth; + color: $primary-text; .status-icon { font-size: 24px; } diff --git a/src/DetailsView/components/assessment-test-view.tsx b/src/DetailsView/components/assessment-test-view.tsx index ae0cb51944e..6b129cf6d8c 100644 --- a/src/DetailsView/components/assessment-test-view.tsx +++ b/src/DetailsView/components/assessment-test-view.tsx @@ -68,12 +68,17 @@ export const AssessmentTestView = NamedFC( return ( ); }; diff --git a/src/DetailsView/components/getting-started-view.scss b/src/DetailsView/components/getting-started-view.scss index 99abd6fe335..31c6baf020c 100644 --- a/src/DetailsView/components/getting-started-view.scss +++ b/src/DetailsView/components/getting-started-view.scss @@ -7,3 +7,19 @@ padding-left: 6px; padding-top: 1vh; } + +.getting-started-header { + @include text-style-title-m; + padding-top: 8px; + i { + font-size: 16px; + } +} + +.getting-started-header-title { + margin-right: 8px; +} + +.getting-started-title { + @include text-style-title-s; +} diff --git a/src/DetailsView/components/getting-started-view.tsx b/src/DetailsView/components/getting-started-view.tsx index f3383403b0e..9c82da23742 100644 --- a/src/DetailsView/components/getting-started-view.tsx +++ b/src/DetailsView/components/getting-started-view.tsx @@ -3,15 +3,26 @@ import { NamedFC } from 'common/react/named-fc'; import * as styles from 'DetailsView/components/getting-started-view.scss'; import * as React from 'react'; +import { ContentLink, ContentLinkDeps } from 'views/content/content-link'; +import { ContentPageComponent } from 'views/content/content-page'; + +export type GettingStartedViewDeps = ContentLinkDeps; export interface GettingStartedViewProps { + deps: GettingStartedViewDeps; gettingStartedContent: JSX.Element; + title: string; + guidance: ContentPageComponent; } export const GettingStartedView = NamedFC('GettingStartedView', props => { return (
-

Getting Started

+

+ {props.title} + +

+

Getting Started

{props.gettingStartedContent}
); diff --git a/src/DetailsView/components/issue-filing-dialog.tsx b/src/DetailsView/components/issue-filing-dialog.tsx index 59cd9c7c3d9..62b31b6a75a 100644 --- a/src/DetailsView/components/issue-filing-dialog.tsx +++ b/src/DetailsView/components/issue-filing-dialog.tsx @@ -4,7 +4,7 @@ import { cloneDeep, isEqual } from 'lodash'; import { Dialog, DialogFooter, DialogType } from 'office-ui-fabric-react'; import * as React from 'react'; -import { EnvironmentInfoProvider } from '../../common/environment-info-provider'; +import { ToolData } from 'common/types/store-data/unified-data-interface'; import { IssueFilingActionMessageCreator } from '../../common/message-creators/issue-filing-action-message-creator'; import { UserConfigMessageCreator } from '../../common/message-creators/user-config-message-creator'; import { CreateIssueDetailsTextData } from '../../common/types/create-issue-details-text-data'; @@ -29,7 +29,7 @@ export interface IssueFilingDialogProps { } export type IssueFilingDialogDeps = { - environmentInfoProvider: EnvironmentInfoProvider; + toolData: ToolData; userConfigMessageCreator: UserConfigMessageCreator; issueFilingServiceProvider: IssueFilingServiceProvider; issueFilingActionMessageCreator: IssueFilingActionMessageCreator; diff --git a/src/DetailsView/components/left-nav/details-view-left-nav.tsx b/src/DetailsView/components/left-nav/details-view-left-nav.tsx index f1a23d339e6..5a7eb3fc049 100644 --- a/src/DetailsView/components/left-nav/details-view-left-nav.tsx +++ b/src/DetailsView/components/left-nav/details-view-left-nav.tsx @@ -7,6 +7,7 @@ import { AssessmentsProvider } from 'assessments/types/assessments-provider'; import { FlaggedComponent } from 'common/components/flagged-component'; import { FeatureFlags } from 'common/feature-flags'; import { DetailsViewPivotType } from 'common/types/details-view-pivot-type'; +import { generateReflowAssessmentTestKey } from 'DetailsView/components/left-nav/left-nav-link-builder'; import { Switcher, SwitcherDeps } from 'DetailsView/components/switcher'; import { leftNavSwitcherStyleNames } from 'DetailsView/components/switcher-style-names'; import { NamedFC } from '../../../common/react/named-fc'; @@ -49,6 +50,12 @@ export const DetailsViewLeftNav = NamedFC('DetailsViewL const selectedKey: string = rightPanelConfiguration.GetLeftNavSelectedKey({ visualizationType: selectedTest, + selectedSubview: assessmentStoreData.assessmentNavState.selectedTestSubview, + featureFlagStoreData, + assessmentsProvider, + deps: { + generateReflowAssessmentTestKey, + }, }); const filteredProvider = assessmentsProviderWithFeaturesEnabled( assessmentsProvider, diff --git a/src/DetailsView/components/left-nav/get-left-nav-selected-key.ts b/src/DetailsView/components/left-nav/get-left-nav-selected-key.ts index 21a084c8caa..b4e63c46d60 100644 --- a/src/DetailsView/components/left-nav/get-left-nav-selected-key.ts +++ b/src/DetailsView/components/left-nav/get-left-nav-selected-key.ts @@ -1,9 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { AssessmentsProvider } from 'assessments/types/assessments-provider'; +import { FeatureFlags } from 'common/feature-flags'; +import { GettingStarted, RequirementName } from 'common/types/store-data/assessment-result-data'; +import { FeatureFlagStoreData } from 'common/types/store-data/feature-flag-store-data'; +import { reflowAssessmentTestKeyGenerator } from 'DetailsView/components/left-nav/left-nav-link-builder'; import { VisualizationType } from '../../../common/types/visualization-type'; +export type GetLeftNavSelectedKeyDeps = { + generateReflowAssessmentTestKey: reflowAssessmentTestKeyGenerator; +}; + export type GetLeftNavSelectedKeyProps = { + deps: GetLeftNavSelectedKeyDeps; visualizationType: VisualizationType; + assessmentsProvider: AssessmentsProvider; + featureFlagStoreData: FeatureFlagStoreData; + selectedSubview: RequirementName | GettingStarted; }; export function getOverviewKey(): string { @@ -11,5 +24,14 @@ export function getOverviewKey(): string { } export function getTestViewKey(props: GetLeftNavSelectedKeyProps): string { - return VisualizationType[props.visualizationType]; + if ( + props.assessmentsProvider.isValidType(props.visualizationType) === false || + props.featureFlagStoreData[FeatureFlags.reflowUI] === false + ) { + return VisualizationType[props.visualizationType]; + } + return props.deps.generateReflowAssessmentTestKey( + props.visualizationType, + props.selectedSubview, + ); } diff --git a/src/DetailsView/components/left-nav/getting-started-nav-link.scss b/src/DetailsView/components/left-nav/getting-started-nav-link.scss index a51c43aed32..1f2d9e0d7d3 100644 --- a/src/DetailsView/components/left-nav/getting-started-nav-link.scss +++ b/src/DetailsView/components/left-nav/getting-started-nav-link.scss @@ -1,5 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +@import '../../../common/styles/common.scss'; .getting-started { padding-left: 5%; + color: $primary-text; +} + +:global(.is-selected) .getting-started { + color: $always-black; } diff --git a/src/DetailsView/components/left-nav/left-nav-icon.tsx b/src/DetailsView/components/left-nav/left-nav-icon.tsx index 10f364a8e10..5b54e6a60a1 100644 --- a/src/DetailsView/components/left-nav/left-nav-icon.tsx +++ b/src/DetailsView/components/left-nav/left-nav-icon.tsx @@ -1,18 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { INavLink } from 'office-ui-fabric-react'; +import { css, INavLink } from 'office-ui-fabric-react'; import * as React from 'react'; import { NamedFC } from '../../../common/react/named-fc'; import { StatusIcon } from '../status-icon'; export type LeftNavIconProps = { item: INavLink; + className?: string; }; export const LeftNavStatusIcon = NamedFC('LeftNavStatusIcon', props => { const { item } = props; + const classes = css('dark-gray', props.className); - return ; + return ; }); export const LeftNavIndexIcon = NamedFC('LeftNavIndexIcon', props => { diff --git a/src/DetailsView/components/left-nav/left-nav-link-builder.scss b/src/DetailsView/components/left-nav/left-nav-link-builder.scss new file mode 100644 index 00000000000..701b1fc1c91 --- /dev/null +++ b/src/DetailsView/components/left-nav/left-nav-link-builder.scss @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +/* +Specificity due to clashes with details-view.scss & avoiding use of !important +*/ +:global(#details-container .details-view-body-nav-content-layout .left-nav .button-flex-container) + .requirement-status-icon { + font-size: 20px; +} diff --git a/src/DetailsView/components/left-nav/left-nav-link-builder.tsx b/src/DetailsView/components/left-nav/left-nav-link-builder.tsx index 558e2e72795..4832030e2b1 100644 --- a/src/DetailsView/components/left-nav/left-nav-link-builder.tsx +++ b/src/DetailsView/components/left-nav/left-nav-link-builder.tsx @@ -13,6 +13,7 @@ import { } from 'DetailsView/components/left-nav/assessment-left-nav'; import { GettingStartedNavLink } from 'DetailsView/components/left-nav/getting-started-nav-link'; import { LeftNavIndexIcon, LeftNavStatusIcon } from 'DetailsView/components/left-nav/left-nav-icon'; +import { requirementStatusIcon } from 'DetailsView/components/left-nav/left-nav-link-builder.scss'; import { NavLinkHandler } from 'DetailsView/components/left-nav/nav-link-handler'; import { map } from 'lodash'; import * as React from 'react'; @@ -46,6 +47,15 @@ export type AssessmentLinkBuilderDeps = { export type VisualizationConfigurationLinkBuilderDeps = {}; +export function generateReflowAssessmentTestKey( + test: VisualizationType, + selectedSubview: string, +): string { + return `${VisualizationType[test]}: ${selectedSubview}`; +} + +export type reflowAssessmentTestKeyGenerator = typeof generateReflowAssessmentTestKey; + export class LeftNavLinkBuilder { public buildOverviewLink( deps: OverviewLinkBuilderDeps, @@ -165,11 +175,11 @@ export class LeftNavLinkBuilder { VisualizationType[assessment.visualizationType], index, l => , - navLinkHandler.onAssessmentTestClick, + () => {}, ); const gettingStartedLink = this.buildGettingStartedLink( - navLinkHandler.onRequirementClick, + navLinkHandler.onGettingStartedClick, assessment, ); @@ -214,7 +224,7 @@ export class LeftNavLinkBuilder { const baselink = this.buildBaseLink( name, - requirement.key, + generateReflowAssessmentTestKey(test, requirement.key), requirementIndex, l => , onClick, @@ -234,11 +244,12 @@ export class LeftNavLinkBuilder { onClick: onTestGettingStartedClick, test: Assessment, ): TestGettingStartedNavLink { + const testType = test.visualizationType; return { - testType: test.visualizationType, + testType, ...this.buildBaseLink( 'Getting Started', - gettingStartedSubview, + generateReflowAssessmentTestKey(testType, gettingStartedSubview), 0, () => , onClick, @@ -251,7 +262,7 @@ export class LeftNavLinkBuilder { return <>{link.displayedIndex}; } - return ; + return ; }; private renderAssessmentTestIcon: onBaseLeftNavItemRender = (link: AssessmentLeftNavLink) => { diff --git a/src/DetailsView/components/reflow-assessment-view.tsx b/src/DetailsView/components/reflow-assessment-view.tsx index 5d08ef3f14a..435f6e462b5 100644 --- a/src/DetailsView/components/reflow-assessment-view.tsx +++ b/src/DetailsView/components/reflow-assessment-view.tsx @@ -1,71 +1,98 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { AssessmentDefaultMessageGenerator } from 'assessments/assessment-default-message-generator'; +import { RequirementResult } from 'common/assessment/requirement'; +import { NamedFC } from 'common/react/named-fc'; +import { FeatureFlagStoreData } from 'common/types/store-data/feature-flag-store-data'; +import { PathSnippetStoreData } from 'common/types/store-data/path-snippet-store-data'; +import { RequirementView, RequirementViewDeps } from 'DetailsView/components/requirement-view'; +import { AssessmentInstanceTableHandler } from 'DetailsView/handlers/assessment-instance-table-handler'; import * as React from 'react'; - -import { - AssessmentViewUpdateHandler, - AssessmentViewUpdateHandlerDeps, - AssessmentViewUpdateHandlerProps, -} from 'DetailsView/components/assessment-view-update-handler'; import { AssessmentTestResult } from '../../common/assessment/assessment-test-result'; import { Tab } from '../../common/itab'; import { AssessmentData, AssessmentNavState, + gettingStartedSubview, PersistedTabInfo, } from '../../common/types/store-data/assessment-result-data'; -import { GettingStartedView } from './getting-started-view'; +import { GettingStartedView, GettingStartedViewDeps } from './getting-started-view'; import { TargetChangeDialog, TargetChangeDialogDeps } from './target-change-dialog'; -export type ReflowAssessmentViewDeps = { - assessmentViewUpdateHandler: AssessmentViewUpdateHandler; -} & AssessmentViewUpdateHandlerDeps & - TargetChangeDialogDeps; +export type ReflowAssessmentViewDeps = TargetChangeDialogDeps & + GettingStartedViewDeps & + RequirementViewDeps; export type ReflowAssessmentViewProps = { deps: ReflowAssessmentViewDeps; - assessmentNavState: AssessmentNavState; - assessmentData: AssessmentData; currentTarget: Tab; prevTarget: PersistedTabInfo; + scanningInProgress: boolean; + selectedRequirementIsEnabled: boolean; + assessmentNavState: AssessmentNavState; + assessmentData: AssessmentData; + assessmentDefaultMessageGenerator: AssessmentDefaultMessageGenerator; assessmentTestResult: AssessmentTestResult; -} & AssessmentViewUpdateHandlerProps; + assessmentInstanceTableHandler: AssessmentInstanceTableHandler; + featureFlagStoreData: FeatureFlagStoreData; + pathSnippetStoreData: PathSnippetStoreData; +}; -export class ReflowAssessmentView extends React.Component { - public render(): JSX.Element { - const { assessmentTestResult } = this.props; - if (this.props.assessmentNavState.selectedTestSubview === 'getting-started') { +export const ReflowAssessmentView = NamedFC( + 'ReflowAssessmentView', + props => { + const renderGettingStartedView = () => { return ( -
- {this.renderTargetChangeDialog()} - -
+ ); - } - return null; - } + }; - public componentDidMount(): void { - this.props.deps.assessmentViewUpdateHandler.onMount(this.props); - } + const renderRequirementView = () => { + const selectedRequirement: RequirementResult = props.assessmentTestResult.getRequirementResult( + props.assessmentNavState.selectedTestSubview, + ); - public componentDidUpdate(prevProps: ReflowAssessmentViewProps): void { - this.props.deps.assessmentViewUpdateHandler.update(prevProps, this.props); - } + return ( + + ); + }; - public componentWillUnmount(): void { - this.props.deps.assessmentViewUpdateHandler.onUnmount(this.props); - } + const mainContent: JSX.Element = + props.assessmentNavState.selectedTestSubview === gettingStartedSubview + ? renderGettingStartedView() + : renderRequirementView(); - private renderTargetChangeDialog(): JSX.Element { return ( - +
+ + {mainContent} +
); - } -} + }, +); diff --git a/src/DetailsView/components/requirement-view.scss b/src/DetailsView/components/requirement-view.scss index 60b13c92b13..0a4a92541d9 100644 --- a/src/DetailsView/components/requirement-view.scss +++ b/src/DetailsView/components/requirement-view.scss @@ -6,6 +6,10 @@ margin: 0px 18px; padding-left: 6px; padding-top: 1vh; + + .main-content { + margin-top: 10px; + } } :global(.visual-helper) { diff --git a/src/DetailsView/components/requirement-view.tsx b/src/DetailsView/components/requirement-view.tsx index 077684baa98..863450b0c8e 100644 --- a/src/DetailsView/components/requirement-view.tsx +++ b/src/DetailsView/components/requirement-view.tsx @@ -1,25 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { AssessmentDefaultMessageGenerator } from 'assessments/assessment-default-message-generator'; import { AssessmentsProvider } from 'assessments/types/assessments-provider'; import { Requirement, VisualHelperToggleConfig } from 'assessments/types/requirement'; -import { NamedFC } from 'common/react/named-fc'; +import { Tab } from 'common/itab'; import { + AssessmentData, AssessmentNavState, GeneratedAssessmentInstance, + ManualTestStepResult, + PersistedTabInfo, } from 'common/types/store-data/assessment-result-data'; +import { FeatureFlagStoreData } from 'common/types/store-data/feature-flag-store-data'; +import { PathSnippetStoreData } from 'common/types/store-data/path-snippet-store-data'; import { DetailsViewActionMessageCreator } from 'DetailsView/actions/details-view-action-message-creator'; +import { + AssessmentViewUpdateHandler, + AssessmentViewUpdateHandlerDeps, + AssessmentViewUpdateHandlerProps, +} from 'DetailsView/components/assessment-view-update-handler'; +import { RequirementTableSection } from 'DetailsView/components/left-nav/requirement-table-section'; import { RequirementInstructions } from 'DetailsView/components/requirement-instructions'; import { RequirementViewTitle, RequirementViewTitleDeps, } from 'DetailsView/components/requirement-view-title'; +import { AssessmentInstanceTableHandler } from 'DetailsView/handlers/assessment-instance-table-handler'; import * as React from 'react'; import { DictionaryStringTo } from 'types/common-types'; import * as styles from './requirement-view.scss'; export type RequirementViewDeps = { detailsViewActionMessageCreator: DetailsViewActionMessageCreator; -} & RequirementViewTitleDeps; + assessmentViewUpdateHandler: AssessmentViewUpdateHandler; +} & RequirementViewTitleDeps & + AssessmentViewUpdateHandlerDeps; export interface RequirementViewProps { deps: RequirementViewDeps; @@ -27,39 +42,97 @@ export interface RequirementViewProps { assessmentsProvider: AssessmentsProvider; assessmentNavState: AssessmentNavState; instancesMap: DictionaryStringTo; - isStepEnabled: boolean; - isStepScanned: boolean; + isRequirementEnabled: boolean; + isRequirementScanned: boolean; + assessmentInstanceTableHandler: AssessmentInstanceTableHandler; + featureFlagStoreData: FeatureFlagStoreData; + pathSnippetStoreData: PathSnippetStoreData; + scanningInProgress: boolean; + manualRequirementResultMap: DictionaryStringTo; + assessmentDefaultMessageGenerator: AssessmentDefaultMessageGenerator; + assessmentData: AssessmentData; + currentTarget: Tab; + prevTarget: PersistedTabInfo; } -export const RequirementView = NamedFC('RequirementView', props => { - const requirement: Readonly = props.assessmentsProvider.getStep( - props.assessmentNavState.selectedTestType, - props.assessmentNavState.selectedTestSubview, - ); +export class RequirementView extends React.Component { + public componentDidMount(): void { + this.props.deps.assessmentViewUpdateHandler.onMount(this.getUpdateHandlerProps(this.props)); + } + + public componentDidUpdate(prevProps: RequirementViewProps): void { + this.props.deps.assessmentViewUpdateHandler.update( + this.getUpdateHandlerProps(prevProps), + this.getUpdateHandlerProps(this.props), + ); + } + + public componentWillUnmount(): void { + this.props.deps.assessmentViewUpdateHandler.onUnmount( + this.getUpdateHandlerProps(this.props), + ); + } - const visualHelperToggleConfig: VisualHelperToggleConfig = { - deps: props.deps, - assessmentNavState: props.assessmentNavState, - instancesMap: props.instancesMap, - isStepEnabled: props.isStepEnabled, - isStepScanned: props.isStepScanned, - }; + private getUpdateHandlerProps(props: RequirementViewProps): AssessmentViewUpdateHandlerProps { + return { + deps: props.deps, + selectedRequirementIsEnabled: props.isRequirementEnabled, + assessmentNavState: props.assessmentNavState, + assessmentData: props.assessmentData, + prevTarget: props.prevTarget, + currentTarget: props.currentTarget, + }; + } - const visualHelperToggle = requirement.getVisualHelperToggle - ? requirement.getVisualHelperToggle(visualHelperToggleConfig) - : null; + public render(): JSX.Element { + const requirement: Readonly = this.props.assessmentsProvider.getStep( + this.props.assessmentNavState.selectedTestType, + this.props.assessmentNavState.selectedTestSubview, + ); + const requirementHasVisualHelper = !!requirement.getVisualHelperToggle; - return ( -
- - {props.requirement.description} - {visualHelperToggle} - -
- ); -}); + const visualHelperToggleConfig: VisualHelperToggleConfig = { + deps: this.props.deps, + assessmentNavState: this.props.assessmentNavState, + instancesMap: this.props.instancesMap, + isStepEnabled: this.props.isRequirementEnabled, + isStepScanned: this.props.isRequirementScanned, + }; + + const visualHelperToggle = requirementHasVisualHelper + ? requirement.getVisualHelperToggle(visualHelperToggleConfig) + : null; + + return ( +
+ +
+ {this.props.requirement.description} + {visualHelperToggle} + + +
+
+ ); + } +} diff --git a/src/DetailsView/details-view-body.tsx b/src/DetailsView/details-view-body.tsx index 366c92789bf..25015aaf7d1 100644 --- a/src/DetailsView/details-view-body.tsx +++ b/src/DetailsView/details-view-body.tsx @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { AssessmentsProvider } from 'assessments/types/assessments-provider'; +import * as classNames from 'classnames'; +import { FeatureFlags } from 'common/feature-flags'; import { ScanIncompleteWarningId } from 'common/types/scan-incomplete-warnings'; import { CardsViewModel } from 'common/types/store-data/card-view-model'; +import { ScanMetadata } from 'common/types/store-data/unified-data-interface'; import { DetailsViewCommandBarProps } from 'DetailsView/components/details-view-command-bar'; import { ISelection } from 'office-ui-fabric-react'; import * as React from 'react'; -import { ScanMetadata } from 'common/types/store-data/unified-data-interface'; import { VisualizationConfigurationFactory } from '../common/configs/visualization-configuration-factory'; import { DropdownClickHandler } from '../common/dropdown-click-handler'; import { AssessmentStoreData } from '../common/types/store-data/assessment-result-data'; @@ -65,10 +67,16 @@ export interface DetailsViewBodyProps { export class DetailsViewBody extends React.Component { public render(): JSX.Element { + const bodyLayoutClassname = classNames({ + 'details-view-body-nav-content-layout': true, + + 'reflow-ui': this.props.featureFlagStoreData[FeatureFlags.reflowUI], + }); + return (
{this.renderCommandBar()} -
+
{this.renderNavBar()}
{this.getTargetPageHiddenBar()} diff --git a/src/DetailsView/details-view-initializer.ts b/src/DetailsView/details-view-initializer.ts index 48fdea721f1..beaaf4b4bb9 100644 --- a/src/DetailsView/details-view-initializer.ts +++ b/src/DetailsView/details-view-initializer.ts @@ -57,7 +57,6 @@ import { VisualizationConfigurationFactory } from '../common/configs/visualizati import { DateProvider } from '../common/date-provider'; import { DocumentManipulator } from '../common/document-manipulator'; import { DropdownClickHandler } from '../common/dropdown-click-handler'; -import { EnvironmentInfoProvider } from '../common/environment-info-provider'; import { TelemetryEventSource } from '../common/extension-telemetry-events'; import { initializeFabricIcons } from '../common/fabric-icons'; import { getAllFeatureFlagDetails } from '../common/feature-flags'; @@ -290,12 +289,6 @@ if (isNaN(tabId) === false) { const axeVersion = getVersion(); const browserSpec = navigatorUtils.getBrowserSpec(); - const environmentInfoProvider = new EnvironmentInfoProvider( - browserAdapter.getVersion(), - browserSpec, - AxeInfo.Default.version, - ); - const toolData = createToolData( toolName, browserAdapter.getVersion(), @@ -420,7 +413,7 @@ if (isNaN(tabId) === false) { getCurrentDate: DateProvider.getCurrentDate, settingsProvider: ExtensionSettingsProvider, LinkComponent: NewTabLink, - environmentInfoProvider, + toolData, issueFilingServiceProvider: IssueFilingServiceProviderImpl, getGuidanceTagsFromGuidanceLinks: GetGuidanceTagsFromGuidanceLinks, reportGenerator, diff --git a/src/assessments/auto-pass-if-no-results.ts b/src/assessments/auto-pass-if-no-results.ts new file mode 100644 index 00000000000..7efdd94cbfd --- /dev/null +++ b/src/assessments/auto-pass-if-no-results.ts @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { ManualTestStatus } from 'common/types/manual-test-status'; +import { InstanceIdToInstanceDataMap } from 'common/types/store-data/assessment-result-data'; +import { isEmpty } from 'lodash'; + +export function autoPassIfNoResults(instanceData: InstanceIdToInstanceDataMap): ManualTestStatus { + return isEmpty(instanceData) ? ManualTestStatus.PASS : ManualTestStatus.UNKNOWN; +} diff --git a/src/assessments/landmarks/auto-pass-if-no-landmarks.ts b/src/assessments/landmarks/auto-pass-if-no-landmarks.ts deleted file mode 100644 index 4a2d28673a8..00000000000 --- a/src/assessments/landmarks/auto-pass-if-no-landmarks.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -import { ManualTestStatus } from 'common/types/manual-test-status'; -import { InstanceIdToInstanceDataMap } from 'common/types/store-data/assessment-result-data'; -import { some } from 'lodash'; - -export function autoPassIfNoLandmarks(instanceData: InstanceIdToInstanceDataMap): ManualTestStatus { - const someInstanceHasLandmarkRole = some( - Object.values(instanceData), - instance => instance.propertyBag != null && instance.propertyBag['role'] != null, - ); - - return someInstanceHasLandmarkRole ? ManualTestStatus.UNKNOWN : ManualTestStatus.PASS; -} diff --git a/src/assessments/landmarks/test-steps/no-repeating-content.tsx b/src/assessments/landmarks/test-steps/no-repeating-content.tsx index f10f2c03485..3bf84ac6e2d 100644 --- a/src/assessments/landmarks/test-steps/no-repeating-content.tsx +++ b/src/assessments/landmarks/test-steps/no-repeating-content.tsx @@ -7,11 +7,11 @@ import { VisualizationType } from 'common/types/visualization-type'; import { link } from 'content/link'; import * as content from 'content/test/landmarks/no-repeating-content'; import { AssessmentVisualizationEnabledToggle } from 'DetailsView/components/assessment-visualization-enabled-toggle'; +import { autoPassIfNoResults } from '../../auto-pass-if-no-results'; import { AnalyzerConfigurationFactory } from '../../common/analyzer-configuration-factory'; import { ManualTestRecordYourResults } from '../../common/manual-test-record-your-results'; import * as Markup from '../../markup'; import { Requirement } from '../../types/requirement'; -import { autoPassIfNoLandmarks } from '../auto-pass-if-no-landmarks'; import { LandmarkTestStep } from './test-steps'; const description: JSX.Element = ( @@ -66,7 +66,7 @@ export const NoRepeatingContent: Requirement = { description, howToTest, isManual: true, - getInitialManualTestStatus: autoPassIfNoLandmarks, + getInitialManualTestStatus: autoPassIfNoResults, isVisualizationSupportedForResult: doesResultHaveMainRole, guidanceLinks: [link.WCAG_1_3_1, link.WCAG_2_4_1], getAnalyzer: provider => diff --git a/src/assessments/landmarks/test-steps/primary-content.tsx b/src/assessments/landmarks/test-steps/primary-content.tsx index f76a938feac..d71f363e7c3 100644 --- a/src/assessments/landmarks/test-steps/primary-content.tsx +++ b/src/assessments/landmarks/test-steps/primary-content.tsx @@ -7,11 +7,11 @@ import { VisualizationType } from 'common/types/visualization-type'; import { link } from 'content/link'; import * as content from 'content/test/landmarks/primary-content'; import { AssessmentVisualizationEnabledToggle } from 'DetailsView/components/assessment-visualization-enabled-toggle'; +import { autoPassIfNoResults } from '../../auto-pass-if-no-results'; import { AnalyzerConfigurationFactory } from '../../common/analyzer-configuration-factory'; import { ManualTestRecordYourResults } from '../../common/manual-test-record-your-results'; import * as Markup from '../../markup'; import { Requirement } from '../../types/requirement'; -import { autoPassIfNoLandmarks } from '../auto-pass-if-no-landmarks'; import { LandmarkTestStep } from './test-steps'; const description: JSX.Element = ( @@ -65,7 +65,7 @@ export const PrimaryContent: Requirement = { description, howToTest, isManual: true, - getInitialManualTestStatus: autoPassIfNoLandmarks, + getInitialManualTestStatus: autoPassIfNoResults, isVisualizationSupportedForResult: doesResultHaveMainRole, guidanceLinks: [link.WCAG_1_3_1, link.WCAG_2_4_1], getAnalyzer: provider => diff --git a/src/assessments/semantics/test-steps/css-content.tsx b/src/assessments/semantics/test-steps/css-content.tsx index 22bf2ea54b1..14d3535c21b 100644 --- a/src/assessments/semantics/test-steps/css-content.tsx +++ b/src/assessments/semantics/test-steps/css-content.tsx @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { autoPassIfNoResults } from 'assessments/auto-pass-if-no-results'; import { NewTabLink } from 'common/components/new-tab-link'; import { VisualizationType } from 'common/types/visualization-type'; import { link } from 'content/link'; +import { TestAutomaticallyPassedNotice } from 'content/test/common/test-automatically-passed-notice'; import * as content from 'content/test/semantics/css-content'; import { AssessmentVisualizationEnabledToggle } from 'DetailsView/components/assessment-visualization-enabled-toggle'; import * as React from 'react'; @@ -17,6 +19,9 @@ const cssContentHowToTest: JSX.Element = (

The visual helper for this requirement highlights content inserted in the page using CSS{' '} :before or :after. +

+ +

This procedure uses the{' '} Web Developer @@ -101,6 +106,7 @@ export const CssContent: Requirement = { description: cssContentDescription, howToTest: cssContentHowToTest, isManual: true, + getInitialManualTestStatus: autoPassIfNoResults, guidanceLinks: [link.WCAG_1_3_1], ...content, getAnalyzer: provider => diff --git a/src/assessments/sequence/test-steps/css-positioning.tsx b/src/assessments/sequence/test-steps/css-positioning.tsx index 543d992f83a..f9fa00f9b25 100644 --- a/src/assessments/sequence/test-steps/css-positioning.tsx +++ b/src/assessments/sequence/test-steps/css-positioning.tsx @@ -1,8 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { autoPassIfNoResults } from 'assessments/auto-pass-if-no-results'; import { NewTabLink } from 'common/components/new-tab-link'; import { VisualizationType } from 'common/types/visualization-type'; import { link } from 'content/link'; +import { TestAutomaticallyPassedNotice } from 'content/test/common/test-automatically-passed-notice'; import * as content from 'content/test/sequence/css-positioning'; import { AssessmentVisualizationEnabledToggle } from 'DetailsView/components/assessment-visualization-enabled-toggle'; import * as React from 'react'; @@ -26,6 +28,7 @@ const howToTest: JSX.Element = ( CSS position:absolute or{' '} float:right.

+

This procedure also uses the{' '} @@ -69,6 +72,7 @@ export const CssPositioning: Requirement = { description: description, howToTest: howToTest, isManual: true, + getInitialManualTestStatus: autoPassIfNoResults, ...content, guidanceLinks: [link.WCAG_1_3_2], getAnalyzer: provider => diff --git a/src/background/actions/assessment-action-creator.ts b/src/background/actions/assessment-action-creator.ts index ce8eee02ab0..5b2e7223114 100644 --- a/src/background/actions/assessment-action-creator.ts +++ b/src/background/actions/assessment-action-creator.ts @@ -3,6 +3,7 @@ import * as TelemetryEvents from 'common/extension-telemetry-events'; import { getStoreStateMessage, Messages } from 'common/messages'; import { StoreNames } from 'common/stores/store-names'; +import { gettingStartedSubview } from 'common/types/store-data/assessment-result-data'; import { ScanBasePayload, ScanCompletedPayload, @@ -236,7 +237,7 @@ export class AssessmentActionCreator { private onSelectGettingStarted = (payload: SelectGettingStartedPayload): void => { this.assessmentActions.selectTestSubview.invoke({ - selectedTestSubview: 'getting-started', + selectedTestSubview: gettingStartedSubview, ...payload, }); this.telemetryEventHandler.publishTelemetry( diff --git a/src/background/background-init.ts b/src/background/background-init.ts index 152099ebe9c..d16e063b613 100644 --- a/src/background/background-init.ts +++ b/src/background/background-init.ts @@ -9,7 +9,6 @@ import { AxeInfo } from '../common/axe-info'; import { ChromeAdapter } from '../common/browser-adapters/chrome-adapter'; import { VisualizationConfigurationFactory } from '../common/configs/visualization-configuration-factory'; import { DateProvider } from '../common/date-provider'; -import { EnvironmentInfoProvider } from '../common/environment-info-provider'; import { getIndexedDBStore } from '../common/indexedDB/get-indexeddb-store'; import { IndexedDBAPI, IndexedDBUtil } from '../common/indexedDB/indexedDB'; import { InsightsWindowExtensions } from '../common/insights-window-extensions'; @@ -104,11 +103,6 @@ async function initialize(): Promise { const telemetryEventHandler = new TelemetryEventHandler(telemetryClient); const browserSpec = new NavigatorUtils(window.navigator, logger).getBrowserSpec(); - const environmentInfoProvider = new EnvironmentInfoProvider( - browserAdapter.getVersion(), - browserSpec, - AxeInfo.Default.version, - ); const toolData = createToolData( toolName, @@ -127,7 +121,6 @@ async function initialize(): Promise { indexedDBInstance, persistedData, IssueFilingServiceProviderImpl, - environmentInfoProvider.getEnvironmentInfo(), toolData, browserAdapter, browserAdapter, diff --git a/src/background/global-context-factory.ts b/src/background/global-context-factory.ts index 7182e2ba490..f20b0b492cd 100644 --- a/src/background/global-context-factory.ts +++ b/src/background/global-context-factory.ts @@ -8,7 +8,6 @@ import { DebugToolsController } from 'debug-tools/controllers/debug-tools-contro import { BrowserAdapter } from '../common/browser-adapters/browser-adapter'; import { CommandsAdapter } from '../common/browser-adapters/commands-adapter'; import { StorageAdapter } from '../common/browser-adapters/storage-adapter'; -import { EnvironmentInfo } from '../common/environment-info-provider'; import { IndexedDBAPI } from '../common/indexedDB/indexedDB'; import { StateDispatcher } from '../common/state-dispatcher'; import { TelemetryDataFactory } from '../common/telemetry-data-factory'; @@ -45,7 +44,6 @@ export class GlobalContextFactory { indexedDBInstance: IndexedDBAPI, persistedData: PersistedData, issueFilingServiceProvider: IssueFilingServiceProvider, - environmentInfo: EnvironmentInfo, toolData: ToolData, storageAdapter: StorageAdapter, commandsAdapter: CommandsAdapter, diff --git a/src/background/stores/assessment-store.ts b/src/background/stores/assessment-store.ts index a2a5e4108d8..35c836a6523 100644 --- a/src/background/stores/assessment-store.ts +++ b/src/background/stores/assessment-store.ts @@ -21,7 +21,7 @@ import { ScanCompletedPayload, ScanUpdatePayload, } from 'injected/analyzers/analyzer'; -import { forEach, isEmpty } from 'lodash'; +import { forEach, isEmpty, pickBy } from 'lodash'; import { DictionaryStringTo } from 'types/common-types'; import { AddResultDescriptionPayload, SelectTestSubviewPayload } from '../actions/action-payloads'; import { AssessmentDataConverter } from '../assessment-data-converter'; @@ -460,8 +460,13 @@ export class AssessmentStore extends BaseStoreImpl { return; // Never override an explicitly set status } - const instanceMap = assessmentData.generatedAssessmentInstancesMap; - const status = getInitialManualTestStatus(instanceMap); + const allInstances = assessmentData.generatedAssessmentInstancesMap; + const instancesWithResultsForTestStep = pickBy( + allInstances, + (value, key) => value.testStepResults[testStepName] != null, + ); + + const status = getInitialManualTestStatus(instancesWithResultsForTestStep); assessmentData.manualTestStepResultMap[testStepName].status = status; this.updateManualTestStepStatus(assessmentData, testStepName, testType); } diff --git a/src/common/components/issue-filing-button.tsx b/src/common/components/issue-filing-button.tsx index 10cc653a739..2f244d96565 100644 --- a/src/common/components/issue-filing-button.tsx +++ b/src/common/components/issue-filing-button.tsx @@ -3,10 +3,10 @@ import { DefaultButton } from 'office-ui-fabric-react'; import * as React from 'react'; +import { ToolData } from 'common/types/store-data/unified-data-interface'; import { IssueFilingDialogDeps } from '../../DetailsView/components/issue-filing-dialog'; import { IssueFilingServiceProvider } from '../../issue-filing/issue-filing-service-provider'; import { IssueFilingService } from '../../issue-filing/types/issue-filing-service'; -import { EnvironmentInfoProvider } from '../environment-info-provider'; import { LadyBugSolidIcon } from '../icons/lady-bug-solid-icon'; import { IssueFilingActionMessageCreator } from '../message-creators/issue-filing-action-message-creator'; import { CreateIssueDetailsTextData } from '../types/create-issue-details-text-data'; @@ -21,7 +21,7 @@ import { export type IssueFilingButtonDeps = { issueFilingActionMessageCreator: IssueFilingActionMessageCreator; - environmentInfoProvider: EnvironmentInfoProvider; + toolData: ToolData; issueFilingServiceProvider: IssueFilingServiceProvider; } & IssueFilingDialogDeps; diff --git a/src/common/environment-info-provider.ts b/src/common/environment-info-provider.ts deleted file mode 100644 index c8c92ce3cd6..00000000000 --- a/src/common/environment-info-provider.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -import { toolName } from '../content/strings/application'; -import { ToolData } from './types/store-data/unified-data-interface'; - -export type EnvironmentInfo = { - extensionVersion: string; - browserSpec: string; - axeCoreVersion: string; -}; - -export class EnvironmentInfoProvider { - constructor( - private extensionVersion: string, - private browserSpec: string, - private axeVersion: string, - ) {} - public getEnvironmentInfo(): EnvironmentInfo { - return { - extensionVersion: this.extensionVersion, - browserSpec: this.browserSpec, - axeCoreVersion: this.axeVersion, - }; - } - - public getToolData(): ToolData { - return { - scanEngineProperties: { - name: 'axe-core', - version: this.axeVersion, - }, - applicationProperties: { - name: toolName, - version: this.extensionVersion, - environmentName: this.browserSpec, - }, - }; - } -} diff --git a/src/common/styles/common.scss b/src/common/styles/common.scss index b7430ceba1b..644953feda7 100644 --- a/src/common/styles/common.scss +++ b/src/common/styles/common.scss @@ -27,6 +27,7 @@ $detailsViewNavPivotsHeight: 41px !default; $detailsViewCommandBarHeight: 40px !default; $detailsViewCommandBarBorderHeight: 1px !default; $detailsViewLeftNavWidth: 200px !default; +$detailsViewReflowLeftNavWidth: 250px !default; $detailsViewTotalHeaderHeight: ( #{$detailsViewCommandBarBorderHeight} + #{$detailsViewCommandBarHeight} + #{$detailsViewHeaderBarHeight} ); diff --git a/src/electron/platform/android/rule-information-provider.ts b/src/electron/platform/android/rule-information-provider.ts index 2838a19ccbc..067c7237c73 100644 --- a/src/electron/platform/android/rule-information-provider.ts +++ b/src/electron/platform/android/rule-information-provider.ts @@ -24,7 +24,7 @@ export class RuleInformationProvider { 'TouchSizeWcag', `${this.ruleLinkBaseUrl}/touch-size-wcag/`, 'Touch inputs must have a sufficient target size.', - [link.WCAG_1_3_1, link.WCAG_3_3_2], + [link.WCAG_2_5_5], this.getTouchSizeUnifiedFormattableResolution, this.includeAllResults, ), @@ -32,7 +32,7 @@ export class RuleInformationProvider { 'ActiveViewName', `${this.ruleLinkBaseUrl}/active-view-name/`, "Active views must have a name that's available to assistive technologies.", - [link.WCAG_2_5_5], + [link.WCAG_1_3_1, link.WCAG_3_3_2], () => this.buildUnifiedFormattableResolution( 'The view is active but has no name available to assistive technologies. Provide a name for the view using its contentDescription, hint, labelFor, or text attribute (depending on the view type)', diff --git a/src/electron/views/renderer-initializer.ts b/src/electron/views/renderer-initializer.ts index 38b7ffbd0c1..1121d2dfe1b 100644 --- a/src/electron/views/renderer-initializer.ts +++ b/src/electron/views/renderer-initializer.ts @@ -355,7 +355,7 @@ getPersistedData(indexedDBInstance, indexedDBDataKeysToFetch).then( detailsViewActionMessageCreator, issueFilingActionMessageCreator: null, // we don't support issue filing right now - environmentInfoProvider: null, + toolData: null, getPropertyConfigById: getPropertyConfiguration, // this seems to be axe-core specific issueDetailsTextGenerator: null, diff --git a/src/injected/analyzers/unified-result-sender.ts b/src/injected/analyzers/unified-result-sender.ts index cbe5caf2cd6..1832960dda9 100644 --- a/src/injected/analyzers/unified-result-sender.ts +++ b/src/injected/analyzers/unified-result-sender.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { ScanIncompleteWarningsTelemetryData } from 'common/extension-telemetry-events'; +import { ToolData } from 'common/types/store-data/unified-data-interface'; import { ScanIncompleteWarningDetector } from 'injected/scan-incomplete-warning-detector'; import { isEmpty } from 'lodash'; import { UnifiedScanCompletedPayload } from '../../background/actions/action-payloads'; -import { EnvironmentInfoProvider } from '../../common/environment-info-provider'; import { Messages } from '../../common/messages'; import { UUIDGenerator } from '../../common/uid-generator'; import { ConvertScanResultsToUnifiedResultsDelegate } from '../adapters/scan-results-to-unified-results'; @@ -17,7 +17,7 @@ export class UnifiedResultSender { private readonly sendMessage: MessageDelegate, private readonly convertScanResultsToUnifiedResults: ConvertScanResultsToUnifiedResultsDelegate, private readonly convertScanResultsToUnifiedRules: ConvertScanResultsToUnifiedRulesDelegate, - private readonly environmentInfoProvider: EnvironmentInfoProvider, + private readonly toolData: ToolData, private readonly generateUID: UUIDGenerator, private readonly scanIncompleteWarningDetector: ScanIncompleteWarningDetector, ) {} @@ -39,7 +39,7 @@ export class UnifiedResultSender { this.generateUID, ), rules: this.convertScanResultsToUnifiedRules(axeResults.originalResult), - toolInfo: this.environmentInfoProvider.getToolData(), + toolInfo: this.toolData, timestamp: axeResults.originalResult.timestamp, targetAppInfo: { name: axeResults.originalResult.targetPageTitle, diff --git a/src/injected/dialog-renderer.tsx b/src/injected/dialog-renderer.tsx index 5464ef5ece7..49d1a2a0de7 100644 --- a/src/injected/dialog-renderer.tsx +++ b/src/injected/dialog-renderer.tsx @@ -103,7 +103,7 @@ export class DialogRenderer { issueFilingActionMessageCreator: mainWindowContext.getIssueFilingActionMessageCreator(), browserAdapter: this.browserAdapter, getRTL: this.getRTLFunc, - environmentInfoProvider: mainWindowContext.getEnvironmentInfoProvider(), + toolData: mainWindowContext.getToolData(), issueFilingServiceProvider: mainWindowContext.getIssueFilingServiceProvider(), userConfigMessageCreator: mainWindowContext.getUserConfigMessageCreator(), LinkComponent: NewTabLink, diff --git a/src/injected/main-window-context.ts b/src/injected/main-window-context.ts index 01f95df0950..c00c35741eb 100644 --- a/src/injected/main-window-context.ts +++ b/src/injected/main-window-context.ts @@ -6,7 +6,6 @@ import { DevToolActionMessageCreator } from '../common/message-creators/dev-tool import { IssueFilingActionMessageCreator } from '../common/message-creators/issue-filing-action-message-creator'; import { DevToolStoreData } from '../common/types/store-data/dev-tool-store-data'; import { UserConfigurationStoreData } from '../common/types/store-data/user-configuration-store'; -import { EnvironmentInfoProvider } from './../common/environment-info-provider'; import { UserConfigMessageCreator } from './../common/message-creators/user-config-message-creator'; import { IssueFilingServiceProvider } from './../issue-filing/issue-filing-service-provider'; import { TargetPageActionMessageCreator } from './target-page-action-message-creator'; @@ -19,7 +18,6 @@ export class MainWindowContext { private targetPageActionMessageCreator: TargetPageActionMessageCreator, private issueFilingActionMessageCreator: IssueFilingActionMessageCreator, private userConfigMessageCreator: UserConfigMessageCreator, - private environmentInfoProvider: EnvironmentInfoProvider, private toolData: ToolData, private issueFilingServiceProvider: IssueFilingServiceProvider, ) {} @@ -48,10 +46,6 @@ export class MainWindowContext { return this.userConfigMessageCreator; } - public getEnvironmentInfoProvider(): EnvironmentInfoProvider { - return this.environmentInfoProvider; - } - public getToolData(): ToolData { return this.toolData; } @@ -67,7 +61,6 @@ export class MainWindowContext { targetPageActionMessageCreator: TargetPageActionMessageCreator, issueFilingActionMessageCreator: IssueFilingActionMessageCreator, userConfigMessageCreator: UserConfigMessageCreator, - environmentInfoProvider: EnvironmentInfoProvider, toolData: ToolData, issueFilingServiceProvider: IssueFilingServiceProvider, ): void { @@ -78,7 +71,6 @@ export class MainWindowContext { targetPageActionMessageCreator, issueFilingActionMessageCreator, userConfigMessageCreator, - environmentInfoProvider, toolData, issueFilingServiceProvider, ); diff --git a/src/injected/main-window-initializer.ts b/src/injected/main-window-initializer.ts index d32d79aa085..6b4b9868d84 100644 --- a/src/injected/main-window-initializer.ts +++ b/src/injected/main-window-initializer.ts @@ -26,7 +26,6 @@ import { toolName } from 'content/strings/application'; import { AxeInfo } from '../common/axe-info'; import { InspectConfigurationFactory } from '../common/configs/inspect-configuration-factory'; import { DateProvider } from '../common/date-provider'; -import { EnvironmentInfoProvider } from '../common/environment-info-provider'; import { TelemetryEventSource } from '../common/extension-telemetry-events'; import { HTMLElementUtils } from '../common/html-element-utils'; import { DevToolActionMessageCreator } from '../common/message-creators/dev-tool-action-message-creator'; @@ -201,12 +200,6 @@ export class MainWindowInitializer extends WindowInitializer { const browserSpec = new NavigatorUtils(window.navigator, logger).getBrowserSpec(); - const environmentInfoProvider = new EnvironmentInfoProvider( - this.appDataAdapter.getVersion(), - browserSpec, - AxeInfo.Default.version, - ); - const toolData = createToolData( toolName, this.appDataAdapter.getVersion(), @@ -222,7 +215,6 @@ export class MainWindowInitializer extends WindowInitializer { targetPageActionMessageCreator, issueFilingActionMessageCreator, userConfigMessageCreator, - environmentInfoProvider, toolData, IssueFilingServiceProviderImpl, ); @@ -300,7 +292,7 @@ export class MainWindowInitializer extends WindowInitializer { this.browserAdapter.sendMessageToFrames, convertScanResultsToUnifiedResults, convertScanResultsToUnifiedRules, - environmentInfoProvider, + toolData, generateUID, scanIncompleteWarningDetector, ); diff --git a/src/reports/package/footer-text-for-service.tsx b/src/reports/package/footer-text-for-service.tsx index 1691bb2ad3b..0ff2daa3789 100644 --- a/src/reports/package/footer-text-for-service.tsx +++ b/src/reports/package/footer-text-for-service.tsx @@ -6,18 +6,14 @@ import { NamedFC } from 'common/react/named-fc'; import { FooterTextProps } from 'reports/components/report-sections/footer-text-props'; import { ToolLink } from 'reports/components/report-sections/tool-link'; -export const FooterTextForService = (serviceName: string) => { - const footerTextForService = NamedFC('FooterTextForService', ({ scanMetadata }) => { - const toolData = scanMetadata.toolData; - return ( - <> - This automated checks result was generated using the {serviceName}{' '} +export const FooterTextForService = NamedFC('FooterTextForService', ({ scanMetadata }) => { + const toolData = scanMetadata.toolData; + return ( + <> + This automated checks result was generated using the {toolData.applicationProperties.name}{' '} that helps find some of the most common accessibility issues. The scan was - performed using axe-core {toolData.scanEngineProperties.version} and {toolData.applicationProperties.environmentName}. For a complete + performed using {toolData.scanEngineProperties.name} {toolData.scanEngineProperties.version} and {toolData.applicationProperties.environmentName}. For a complete WCAG 2.1 compliance assessment please visit{' '}. - - ); - }); - - return footerTextForService; -}; + + ); +}); diff --git a/src/reports/package/reporter-factory.ts b/src/reports/package/reporter-factory.ts index 1eea627c3ec..f2ce25ac012 100644 --- a/src/reports/package/reporter-factory.ts +++ b/src/reports/package/reporter-factory.ts @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { createToolData } from 'common/application-properties-provider'; import { getCardViewData } from 'common/rule-based-view-model-provider'; import { generateUID } from 'common/uid-generator'; import { convertScanResultsToUnifiedResults } from 'injected/adapters/scan-results-to-unified-results'; @@ -20,7 +21,6 @@ import { ruleToLinkConfiguration } from 'scanner/rule-to-links-mappings'; import { FixInstructionProcessor } from '../../common/components/fix-instruction-processor'; import { getPropertyConfiguration } from '../../common/configs/unified-result-property-configurations'; import { DateProvider } from '../../common/date-provider'; -import { EnvironmentInfoProvider } from '../../common/environment-info-provider'; import { initializeFabricIcons } from '../../common/fabric-icons'; import { GetGuidanceTagsFromGuidanceLinks } from '../../common/get-guidance-tags-from-guidance-links'; import { AxeReportParameters, ReporterFactory } from './accessibilityInsightsReport'; @@ -42,15 +42,20 @@ const axeResultsReportGenerator = (parameters: AxeReportParameters) => { serviceName, } = parameters; - const environmentInfoProvider = new EnvironmentInfoProvider('', userAgent, axeVersion); const reactStaticRenderer = new ReactStaticRenderer(); const fixInstructionProcessor = new FixInstructionProcessor(); - const FooterText = FooterTextForService(serviceName); + const toolData = createToolData( + serviceName, + '', + 'axe-core', + axeVersion, + userAgent, + ); const sectionFactory = { ...AutomatedChecksReportSectionFactory, - FooterText, + FooterTextForService, }; const reportHtmlGenerator = new ReportHtmlGenerator( @@ -82,7 +87,7 @@ const axeResultsReportGenerator = (parameters: AxeReportParameters) => { getUUID: generateUID, }; - return new AxeResultsReport(deps, parameters, environmentInfoProvider.getToolData()); + return new AxeResultsReport(deps, parameters, toolData); }; initializeFabricIcons(); diff --git a/src/tests/unit/common/environment-info-provider.test.ts b/src/tests/unit/common/environment-info-provider.test.ts deleted file mode 100644 index 2c18a8b9292..00000000000 --- a/src/tests/unit/common/environment-info-provider.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -import { ToolData } from '../../../common/types/store-data/unified-data-interface'; -import { toolName } from '../../../content/strings/application'; -import { EnvironmentInfoProvider } from './../../../common/environment-info-provider'; - -describe('EnvironmentInfoProvider', () => { - const extensionVersion = '1.1.1'; - const axeCoreVersion = '2.2.2'; - const browserSpec = 'test-browser-spec'; - - let environmentInfoProvider: EnvironmentInfoProvider; - - beforeEach(() => { - environmentInfoProvider = new EnvironmentInfoProvider( - extensionVersion, - browserSpec, - axeCoreVersion, - ); - }); - - test('constructor', () => { - expect(environmentInfoProvider).not.toBeNull(); - }); - - test('getEnvironmentInfo', () => { - const expected = { - extensionVersion, - browserSpec, - axeCoreVersion, - }; - - expect(environmentInfoProvider.getEnvironmentInfo()).toEqual(expected); - }); - - test('getToolData', () => { - const expected: ToolData = { - scanEngineProperties: { - name: 'axe-core', - version: axeCoreVersion, - }, - applicationProperties: { - name: toolName, - version: extensionVersion, - environmentName: browserSpec, - }, - }; - - expect(environmentInfoProvider.getToolData()).toEqual(expected); - }); -}); diff --git a/src/tests/unit/tests/DetailsView/components/__snapshots__/assessment-test-view.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/__snapshots__/assessment-test-view.test.tsx.snap index 54f8691ab4f..f3bb7b6961d 100644 --- a/src/tests/unit/tests/DetailsView/components/__snapshots__/assessment-test-view.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/__snapshots__/assessment-test-view.test.tsx.snap @@ -59,6 +59,7 @@ exports[`AssessmentTestView assessment view, isScanning is false 1`] = ` enableJSXElement={ } @@ -156,6 +160,7 @@ exports[`AssessmentTestView assessment view, isScanning is true 1`] = ` enableJSXElement={ } diff --git a/src/tests/unit/tests/DetailsView/components/__snapshots__/getting-started-view.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/__snapshots__/getting-started-view.test.tsx.snap index afef5e72413..d6ace6d6168 100644 --- a/src/tests/unit/tests/DetailsView/components/__snapshots__/getting-started-view.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/__snapshots__/getting-started-view.test.tsx.snap @@ -4,7 +4,27 @@ exports[`GettingStartedViewTest renders with content from props 1`] = `

-

+

+ + some title + + +

+

Getting Started

diff --git a/src/tests/unit/tests/DetailsView/components/__snapshots__/issue-filing-dialog.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/__snapshots__/issue-filing-dialog.test.tsx.snap index 1d5f365b698..55c3206c211 100644 --- a/src/tests/unit/tests/DetailsView/components/__snapshots__/issue-filing-dialog.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/__snapshots__/issue-filing-dialog.test.tsx.snap @@ -23,12 +23,6 @@ exports[`IssueFilingDialog componentDidUpdate dialog is not open & props have ch Hello } + guidance={ + Object { + "pageTitle": "some page title", + } + } + title="some title" />
`; -exports[`AssessmentViewTest render for requirement 1`] = `null`; +exports[`AssessmentViewTest render for requirement 1`] = ` +
+ + + test-description +
, + "howToTest":

+ how-to-test-stub +

, + "name": "test-requirement-name", + } + } + scanningInProgress={true} + /> +
+`; diff --git a/src/tests/unit/tests/DetailsView/components/__snapshots__/requirement-view.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/__snapshots__/requirement-view.test.tsx.snap index bb6e800d911..a908bba7e96 100644 --- a/src/tests/unit/tests/DetailsView/components/__snapshots__/requirement-view.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/__snapshots__/requirement-view.test.tsx.snap @@ -5,21 +5,72 @@ exports[`RequirementViewTest renders with content from props 1`] = ` className="requirementView" > -
- test-description -
-
- test-visual-helper-toggle +
+
+ test-description +
+
+ test-visual-helper-toggle +
+ + how-to-test-stub +

+ } + /> +
- - how-to-test-stub -

- } - />
`; diff --git a/src/tests/unit/tests/DetailsView/components/getting-started-view.test.tsx b/src/tests/unit/tests/DetailsView/components/getting-started-view.test.tsx index bc2466e5840..430e3c6a33b 100644 --- a/src/tests/unit/tests/DetailsView/components/getting-started-view.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/getting-started-view.test.tsx @@ -2,15 +2,20 @@ // Licensed under the MIT License. import { GettingStartedView, + GettingStartedViewDeps, GettingStartedViewProps, } from 'DetailsView/components/getting-started-view'; import { shallow } from 'enzyme'; import * as React from 'react'; +import { ContentPageComponent } from 'views/content/content-page'; describe('GettingStartedViewTest', () => { it('renders with content from props', () => { const props: GettingStartedViewProps = { + deps: {} as GettingStartedViewDeps, gettingStartedContent:
test-getting-started-content
, + title: 'some title', + guidance: { pageTitle: 'some page title' } as ContentPageComponent, }; const rendered = shallow(); diff --git a/src/tests/unit/tests/DetailsView/components/issue-filing-dialog.test.tsx b/src/tests/unit/tests/DetailsView/components/issue-filing-dialog.test.tsx index a4c044c258d..7e3a54c18b7 100644 --- a/src/tests/unit/tests/DetailsView/components/issue-filing-dialog.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/issue-filing-dialog.test.tsx @@ -4,10 +4,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { IMock, It, Mock, MockBehavior, Times } from 'typemoq'; -import { - EnvironmentInfo, - EnvironmentInfoProvider, -} from '../../../../../common/environment-info-provider'; +import { ToolData } from 'common/types/store-data/unified-data-interface'; import { IssueFilingActionMessageCreator } from '../../../../../common/message-creators/issue-filing-action-message-creator'; import { UserConfigMessageCreator } from '../../../../../common/message-creators/user-config-message-creator'; import { CreateIssueDetailsTextData } from '../../../../../common/types/create-issue-details-text-data'; @@ -33,32 +30,34 @@ describe('IssueFilingDialog', () => { let deps: IssueFilingDialogDeps; let issueFilingServiceStub: IssueFilingService; let props: IssueFilingDialogProps; - let envInfoProviderMock: IMock; - let envInfo: EnvironmentInfo; let serviceKey: string; let issueFilingServicePropertiesMapStub: IssueFilingServicePropertiesMap; let userConfigMessageCreatorMock: IMock; let issueFilingServiceProviderMock: IMock; let issueFilingActionMessageCreatorMock: IMock; + const toolData: ToolData = { + scanEngineProperties: { + name: 'engine-name', + version: 'engine-version', + }, + applicationProperties: { + name: 'app-name', + version: 'app-version', + environmentName: 'environmentName', + }, + }; + beforeEach(() => { serviceKey = 'gitHub'; - envInfo = { - extensionVersion: '1.1.1', - browserSpec: '1.2.3', - axeCoreVersion: '2.1.1', - }; eventStub = new EventStubFactory().createMouseClickEvent(); isSettingsValidMock = Mock.ofInstance(data => null, MockBehavior.Strict); onCloseMock = Mock.ofInstance(() => null, MockBehavior.Strict); getSettingsFromStoreDataMock = Mock.ofInstance(data => null, MockBehavior.Strict); - envInfoProviderMock = Mock.ofType(EnvironmentInfoProvider); userConfigMessageCreatorMock = Mock.ofType(UserConfigMessageCreator); issueFilingServiceProviderMock = Mock.ofType(IssueFilingServiceProvider); issueFilingActionMessageCreatorMock = Mock.ofType(IssueFilingActionMessageCreator); - envInfoProviderMock.setup(p => p.getEnvironmentInfo()).returns(() => envInfo); - selectedIssueDataStub = { targetApp: { name: 'some pageTitle', @@ -73,7 +72,7 @@ describe('IssueFilingDialog', () => { deps = { issueFilingServiceProvider: issueFilingServiceProviderMock.object, userConfigMessageCreator: userConfigMessageCreatorMock.object, - environmentInfoProvider: envInfoProviderMock.object, + toolData: toolData, issueFilingActionMessageCreator: issueFilingActionMessageCreatorMock.object, } as IssueFilingDialogDeps; issueFilingServiceStub = { diff --git a/src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-icon.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-icon.test.tsx.snap index 60183bbc099..af207b66ab5 100644 --- a/src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-icon.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-icon.test.tsx.snap @@ -10,7 +10,7 @@ exports[`LeftNavIndexIcon render 1`] = ` exports[`LeftNavStatusIcon render 1`] = ` diff --git a/src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-link-builder.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-link-builder.test.tsx.snap index 0a757a3257a..b0f2145471b 100644 --- a/src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-link-builder.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/left-nav/__snapshots__/left-nav-link-builder.test.tsx.snap @@ -121,7 +121,7 @@ exports[`LeftNavBuilder buildReflowAssessmentTestLinks should build links for as "className": "hidden", }, "index": 1, - "key": "requirement-key-1", + "key": "Issues: requirement-key-1", "name": "requirement-name-1", "onClickNavLink": [Function], "onRenderNavLink": [Function], @@ -146,7 +146,7 @@ exports[`LeftNavBuilder buildReflowAssessmentTestLinks should build links for as "className": "hidden", }, "index": 1, - "key": "requirement-key-1", + "key": "Issues: requirement-key-1", "name": "requirement-name-1", "onClickNavLink": [Function], "onRenderNavLink": [Function], @@ -163,6 +163,7 @@ exports[`LeftNavBuilder buildReflowAssessmentTestLinks should build links for as exports[`LeftNavBuilder buildReflowAssessmentTestLinks should build links for assessments: requirement nav link render icon 1`] = ` { const assessmentDataStub: { [key: string]: AssessmentData } = { x: { testStepStatus: {} } as AssessmentData, }; + const selectedTestSubview = 'selected-subview'; + const assessmentNavStateStub = { + selectedTestSubview, + } as AssessmentNavState; const assessmentStoreDataStub = { assessments: assessmentDataStub, + assessmentNavState: assessmentNavStateStub, } as AssessmentStoreData; const rightPanelConfig: DetailsRightPanelConfiguration = { @@ -74,7 +81,15 @@ describe('DetailsViewLeftNav', () => { } as DetailsViewLeftNavProps; GetLeftNavSelectedKeyMock.setup(getter => - getter(It.isValue({ visualizationType: selectedTestStub })), + getter( + It.isValue({ + visualizationType: selectedTestStub, + featureFlagStoreData: featureFlagDataStub, + selectedSubview: selectedTestSubview, + deps: { generateReflowAssessmentTestKey }, + assessmentsProvider: assessmentProviderStub, + }), + ), ).returns(() => selectedKeyStub); assessmentsProviderWithFeaturesEnabledMock diff --git a/src/tests/unit/tests/DetailsView/components/left-nav/get-left-nav-selected-key.test.ts b/src/tests/unit/tests/DetailsView/components/left-nav/get-left-nav-selected-key.test.ts index 064ac9f3222..0d6e4b7b1cb 100644 --- a/src/tests/unit/tests/DetailsView/components/left-nav/get-left-nav-selected-key.test.ts +++ b/src/tests/unit/tests/DetailsView/components/left-nav/get-left-nav-selected-key.test.ts @@ -1,8 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { EnumHelper } from '../../../../../../common/enum-helper'; +import { AssessmentsProviderImpl } from 'assessments/assessments-provider'; +import { AssessmentsProvider } from 'assessments/types/assessments-provider'; +import { FeatureFlags } from 'common/feature-flags'; +import { FeatureFlagStoreData } from 'common/types/store-data/feature-flag-store-data'; +import { reflowAssessmentTestKeyGenerator } from 'DetailsView/components/left-nav/left-nav-link-builder'; +import { IMock, Mock } from 'typemoq'; import { VisualizationType } from '../../../../../../common/types/visualization-type'; import { + GetLeftNavSelectedKeyProps, getOverviewKey, getTestViewKey, } from '../../../../../../DetailsView/components/left-nav/get-left-nav-selected-key'; @@ -14,12 +20,52 @@ describe('getOverviewKey', () => { }); describe('getTestviewKey', () => { - const types = EnumHelper.getNumericValues(VisualizationType); - describe.each(types)('returns using VisualizationType', visualizationType => { - it('for ' + VisualizationType[visualizationType], () => { - expect(getTestViewKey({ visualizationType: visualizationType })).toEqual( - VisualizationType[visualizationType], - ); - }); + const visualizationType: VisualizationType = 1; + const selectedSubview = 'selected-subview'; + let featureFlagStoreData: FeatureFlagStoreData; + let assessmentsProviderMock: IMock; + let generateReflowAssessmentTestKeyMock: IMock; + let props: GetLeftNavSelectedKeyProps; + + beforeEach(() => { + assessmentsProviderMock = Mock.ofType(); + generateReflowAssessmentTestKeyMock = Mock.ofType(); + featureFlagStoreData = {}; + featureFlagStoreData[FeatureFlags.reflowUI] = false; + + props = { + deps: { + generateReflowAssessmentTestKey: generateReflowAssessmentTestKeyMock.object, + }, + assessmentsProvider: assessmentsProviderMock.object, + visualizationType, + featureFlagStoreData, + selectedSubview, + }; + }); + + it('with invalid assessment type', () => { + assessmentsProviderMock.setup(a => a.isValidType(visualizationType)).returns(() => false); + const expectedKey = VisualizationType[visualizationType]; + + expect(getTestViewKey(props)).toEqual(expectedKey); + }); + + it('with reflow flag disabled', () => { + assessmentsProviderMock.setup(a => a.isValidType(visualizationType)).returns(() => true); + const expectedKey = VisualizationType[visualizationType]; + + expect(getTestViewKey(props)).toEqual(expectedKey); + }); + + it('with reflow flag enabled', () => { + assessmentsProviderMock.setup(a => a.isValidType(visualizationType)).returns(() => true); + featureFlagStoreData[FeatureFlags.reflowUI] = true; + const expectedKey = 'expected key'; + generateReflowAssessmentTestKeyMock + .setup(g => g(visualizationType, selectedSubview)) + .returns(() => expectedKey); + + expect(getTestViewKey(props)).toEqual(expectedKey); }); }); diff --git a/src/tests/unit/tests/DetailsView/components/left-nav/left-nav-icon.test.tsx b/src/tests/unit/tests/DetailsView/components/left-nav/left-nav-icon.test.tsx index d353f01b681..717ba1f798d 100644 --- a/src/tests/unit/tests/DetailsView/components/left-nav/left-nav-icon.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/left-nav/left-nav-icon.test.tsx @@ -18,6 +18,7 @@ describe('LeftNavStatusIcon', () => { name: 'test', url: 'test', }, + className: 'some class', } as LeftNavIconProps; const actual = shallow(); diff --git a/src/tests/unit/tests/DetailsView/components/left-nav/left-nav-link-builder.test.tsx b/src/tests/unit/tests/DetailsView/components/left-nav/left-nav-link-builder.test.tsx index 9b6072dde17..21b3d351143 100644 --- a/src/tests/unit/tests/DetailsView/components/left-nav/left-nav-link-builder.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/left-nav/left-nav-link-builder.test.tsx @@ -265,9 +265,10 @@ describe('LeftNavBuilder', () => { ); links.forEach((testLink, linkIndex) => { + const visualizationType = assessmentStub.visualizationType; const expectedTestLink = { name: assessmentStub.title, - key: VisualizationType[assessmentStub.visualizationType], + key: VisualizationType[visualizationType], forceAnchor: true, url: '', index: startingIndexStub + linkIndex, @@ -281,7 +282,7 @@ describe('LeftNavBuilder', () => { }; const expectedGettingStartedLink = { name: 'Getting Started', - key: gettingStartedSubview, + key: `${VisualizationType[visualizationType]}: ${gettingStartedSubview}`, forceAnchor: true, url: '', index: 0, @@ -327,7 +328,7 @@ describe('LeftNavBuilder', () => { ): TestRequirementLeftNavLink { return { name: requirement.name, - key: requirement.key, + key: `${VisualizationType[test]}: ${requirement.key}`, forceAnchor: true, url: '', iconProps: { diff --git a/src/tests/unit/tests/DetailsView/components/reflow-assessment-view.test.tsx b/src/tests/unit/tests/DetailsView/components/reflow-assessment-view.test.tsx index d54c8c89a5b..19dc93341a4 100644 --- a/src/tests/unit/tests/DetailsView/components/reflow-assessment-view.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/reflow-assessment-view.test.tsx @@ -1,12 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +import { Requirement } from 'assessments/types/requirement'; import { AssessmentTestResult } from 'common/assessment/assessment-test-result'; -import { AssessmentData } from 'common/types/store-data/assessment-result-data'; +import { RequirementData, RequirementResult } from 'common/assessment/requirement'; +import { + AssessmentData, + GettingStarted, + gettingStartedSubview, + RequirementName, +} from 'common/types/store-data/assessment-result-data'; +import { FeatureFlagStoreData } from 'common/types/store-data/feature-flag-store-data'; +import { PathSnippetStoreData } from 'common/types/store-data/path-snippet-store-data'; +import { AssessmentInstanceTableHandler } from 'DetailsView/handlers/assessment-instance-table-handler'; import { shallow } from 'enzyme'; import * as React from 'react'; -import { IMock, Mock, Times } from 'typemoq'; - -import { AssessmentViewUpdateHandler } from 'DetailsView/components/assessment-view-update-handler'; import { ReflowAssessmentView, ReflowAssessmentViewDeps, @@ -14,12 +21,6 @@ import { } from '../../../../../DetailsView/components/reflow-assessment-view'; describe('AssessmentViewTest', () => { - let updateHandlerMock: IMock; - - beforeEach(() => { - updateHandlerMock = Mock.ofType(AssessmentViewUpdateHandler); - }); - test('render for requirement', () => { const props = generateProps('requirement'); const rendered = shallow(); @@ -27,63 +28,61 @@ describe('AssessmentViewTest', () => { }); test('render for gettting started', () => { - const props = generateProps('getting-started'); + const props = generateProps(gettingStartedSubview); const rendered = shallow(); expect(rendered.getElement()).toMatchSnapshot(); }); - test('componentDidMount', () => { - const props = generateProps('requirement'); - updateHandlerMock.setup(u => u.onMount(props)).verifiable(Times.once()); - const testObject = new ReflowAssessmentView(props); - - testObject.componentDidMount(); - - updateHandlerMock.verifyAll(); - }); - - test('componentWillUnmount', () => { - const props = generateProps('requirement'); - updateHandlerMock.setup(u => u.onUnmount(props)).verifiable(Times.once()); - const testObject = new ReflowAssessmentView(props); - - testObject.componentWillUnmount(); - - updateHandlerMock.verifyAll(); - }); - - test('componentDidUpdate', () => { - const prevProps = generateProps('requirement1'); - const props = generateProps('requirement2'); - updateHandlerMock.setup(u => u.update(prevProps, props)).verifiable(Times.once()); - const testObject = new ReflowAssessmentView(props); - - testObject.componentDidUpdate(prevProps); - - updateHandlerMock.verifyAll(); - }); - - function generateProps(subview: string): ReflowAssessmentViewProps { - const assessmentDataMock = Mock.ofType(); - + function generateProps(subview: RequirementName | GettingStarted): ReflowAssessmentViewProps { + const assessmentDataStub = {} as AssessmentData; + + const requirementStub = { + name: 'test-requirement-name', + description:
test-description
, + howToTest:

how-to-test-stub

, + } as Requirement; + const requirementResultStub: RequirementResult = { + definition: requirementStub, + data: { isStepScanned: true } as RequirementData, + }; + const getRequirementResultStub = (requirementKey: string) => { + return requirementResultStub; + }; const assessmentTestResultStub: AssessmentTestResult = { definition: { gettingStarted:

Hello

, + title: 'some title', + guidance: { pageTitle: 'some page title' }, }, + getRequirementResult: getRequirementResultStub, } as AssessmentTestResult; + const assessmentInstanceTableHandlerStub = { + changeRequirementStatus: null, + } as AssessmentInstanceTableHandler; + + const featureFlagStoreDataStub: FeatureFlagStoreData = { + 'some feature flag': true, + }; + const pathSnippetStoreDataStub = { + path: null, + } as PathSnippetStoreData; + const reflowProps = { - deps: { - assessmentViewUpdateHandler: updateHandlerMock.object, - } as ReflowAssessmentViewDeps, + deps: {} as ReflowAssessmentViewDeps, prevTarget: { id: 4 }, currentTarget: { id: 5 }, + scanningInProgress: true, + selectedRequirementIsEnabled: true, assessmentNavState: { selectedTestSubview: subview, selectedTestType: -1, }, - assessmentData: assessmentDataMock.object, + assessmentData: assessmentDataStub, assessmentTestResult: assessmentTestResultStub, + assessmentInstanceTableHandler: assessmentInstanceTableHandlerStub, + featureFlagStoreData: featureFlagStoreDataStub, + pathSnippetStoreData: pathSnippetStoreDataStub, } as ReflowAssessmentViewProps; return reflowProps; } diff --git a/src/tests/unit/tests/DetailsView/components/requirement-view.test.tsx b/src/tests/unit/tests/DetailsView/components/requirement-view.test.tsx index 0c8b36b3204..24bf1c93bfc 100644 --- a/src/tests/unit/tests/DetailsView/components/requirement-view.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/requirement-view.test.tsx @@ -1,37 +1,61 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { AssessmentsProviderImpl } from 'assessments/assessments-provider'; +import { AssessmentsProvider } from 'assessments/types/assessments-provider'; import { Requirement } from 'assessments/types/requirement'; -import { GeneratedAssessmentInstance } from 'common/types/store-data/assessment-result-data'; +import { + AssessmentNavState, + GeneratedAssessmentInstance, + ManualTestStepResult, +} from 'common/types/store-data/assessment-result-data'; +import { FeatureFlagStoreData } from 'common/types/store-data/feature-flag-store-data'; +import { PathSnippetStoreData } from 'common/types/store-data/path-snippet-store-data'; import { VisualizationType } from 'common/types/visualization-type'; +import { + AssessmentViewUpdateHandler, + AssessmentViewUpdateHandlerProps, +} from 'DetailsView/components/assessment-view-update-handler'; import { RequirementView, RequirementViewDeps, RequirementViewProps, } from 'DetailsView/components/requirement-view'; +import { AssessmentInstanceTableHandler } from 'DetailsView/handlers/assessment-instance-table-handler'; import { shallow } from 'enzyme'; +import { cloneDeep } from 'lodash'; import * as React from 'react'; -import { Mock } from 'typemoq'; +import { IMock, It, Mock, Times } from 'typemoq'; import { DictionaryStringTo } from 'types/common-types'; describe('RequirementViewTest', () => { - it('renders with content from props', () => { - const requirementStub = { + let requirementStub: Requirement; + let assessmentNavState: AssessmentNavState; + let selectedRequirementStub: Requirement; + let assessmentsProviderMock: IMock; + let props: RequirementViewProps; + let manualRequirementResultMapStub: DictionaryStringTo; + let assessmentInstanceTableHandlerStub: AssessmentInstanceTableHandler; + let featureFlagStoreDataStub: FeatureFlagStoreData; + let pathSnippetStoreDataStub: PathSnippetStoreData; + let updateHandlerMock: IMock; + + beforeEach(() => { + requirementStub = { name: 'test-requirement-name', description:
test-description
, howToTest:

how-to-test-stub

, } as Requirement; - const assessmentNavState = { + assessmentNavState = { selectedTestType: VisualizationType.Headings, selectedTestSubview: 'test-requirement-name', }; - const selectedRequirementStub = { + selectedRequirementStub = { getVisualHelperToggle: ({}) =>
test-visual-helper-toggle
, } as Readonly; - const assessmentsProviderMock = Mock.ofType(AssessmentsProviderImpl); + assessmentsProviderMock = Mock.ofType(AssessmentsProviderImpl); assessmentsProviderMock .setup(ap => ap.getStep( @@ -40,19 +64,100 @@ describe('RequirementViewTest', () => { ), ) .returns(() => selectedRequirementStub); + assessmentInstanceTableHandlerStub = { + changeRequirementStatus: null, + } as AssessmentInstanceTableHandler; + manualRequirementResultMapStub = { + 'some manual test step result id': null, + }; + featureFlagStoreDataStub = { + 'some feature flag': true, + }; + pathSnippetStoreDataStub = { + path: null, + } as PathSnippetStoreData; + updateHandlerMock = Mock.ofType(AssessmentViewUpdateHandler); - const props: RequirementViewProps = { - deps: {} as RequirementViewDeps, + props = { + deps: { assessmentViewUpdateHandler: updateHandlerMock.object } as RequirementViewDeps, requirement: requirementStub, assessmentsProvider: assessmentsProviderMock.object, assessmentNavState: assessmentNavState, instancesMap: {} as DictionaryStringTo, - isStepEnabled: true, - isStepScanned: true, - }; + isRequirementEnabled: true, + isRequirementScanned: true, + manualRequirementResultMap: manualRequirementResultMapStub, + assessmentInstanceTableHandler: assessmentInstanceTableHandlerStub, + featureFlagStoreData: featureFlagStoreDataStub, + pathSnippetStoreData: pathSnippetStoreDataStub, + prevTarget: { id: 4 }, + currentTarget: { id: 5 }, + assessmentData: {}, + } as RequirementViewProps; + }); + it('renders with content from props', () => { const rendered = shallow(); expect(rendered.getElement()).toMatchSnapshot(); }); + + test('componentDidUpdate', () => { + const newProps = cloneDeep(props); + newProps.deps.assessmentViewUpdateHandler = updateHandlerMock.object; + const prevProps = props; + prevProps.assessmentNavState.selectedTestSubview = 'prevTestStep'; + + updateHandlerMock + .setup(u => + u.update( + It.isValue(getUpdateHandlerProps(prevProps)), + It.isValue(getUpdateHandlerProps(newProps)), + ), + ) + .verifiable(Times.once()); + + const testObject = new RequirementView(newProps); + + testObject.componentDidUpdate(prevProps); + + updateHandlerMock.verifyAll(); + }); + + test('componentDidMount', () => { + updateHandlerMock + .setup(u => u.onMount(getUpdateHandlerProps(props))) + .verifiable(Times.once()); + + const testObject = new RequirementView(props); + + testObject.componentDidMount(); + + updateHandlerMock.verifyAll(); + }); + + test('componentWillUnmount', () => { + updateHandlerMock + .setup(u => u.onUnmount(getUpdateHandlerProps(props))) + .verifiable(Times.once()); + + const testObject = new RequirementView(props); + + testObject.componentWillUnmount(); + + updateHandlerMock.verifyAll(); + }); + + function getUpdateHandlerProps( + givenProps: RequirementViewProps, + ): AssessmentViewUpdateHandlerProps { + return { + deps: givenProps.deps, + selectedRequirementIsEnabled: givenProps.isRequirementEnabled, + assessmentNavState: givenProps.assessmentNavState, + assessmentData: givenProps.assessmentData, + prevTarget: givenProps.prevTarget, + currentTarget: givenProps.currentTarget, + }; + } }); diff --git a/src/tests/unit/tests/assessments/auto-pass-if-no-results.test.ts b/src/tests/unit/tests/assessments/auto-pass-if-no-results.test.ts new file mode 100644 index 00000000000..8788d872072 --- /dev/null +++ b/src/tests/unit/tests/assessments/auto-pass-if-no-results.test.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +import { autoPassIfNoResults } from 'assessments/auto-pass-if-no-results'; +import { ManualTestStatus } from 'common/types/manual-test-status'; +import { InstanceIdToInstanceDataMap } from 'common/types/store-data/assessment-result-data'; + +describe('autoPassIfNoResults', () => { + it('returns UNKNOWN for instance data with a result', () => { + const inputWithResult: InstanceIdToInstanceDataMap = { + '#some-element': { + target: ['#some-element'], + html: '
', + propertyBag: { + someDataProperty: 'some data', + }, + testStepResults: { + 'test-step-1': { + someResultData: 'some result data', + }, + }, + }, + }; + + expect(autoPassIfNoResults(inputWithResult)).toBe(ManualTestStatus.UNKNOWN); + }); + + it('returns PASS for instance data with no results', () => { + const inputWithNoResults: InstanceIdToInstanceDataMap = {}; + + expect(autoPassIfNoResults(inputWithNoResults)).toBe(ManualTestStatus.PASS); + }); +}); diff --git a/src/tests/unit/tests/assessments/landmarks/auto-pass-if-no-landmarks.test.ts b/src/tests/unit/tests/assessments/landmarks/auto-pass-if-no-landmarks.test.ts deleted file mode 100644 index ece051ee4ac..00000000000 --- a/src/tests/unit/tests/assessments/landmarks/auto-pass-if-no-landmarks.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -import { autoPassIfNoLandmarks } from 'assessments/landmarks/auto-pass-if-no-landmarks'; -import { ManualTestStatus } from 'common/types/manual-test-status'; -import { InstanceIdToInstanceDataMap } from 'common/types/store-data/assessment-result-data'; - -describe('autoPassIfNoLandmarks', () => { - it('returns PASS for instance data with no landmarks', () => { - const input = makeInputDataWithLandmarkRoles([]); - expect(autoPassIfNoLandmarks(input)).toBe(ManualTestStatus.PASS); - }); - - it.each(['main', 'complementary'])( - 'returns UNKNOWN for instance data with one %s landmark', - (landmarkRole: string) => { - const input = makeInputDataWithLandmarkRoles([landmarkRole]); - expect(autoPassIfNoLandmarks(input)).toBe(ManualTestStatus.UNKNOWN); - }, - ); - - it('returns UNKNOWN for instance data with multiple landmarks', () => { - const input = makeInputDataWithLandmarkRoles(['main', 'complementary', 'header']); - expect(autoPassIfNoLandmarks(input)).toBe(ManualTestStatus.UNKNOWN); - }); - - function makeInputDataWithLandmarkRoles(landmarkRoles: string[]): InstanceIdToInstanceDataMap { - const data: InstanceIdToInstanceDataMap = {}; - for (const landmarkRole of landmarkRoles) { - data[`#element-with-${landmarkRole}`] = { - target: [`#element-with-${landmarkRole}`], - html: `
`, - propertyBag: { - role: landmarkRole, - }, - testStepResults: {}, - }; - } - return data; - } -}); diff --git a/src/tests/unit/tests/background/actions/assessment-action-creator.test.ts b/src/tests/unit/tests/background/actions/assessment-action-creator.test.ts index b40058b9a88..a5cf1f26bc4 100644 --- a/src/tests/unit/tests/background/actions/assessment-action-creator.test.ts +++ b/src/tests/unit/tests/background/actions/assessment-action-creator.test.ts @@ -23,6 +23,7 @@ import { Action } from 'common/flux/action'; import { getStoreStateMessage, Messages } from 'common/messages'; import { StoreNames } from 'common/stores/store-names'; import { DetailsViewPivotType } from 'common/types/details-view-pivot-type'; +import { gettingStartedSubview } from 'common/types/store-data/assessment-result-data'; import { VisualizationType } from 'common/types/visualization-type'; import { ScanBasePayload, @@ -559,7 +560,7 @@ describe('AssessmentActionCreatorTest', () => { ...telemetryOnlyPayload, } as SelectGettingStartedPayload; const actionPayload: SelectTestSubviewPayload = { - selectedTestSubview: 'getting-started', + selectedTestSubview: gettingStartedSubview, ...telemetryOnlyPayload, } as SelectTestSubviewPayload; diff --git a/src/tests/unit/tests/background/global-context-factory.test.ts b/src/tests/unit/tests/background/global-context-factory.test.ts index 000a086dede..05a7c41f4f4 100644 --- a/src/tests/unit/tests/background/global-context-factory.test.ts +++ b/src/tests/unit/tests/background/global-context-factory.test.ts @@ -15,7 +15,6 @@ import { IMock, It, Mock } from 'typemoq'; import { BrowserAdapter } from '../../../../common/browser-adapters/browser-adapter'; import { CommandsAdapter } from '../../../../common/browser-adapters/commands-adapter'; import { StorageAdapter } from '../../../../common/browser-adapters/storage-adapter'; -import { EnvironmentInfo } from '../../../../common/environment-info-provider'; import { IndexedDBAPI } from '../../../../common/indexedDB/indexedDB'; import { TelemetryDataFactory } from '../../../../common/telemetry-data-factory'; import { IssueFilingServiceProvider } from '../../../../issue-filing/issue-filing-service-provider'; @@ -30,7 +29,6 @@ describe('GlobalContextFactoryTest', () => { let issueFilingServiceProviderMock: IMock; let loggerMock: IMock; - let environmentInfoStub: EnvironmentInfo; let toolData: ToolData; let userDataStub: LocalStorageData; let idbInstance: IndexedDBAPI; @@ -52,7 +50,6 @@ describe('GlobalContextFactoryTest', () => { issueFilingServiceProviderMock = Mock.ofType(IssueFilingServiceProvider); userDataStub = {}; - environmentInfoStub = {} as EnvironmentInfo; toolData = {} as ToolData; persistedDataStub = {} as PersistedData; idbInstance = {} as IndexedDBAPI; @@ -68,7 +65,6 @@ describe('GlobalContextFactoryTest', () => { idbInstance, persistedDataStub, issueFilingServiceProviderMock.object, - environmentInfoStub, toolData, storageAdapterMock.object, commandsAdapterMock.object, diff --git a/src/tests/unit/tests/background/stores/assessment-store.test.ts b/src/tests/unit/tests/background/stores/assessment-store.test.ts index 39776f31617..8a5552c8b13 100644 --- a/src/tests/unit/tests/background/stores/assessment-store.test.ts +++ b/src/tests/unit/tests/background/stores/assessment-store.test.ts @@ -35,6 +35,7 @@ import { AssessmentData, AssessmentStoreData, GeneratedAssessmentInstance, + InstanceIdToInstanceDataMap, ManualTestStepResult, PersistedTabInfo, TestStepResult, @@ -581,16 +582,40 @@ describe('AssessmentStore', () => { scanIncompleteWarnings: [], }; - const expectedInstanceMap = {}; + const fullInstanceMap: InstanceIdToInstanceDataMap = { + '#selector-1': { + target: ['#selector-1'], + html: '
', + testStepResults: { 'assessment-1-step-1': { resultData: 'result data' } }, + }, + '#selector-2': { + target: ['#selector-2'], + html: '
', + testStepResults: { 'assessment-1-step-2': { resultData: 'result data' } }, + }, + }; + const instanceMapFilteredForTestStep1 = { + '#selector-1': fullInstanceMap['#selector-1'], + }; + + const mockGetInitialManualTestStatus = Mock.ofInstance( + (_: InstanceIdToInstanceDataMap) => ManualTestStatus.FAIL, + MockBehavior.Strict, + ); + mockGetInitialManualTestStatus + .setup(m => m(instanceMapFilteredForTestStep1)) + .returns(() => ManualTestStatus.FAIL) + .verifiable(); + const stepMapStub = assessmentsProvider.getStepMap(assessmentType); const stepConfig: Readonly = { ...assessmentsProvider.getStep(assessmentType, 'assessment-1-step-1'), isManual: true, - getInitialManualTestStatus: () => ManualTestStatus.FAIL, + getInitialManualTestStatus: mockGetInitialManualTestStatus.object, }; const assessmentData = new AssessmentDataBuilder() - .with('generatedAssessmentInstancesMap', expectedInstanceMap) + .with('generatedAssessmentInstancesMap', fullInstanceMap) .with('testStepStatus', { // should FAIL based on getInitialManualTestStatus ['assessment-1-step-1']: generateTestStepData(ManualTestStatus.FAIL, true), @@ -643,11 +668,13 @@ describe('AssessmentStore', () => { stepConfig.isVisualizationSupportedForResult, ), ) - .returns(() => expectedInstanceMap); + .returns(() => fullInstanceMap); createStoreTesterForAssessmentActions('scanCompleted') .withActionParam(payload) .testListenerToBeCalledOnce(initialState, finalState); + + mockGetInitialManualTestStatus.verifyAll(); }); test('onScanCompleted with a manual requirement skips getInitialManualTestStatus for requirements that already have a status', () => { diff --git a/src/tests/unit/tests/common/components/issue-filing-button.test.tsx b/src/tests/unit/tests/common/components/issue-filing-button.test.tsx index d0f922448de..ef53141521d 100644 --- a/src/tests/unit/tests/common/components/issue-filing-button.test.tsx +++ b/src/tests/unit/tests/common/components/issue-filing-button.test.tsx @@ -5,7 +5,6 @@ import { IssueFilingButtonDeps, IssueFilingButtonProps, } from 'common/components/issue-filing-button'; -import { EnvironmentInfoProvider } from 'common/environment-info-provider'; import { IssueFilingActionMessageCreator } from 'common/message-creators/issue-filing-action-message-creator'; import { NamedFC } from 'common/react/named-fc'; import { CreateIssueDetailsTextData } from 'common/types/create-issue-details-text-data'; @@ -18,18 +17,30 @@ import { DefaultButton } from 'office-ui-fabric-react'; import * as React from 'react'; import { IMock, Mock, Times } from 'typemoq'; +import { ToolData } from 'common/types/store-data/unified-data-interface'; import { EventStubFactory } from '../../../common/event-stub-factory'; describe('IssueFilingButtonTest', () => { const testKey: string = 'test'; const eventStub = new EventStubFactory().createNativeMouseClickEvent() as any; - let environmentInfoProviderMock: IMock; let issueFilingServiceProviderMock: IMock; let issueFilingActionMessageCreatorMock: IMock; let userConfigurationStoreData: UserConfigurationStoreData; let testIssueFilingServiceStub: IssueFilingService; let needsSettingsContentRenderer: IssueFilingNeedsSettingsContentRenderer; + const toolData: ToolData = { + scanEngineProperties: { + name: 'engine-name', + version: 'engine-version', + }, + applicationProperties: { + name: 'app-name', + version: 'app-version', + environmentName: 'environmentName', + }, + }; + beforeEach(() => { testIssueFilingServiceStub = { key: testKey, @@ -48,19 +59,8 @@ describe('IssueFilingButtonTest', () => { [testKey]: {}, }, } as UserConfigurationStoreData; - environmentInfoProviderMock = Mock.ofType(EnvironmentInfoProvider); issueFilingServiceProviderMock = Mock.ofType(IssueFilingServiceProvider); issueFilingActionMessageCreatorMock = Mock.ofType(IssueFilingActionMessageCreator); - environmentInfoProviderMock - .setup(envp => envp.getEnvironmentInfo()) - .returns(() => { - return { - extensionVersion: '1', - axeCoreVersion: '2', - browserSpec: 'spec', - }; - }) - .verifiable(); issueFilingServiceProviderMock .setup(bp => bp.forKey(testKey)) .returns(() => testIssueFilingServiceStub) @@ -73,7 +73,7 @@ describe('IssueFilingButtonTest', () => { const props: IssueFilingButtonProps = { deps: { issueFilingActionMessageCreator: issueFilingActionMessageCreatorMock.object, - environmentInfoProvider: environmentInfoProviderMock.object, + toolData: toolData, issueFilingServiceProvider: issueFilingServiceProviderMock.object, } as IssueFilingButtonDeps, issueDetailsData: {} as CreateIssueDetailsTextData, @@ -90,7 +90,7 @@ describe('IssueFilingButtonTest', () => { const props: IssueFilingButtonProps = { deps: { issueFilingActionMessageCreator: issueFilingActionMessageCreatorMock.object, - environmentInfoProvider: environmentInfoProviderMock.object, + toolData: toolData, issueFilingServiceProvider: issueFilingServiceProviderMock.object, } as IssueFilingButtonDeps, issueDetailsData: {} as CreateIssueDetailsTextData, @@ -119,7 +119,7 @@ describe('IssueFilingButtonTest', () => { const props: IssueFilingButtonProps = { deps: { issueFilingActionMessageCreator: issueFilingActionMessageCreatorMock.object, - environmentInfoProvider: environmentInfoProviderMock.object, + toolData: toolData, issueFilingServiceProvider: issueFilingServiceProviderMock.object, } as IssueFilingButtonDeps, issueDetailsData: {} as CreateIssueDetailsTextData, diff --git a/src/tests/unit/tests/injected/analyzers/unified-result-sender.test.ts b/src/tests/unit/tests/injected/analyzers/unified-result-sender.test.ts index 788bc1fdae9..aa7cb33374c 100644 --- a/src/tests/unit/tests/injected/analyzers/unified-result-sender.test.ts +++ b/src/tests/unit/tests/injected/analyzers/unified-result-sender.test.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { UnifiedScanCompletedPayload } from 'background/actions/action-payloads'; -import { EnvironmentInfoProvider } from 'common/environment-info-provider'; import { Message } from 'common/message'; import { Messages } from 'common/messages'; import { @@ -32,14 +31,12 @@ describe('sendConvertedResults', () => { let sendDelegate: IMock; let convertToUnifiedMock: IMock; let convertToUnifiedRulesMock: IMock; - let environmentInfoProviderMock: IMock; let scanIncompleteWarningDetectorMock: IMock; beforeEach(() => { sendDelegate = Mock.ofType(); convertToUnifiedMock = Mock.ofType(); convertToUnifiedRulesMock = Mock.ofType(); - environmentInfoProviderMock = Mock.ofType(); scanIncompleteWarningDetectorMock = Mock.ofType(); }); @@ -54,9 +51,6 @@ describe('sendConvertedResults', () => { .setup(m => m(axeInputResults, uuidGeneratorStub)) .returns(val => unifiedResults); convertToUnifiedRulesMock.setup(m => m(axeInputResults)).returns(val => unifiedRules); - environmentInfoProviderMock - .setup(provider => provider.getToolData()) - .returns(() => toolInfo); scanIncompleteWarningDetectorMock .setup(m => m.detectScanIncompleteWarnings()) .returns(() => warnings); @@ -65,7 +59,7 @@ describe('sendConvertedResults', () => { sendDelegate.object, convertToUnifiedMock.object, convertToUnifiedRulesMock.object, - environmentInfoProviderMock.object, + toolInfo, uuidGeneratorStub, scanIncompleteWarningDetectorMock.object, ); @@ -77,7 +71,6 @@ describe('sendConvertedResults', () => { convertToUnifiedMock.verifyAll(); convertToUnifiedRulesMock.verifyAll(); - environmentInfoProviderMock.verifyAll(); const expectedPayload: UnifiedScanCompletedPayload = { scanResult: unifiedResults, diff --git a/src/tests/unit/tests/injected/dialog-renderer.test.tsx b/src/tests/unit/tests/injected/dialog-renderer.test.tsx index 66aa002cadc..f94b801cf2a 100644 --- a/src/tests/unit/tests/injected/dialog-renderer.test.tsx +++ b/src/tests/unit/tests/injected/dialog-renderer.test.tsx @@ -18,7 +18,6 @@ import { UserConfigurationStore } from 'background/stores/global/user-configurat import { NavigatorUtils } from 'common/navigator-utils'; import { ToolData } from 'common/types/store-data/unified-data-interface'; import { BrowserAdapter } from '../../../../common/browser-adapters/browser-adapter'; -import { EnvironmentInfoProvider } from '../../../../common/environment-info-provider'; import { FeatureFlags, getDefaultFeatureFlagsWeb } from '../../../../common/feature-flags'; import { HTMLElementUtils } from '../../../../common/html-element-utils'; import { DevToolActionMessageCreator } from '../../../../common/message-creators/dev-tool-action-message-creator'; @@ -111,7 +110,6 @@ describe('DialogRendererTests', () => { const devToolActionMessageCreatorMock = Mock.ofType(DevToolActionMessageCreator); const targetActionPageMessageCreatorMock = Mock.ofType(TargetPageActionMessageCreator); const issueFilingActionMessageCreatorMock = Mock.ofType(IssueFilingActionMessageCreator); - const environmentInfoProviderMock = Mock.ofType(EnvironmentInfoProvider); const issueFilingServiceProviderMock = Mock.ofType(IssueFilingServiceProvider); const userConfigMessageCreatorMock = Mock.ofType(UserConfigMessageCreator); @@ -122,7 +120,6 @@ describe('DialogRendererTests', () => { targetActionPageMessageCreatorMock.object, issueFilingActionMessageCreatorMock.object, userConfigMessageCreatorMock.object, - environmentInfoProviderMock.object, toolData, issueFilingServiceProviderMock.object, ); diff --git a/src/tests/unit/tests/injected/main-window-context.test.ts b/src/tests/unit/tests/injected/main-window-context.test.ts index cbb03fc4ff6..693b9fd5c68 100644 --- a/src/tests/unit/tests/injected/main-window-context.test.ts +++ b/src/tests/unit/tests/injected/main-window-context.test.ts @@ -8,7 +8,6 @@ describe('MainWindowContextTest', () => { const devToolActionMessageCreator: any = { name: 'devToolActionMessageCreator' }; const targetPageActionMessageCreator: any = { name: 'targetPageActionMessageCreator' }; const issueFilingActionMessageCreator: any = { name: 'targetPageActionMessageCreator' }; - const environmentInfoProvider: any = { name: 'environmentInfoProvider' }; const toolData: any = { name: 'toolData' }; const issueFilingServiceProvider: any = { name: 'issueFilingServiceProvider' }; const userConfigMessageCreator: any = { name: 'userConfigMessageCreator' }; @@ -21,7 +20,6 @@ describe('MainWindowContextTest', () => { targetPageActionMessageCreator, issueFilingActionMessageCreator, userConfigMessageCreator, - environmentInfoProvider, toolData, issueFilingServiceProvider, ); @@ -42,7 +40,6 @@ describe('MainWindowContextTest', () => { targetPageActionMessageCreator, issueFilingActionMessageCreator, userConfigMessageCreator, - environmentInfoProvider, toolData, issueFilingServiceProvider, ); @@ -60,9 +57,6 @@ describe('MainWindowContextTest', () => { expect(MainWindowContext.getMainWindowContext().getUserConfigMessageCreator()).toEqual( userConfigMessageCreator, ); - expect(MainWindowContext.getMainWindowContext().getEnvironmentInfoProvider()).toEqual( - environmentInfoProvider, - ); expect(MainWindowContext.getMainWindowContext().getToolData()).toEqual(toolData); expect(MainWindowContext.getMainWindowContext().getIssueFilingServiceProvider()).toEqual( issueFilingServiceProvider, @@ -77,7 +71,6 @@ describe('MainWindowContextTest', () => { targetPageActionMessageCreator, issueFilingActionMessageCreator, userConfigMessageCreator, - environmentInfoProvider, toolData, issueFilingServiceProvider, ); @@ -85,7 +78,6 @@ describe('MainWindowContextTest', () => { const devToolStoreLocal: any = { name: 'devToolStoreLocal' }; const userConfigStoreLocal: any = { name: 'userConfigStoreLocal' }; const devToolActionMessageCreatorLocal: any = { name: 'devToolActionMessageCreatorLocal' }; - const environmentInfoProviderLocal: any = { name: 'environmentInfoProviderLocal' }; const toolDataLocal: any = { name: 'toolDataLocal' }; const issueFilingServiceProviderLocal: any = { name: 'issueFilingServiceProviderLocal' }; const userConfigMessageCreatorLocal: any = { name: 'userConfigMessageCreatorLocal' }; @@ -97,7 +89,6 @@ describe('MainWindowContextTest', () => { targetPageActionMessageCreator, issueFilingActionMessageCreator, userConfigMessageCreatorLocal, - environmentInfoProviderLocal, toolDataLocal, issueFilingServiceProviderLocal, ); @@ -114,9 +105,6 @@ describe('MainWindowContextTest', () => { expect(mainWindowContextGiven.getUserConfigMessageCreator()).toEqual( userConfigMessageCreatorLocal, ); - expect(mainWindowContextGiven.getEnvironmentInfoProvider()).toEqual( - environmentInfoProviderLocal, - ); expect(mainWindowContextGiven.getToolData()).toEqual(toolDataLocal); expect(mainWindowContextGiven.getIssueFilingServiceProvider()).toEqual( issueFilingServiceProviderLocal, @@ -134,9 +122,6 @@ describe('MainWindowContextTest', () => { expect(mainWindowContextNotGiven.getUserConfigMessageCreator()).toEqual( userConfigMessageCreator, ); - expect(mainWindowContextNotGiven.getEnvironmentInfoProvider()).toEqual( - environmentInfoProvider, - ); expect(mainWindowContextNotGiven.getToolData()).toEqual(toolData); expect(mainWindowContextNotGiven.getIssueFilingServiceProvider()).toEqual( issueFilingServiceProvider, diff --git a/src/tests/unit/tests/reports/components/report-sections/report-footer.test.tsx b/src/tests/unit/tests/reports/components/report-sections/report-footer.test.tsx index abb1058ae92..7333f05293e 100644 --- a/src/tests/unit/tests/reports/components/report-sections/report-footer.test.tsx +++ b/src/tests/unit/tests/reports/components/report-sections/report-footer.test.tsx @@ -1,18 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { EnvironmentInfo } from 'common/environment-info-provider'; +import { ToolData } from 'common/types/store-data/unified-data-interface'; import { shallow } from 'enzyme'; import * as React from 'react'; import { ReportFooter } from 'reports/components/report-sections/report-footer'; describe('ReportFooter', () => { it('renders', () => { - const environmentInfo: EnvironmentInfo = { - extensionVersion: '1.2.3', - browserSpec: 'dummy browser version 1.0.1', - axeCoreVersion: '4.5.6', + const toolData: ToolData = { + scanEngineProperties: { + name: 'engine-name', + version: 'engine-version', + }, + applicationProperties: { + name: 'app-name', + version: 'app-version', + environmentName: 'environmentName', + }, }; - const wrapper = shallow(Footer Text); + + const wrapper = shallow(Footer Text); expect(wrapper.getElement()).toMatchSnapshot(); }); diff --git a/src/tests/unit/tests/reports/package/__snapshots__/footer-text-for-service.test.tsx.snap b/src/tests/unit/tests/reports/package/__snapshots__/footer-text-for-service.test.tsx.snap index 71ead76e2f4..d0973c7c916 100644 --- a/src/tests/unit/tests/reports/package/__snapshots__/footer-text-for-service.test.tsx.snap +++ b/src/tests/unit/tests/reports/package/__snapshots__/footer-text-for-service.test.tsx.snap @@ -3,9 +3,11 @@ exports[`FooterTextForService renders: footer 1`] = ` This automated checks result was generated using the - ClientService + app-name + + that helps find some of the most common accessibility issues. The scan was performed using + engine-name - that helps find some of the most common accessibility issues. The scan was performed using axe-core engine-version and environmentName diff --git a/src/tests/unit/tests/reports/package/__snapshots__/integration.test.ts.snap b/src/tests/unit/tests/reports/package/__snapshots__/integration.test.ts.snap index 84cd838cfc4..1b317b977e0 100644 --- a/src/tests/unit/tests/reports/package/__snapshots__/integration.test.ts.snap +++ b/src/tests/unit/tests/reports/package/__snapshots__/integration.test.ts.snap @@ -7140,7 +7140,7 @@ exports[`report package integration with issues 1`] = ` class="report-footer" role="contentinfo" > - This automated checks result was generated using the Accessibility Insights Service that helps find some of the most common accessibility issues. The scan was performed using axe-core 3.3.2 and Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/78.0.3904.108 Safari/537.36. For a complete WCAG 2.1 compliance assessment please visit + This automated checks result was generated using Accessibility Insights Service (axe-core 3.3.2), a tool that helps debug and find accessibility issues earlier on Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/78.0.3904.108 Safari/537.36. Get more information & download this tool at - This automated checks result was generated using the Accessibility Insights Service that helps find some of the most common accessibility issues. The scan was performed using axe-core 3.3.2 and Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/78.0.3904.108 Safari/537.36. For a complete WCAG 2.1 compliance assessment please visit + This automated checks result was generated using Accessibility Insights Service (axe-core 3.3.2), a tool that helps debug and find accessibility issues earlier on Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/78.0.3904.108 Safari/537.36. Get more information & download this tool at { toolData, } as ScanMetadata; - const FooterText = FooterTextForService('ClientService'); - const footerWrapper = shallow(); + const footerWrapper = shallow(); expect(footerWrapper.getElement()).toMatchSnapshot('footer'); }); }); diff --git a/yarn.lock b/yarn.lock index f08e3fa1746..da788463d1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -791,10 +791,10 @@ jest-diff "^25.2.1" pretty-format "^25.2.1" -"@types/jsdom@^16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.2.tgz#5d820a9578ccb8ac20afecdc141479aa77167dd0" - integrity sha512-QP2IQ5d65WtIMfQwttqFVFgMNikqeWO8mwUCfLrHDI4ijwb5qGhzPEm2ajWr2rlcCnjWeoYeb7Jx3+mtZGWMBw== +"@types/jsdom@^16.2.3": + version "16.2.3" + resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-16.2.3.tgz#c6feadfe0836389b27f9c911cde82cd32e91c537" + integrity sha512-BREatezSn74rmLIDksuqGNFUTi9HNAWWQXYpFBFLK9U6wlMCO4M0QCa8CMpDsZQuqxSO9XifVLT5Q1P0vgKLqw== dependencies: "@types/node" "*" "@types/parse5" "*" @@ -866,10 +866,10 @@ dependencies: "@types/node" "*" -"@types/q@^1.5.3": - version "1.5.3" - resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.3.tgz#69047ef831f0e5849a3855a25e019850413dc922" - integrity sha512-I3wR8FNrk9ny4zJzSB1FBpPHw8kv+eVapS3Hkw+QAF7WCIF7foiEj0GcWFR5mwzw/HUMrLBD+rO/OKJcLf/v+w== +"@types/q@^1.5.4": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" + integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== "@types/range-parser@*": version "1.2.3" @@ -2505,10 +2505,10 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codecov@^3.6.5: - version "3.6.5" - resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.6.5.tgz#d73ce62e8a021f5249f54b073e6f2d6a513f172a" - integrity sha512-v48WuDMUug6JXwmmfsMzhCHRnhUf8O3duqXvltaYJKrO1OekZWpB/eH6iIoaxMl8Qli0+u3OxptdsBOYiD7VAQ== +codecov@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.7.0.tgz#4a09939cde24447a43f36d068e8b4e0188dc3f27" + integrity sha512-uIixKofG099NbUDyzRk1HdGtaG8O+PBUAg3wfmjwXw2+ek+PZp+puRvbTohqrVfuudaezivJHFgTtSC3M8MXww== dependencies: argv "0.0.2" ignore-walk "3.0.3" @@ -6610,12 +6610,7 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.0.3, mime@^2.4.4: - version "2.4.4" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" - integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== - -mime@^2.4.5: +mime@^2.0.3, mime@^2.4.4, mime@^2.4.5: version "2.4.5" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== @@ -6762,18 +6757,18 @@ mkdirp@0.5.1: dependencies: minimist "0.0.8" -mkdirp@0.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: +mkdirp@1.x, mkdirp@^1.0.3, mkdirp@~1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" -mkdirp@^1.0.3, mkdirp@~1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - moment@*, moment@^2.25.3: version "2.25.3" resolved "https://registry.yarnpkg.com/moment/-/moment-2.25.3.tgz#252ff41319cf41e47761a1a88cab30edfe9808c0" @@ -8039,10 +8034,10 @@ pupa@^2.0.1: dependencies: escape-goat "^2.0.0" -puppeteer@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.4.tgz#f445aae0a6732c65bbb90e963dcd6fd8fde0d780" - integrity sha512-1QEb4tJXXbNId7WSHlcDkS3B4GklTIebKn8Y9D6B7tAdUjQncb+8QlTjbQsAgGX5dhRG32Qycuk5XKzJgLs0sg== +puppeteer@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.1.0.tgz#d44efdc5410809025f38bca2de106c3ae5c85a52" + integrity sha512-jLa9sqdVx0tPnr2FcwAq+8DSjGhSM4YpkwOf3JE22Ycyqm71SW7B5uGfTyMGFoLCmbCozbLZclCjasPb0flTRw== dependencies: debug "^4.1.0" extract-zip "^2.0.0" @@ -8920,16 +8915,16 @@ semver-diff@^3.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@6.x, semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.1.3, semver@^7.2.1, semver@^7.3.2: +semver@7.x, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2: version "7.3.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -9970,10 +9965,10 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" -ts-jest@^25.5.1: - version "25.5.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.5.1.tgz#2913afd08f28385d54f2f4e828be4d261f4337c7" - integrity sha512-kHEUlZMK8fn8vkxDjwbHlxXRB9dHYpyzqKIGDNxbzs+Rz+ssNDSDNusEK8Fk/sDd4xE6iKoQLfFkFVaskmTJyw== +ts-jest@^26.0.0: + version "26.0.0" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.0.0.tgz#957b802978249aaf74180b9dcb17b4fd787ad6f3" + integrity sha512-eBpWH65mGgzobuw7UZy+uPP9lwu+tPp60o324ASRX4Ijg8UC5dl2zcge4kkmqr2Zeuk9FwIjvCTOPuNMEyGWWw== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -9982,8 +9977,8 @@ ts-jest@^25.5.1: lodash.memoize "4.x" make-error "1.x" micromatch "4.x" - mkdirp "0.x" - semver "6.x" + mkdirp "1.x" + semver "7.x" yargs-parser "18.x" ts-loader@^7.0.4: