From 46941658cd152da0a98d8f0ef42be3d5cb860b8f Mon Sep 17 00:00:00 2001 From: Anjali Singh <150343275+v-singhanjal@users.noreply.github.com> Date: Tue, 5 Mar 2024 10:56:11 +0530 Subject: [PATCH] chore: Enzyme replacement in test files- PR 1 of 6 for part 3 of 3 (#7232) #### Details Enzyme replacement in files under src/tests/unit/tests/DetailsView/ ##### Motivation Existing story: [User Story 2142857](https://dev.azure.com/mseng/1ES/_workitems/edit/2142857) Replaced the use of Enzyme in the below files: 1. src/tests/unit/tests/DetailsView/components/status-icon.test.tsx 2. src/tests/unit/tests/DetailsView/components/switcher.test.tsx 3. src/tests/unit/tests/DetailsView/components/tab-stops-failed-instance-section.test.tsx 4. src/tests/unit/tests/DetailsView/components/tab-stops-minimal-requirement-header.test.tsx 5. src/tests/unit/tests/DetailsView/components/tab-stops-requirement-instances-collapsible-content.test.tsx 6. src/tests/unit/tests/DetailsView/components/tab-stops-requirements-with-instances.test.tsx 7. src/tests/unit/tests/DetailsView/components/target-change-dialog.test.tsx 8. src/tests/unit/tests/DetailsView/components/target-page-changed-view.test.tsx 9. src/tests/unit/tests/DetailsView/components/target-page-hidden-bar.test.tsx 10. src/tests/unit/tests/DetailsView/components/test-status-choice-group.test.tsx 11. src/tests/unit/tests/DetailsView/components/test-view-container.test.tsx 12. src/tests/unit/tests/DetailsView/components/transfer-to-assessment-button.test.tsx 13. src/tests/unit/tests/DetailsView/details-view-body.test.tsx 14. src/tests/unit/tests/DetailsView/details-view-container.test.tsx 15. src/tests/unit/tests/DetailsView/details-view-content.test.tsx ##### Context #### Pull request checklist - [x] Addresses an existing issue: [User Story 2142857](https://dev.azure.com/mseng/1ES/_workitems/edit/2142857) - [x] Ran `yarn fastpass` - [x] Added/updated relevant unit test(s) (and ran `yarn test`) - [x] Verified code coverage for the changes made. Check coverage report at: `/test-results/unit/coverage` - [x] PR title *AND* final merge commit title both start with a semantic tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See `CONTRIBUTING.md`. - [n/a] (UI changes only) Added screenshots/GIFs to description above - [n/a] (UI changes only) Verified usability with NVDA/JAWS --------- Co-authored-by: Prachi Naigaonkar --- .../details-view-body.test.tsx.snap | 2312 +++++++++++------ .../details-view-container.test.tsx.snap | 170 +- .../details-view-content.test.tsx.snap | 1022 ++++---- .../__snapshots__/status-icon.test.tsx.snap | 70 +- .../__snapshots__/switcher.test.tsx.snap | 25 +- ...tops-failed-instance-section.test.tsx.snap | 133 +- ...s-minimal-requirement-header.test.tsx.snap | 54 +- ...nstances-collapsible-content.test.tsx.snap | 81 +- ...-requirements-with-instances.test.tsx.snap | 42 +- .../target-change-dialog.test.tsx.snap | 531 ++-- .../target-page-changed-view.test.tsx.snap | 98 +- .../target-page-hidden-bar.test.tsx.snap | 11 +- .../test-status-choice-group.test.tsx.snap | 132 +- ...ransfer-to-assessment-button.test.tsx.snap | 30 +- .../components/status-icon.test.tsx | 27 +- .../DetailsView/components/switcher.test.tsx | 78 +- ...tab-stops-failed-instance-section.test.tsx | 31 +- ...-stops-minimal-requirement-header.test.tsx | 10 +- ...ent-instances-collapsible-content.test.tsx | 38 +- ...stops-requirements-with-instances.test.tsx | 32 +- .../components/target-change-dialog.test.tsx | 98 +- .../target-page-changed-view.test.tsx | 10 +- .../target-page-hidden-bar.test.tsx | 14 +- .../test-status-choice-group.test.tsx | 58 +- .../components/test-view-container.test.tsx | 8 +- .../transfer-to-assessment-button.test.tsx | 16 +- .../DetailsView/details-view-body.test.tsx | 45 +- .../details-view-container.test.tsx | 39 +- .../DetailsView/details-view-content.test.tsx | 27 +- 29 files changed, 3144 insertions(+), 2098 deletions(-) diff --git a/src/tests/unit/tests/DetailsView/__snapshots__/details-view-body.test.tsx.snap b/src/tests/unit/tests/DetailsView/__snapshots__/details-view-body.test.tsx.snap index ef06af01a59..5f3846a2dd2 100644 --- a/src/tests/unit/tests/DetailsView/__snapshots__/details-view-body.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/__snapshots__/details-view-body.test.tsx.snap @@ -1,796 +1,1280 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DetailsViewBody render render 1`] = ` -
+
- + +
+ +
+ +
+ +
+
+
+
+
+ +`; + +exports[`DetailsViewBody render render: FluentSideNav props 1`] = ` +{ + "assessmentStoreData": { + "assessmentNavState": { + "selectedTestSubview": "sample test step", + }, + "assessments": { + "assessment": { + "fullAxeResultsMap": {}, + "generatedAssessmentInstancesMap": {}, + "manualTestStepResultMap": {}, + "testStepStatus": { + "step-1": { + "isStepScanned": false, + "stepFinalResult": 1, }, - "assessments": { - "assessment": { - "fullAxeResultsMap": {}, - "generatedAssessmentInstancesMap": {}, - "manualTestStepResultMap": {}, - "testStepStatus": { - "step-1": { - "isStepScanned": false, - "stepFinalResult": 1, + }, + }, + }, + "persistedTabInfo": {}, + "resultDescription": "", + }, + "automatedChecksCardsViewData": { + "allCardsCollapsed": true, + "cards": { + "fail": [ + { + "description": "sample-description", + "guidance": [ + { + "href": "sample-guidance-href", + "text": "sample-guidance-text", + }, + ], + "id": "some-rule", + "nodes": [ + { + "descriptors": { + "snippet": "this is a sample snippet", + }, + "identifiers": { + "conciseName": "body img", + "css-selector": "body img", + "identifier": "body img", + }, + "resolution": { + "how-to-fix-web": { + "all": [], + "any": [ + "Element does not have an alt attribute", + "aria-label attribute does not exist or is empty", + "aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty", + ], + "none": [], + }, + "howToFixSummary": "sample how to fix summary", + }, + "ruleId": "image-alt", + "status": "fail", + "uid": "some-guid-here", + }, + ], + "url": "sample-url", + }, + ], + "inapplicable": [], + "pass": [], + "unknown": [], + }, + "visualHelperEnabled": true, + }, + "clickHandlerFactory": {}, + "dataTransferViewStoreData": { + "showQuickAssessToAssessmentConfirmDialog": true, + }, + "deps": { + "detailsViewActionMessageCreator": {}, + }, + "detailsViewStoreData": { + "detailsViewRightContentPanel": "Overview", + }, + "featureFlagStoreData": {}, + "isSideNavOpen": false, + "narrowModeStatus": { + "isHeaderAndNavCollapsed": false, + }, + "onRightPanelContentSwitch": [Function], + "rightPanelConfiguration": { + "RightPanel": [Function], + }, + "scanMetadata": { + "targetAppInfo": { + "name": "name", + "url": "url", + }, + }, + "selectedPivot": 0, + "selectedTest": -1, + "setSideNavOpen": [Function], + "switcherNavConfiguration": { + "CommandBar": [MockFunction] { + "calls": [ + [ + { + "assessmentStoreData": { + "assessmentNavState": { + "selectedTestSubview": "sample test step", + }, + "assessments": { + "assessment": { + "fullAxeResultsMap": {}, + "generatedAssessmentInstancesMap": {}, + "manualTestStepResultMap": {}, + "testStepStatus": { + "step-1": { + "isStepScanned": false, + "stepFinalResult": 1, + }, + }, + }, + }, + "persistedTabInfo": {}, + "resultDescription": "", + }, + "automatedChecksCardsViewData": { + "allCardsCollapsed": true, + "cards": { + "fail": [ + { + "description": "sample-description", + "guidance": [ + { + "href": "sample-guidance-href", + "text": "sample-guidance-text", + }, + ], + "id": "some-rule", + "nodes": [ + { + "descriptors": { + "snippet": "this is a sample snippet", + }, + "identifiers": { + "conciseName": "body img", + "css-selector": "body img", + "identifier": "body img", + }, + "resolution": { + "how-to-fix-web": { + "all": [], + "any": [ + "Element does not have an alt attribute", + "aria-label attribute does not exist or is empty", + "aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty", + ], + "none": [], + }, + "howToFixSummary": "sample how to fix summary", + }, + "ruleId": "image-alt", + "status": "fail", + "uid": "some-guid-here", + }, + ], + "url": "sample-url", + }, + ], + "inapplicable": [], + "pass": [], + "unknown": [], + }, + "visualHelperEnabled": true, + }, + "clickHandlerFactory": {}, + "dataTransferViewStoreData": { + "showQuickAssessToAssessmentConfirmDialog": true, + }, + "deps": { + "detailsViewActionMessageCreator": {}, + }, + "detailsViewStoreData": { + "detailsViewRightContentPanel": "Overview", + }, + "featureFlagStoreData": {}, + "isSideNavOpen": false, + "narrowModeStatus": { + "isHeaderAndNavCollapsed": false, + }, + "rightPanelConfiguration": { + "RightPanel": [Function], + }, + "scanMetadata": { + "targetAppInfo": { + "name": "name", + "url": "url", + }, + }, + "selectedTest": -1, + "setSideNavOpen": [Function], + "switcherNavConfiguration": [Circular], + "tabStopsViewStoreData": { + "failureInstanceState": {}, + }, + "tabStoreData": { + "isChanged": false, + "isClosed": false, + "isOriginChanged": false, + "isPageHidden": false, + }, + "visualizationConfigurationFactory": {}, + "visualizationScanResultData": { + "accessibleNames": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "color": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "headings": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "issues": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "landmarks": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "needsReview": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "tabStops": { + "needToCollectTabbingResults": true, + "requirements": { + "focus-indicator": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "input-focus": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "keyboard-navigation": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "keyboard-traps": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "tab-order": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + }, + "tabbedElements": null, + "tabbingCompleted": false, + }, + }, + "visualizationStoreData": { + "focusedTarget": null, + "injectingState": "notInjecting", + "scanning": null, + "selectedAdhocDetailsView": 1, + "selectedDetailsViewPivot": 0, + "selectedFastPassDetailsView": 1, + "tests": { + "adhoc": { + "accessibleNames": { + "enabled": false, + }, + "color": { + "enabled": false, + }, + "headings": { + "enabled": false, + }, + "issues": { + "enabled": false, + }, + "landmarks": { + "enabled": false, + }, + "needsReview": { + "enabled": false, + }, + "tabStops": { + "enabled": false, + }, + }, + "assessments": { + "audioVideoOnly": { + "enabled": false, + "stepStatus": {}, + }, + "automated-checks": { + "enabled": false, + "stepStatus": {}, + }, + "cognitive": { + "enabled": false, + "stepStatus": {}, + }, + "color": { + "enabled": false, + "stepStatus": {}, + }, + "contrast": { + "enabled": false, + "stepStatus": {}, + }, + "customWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "errors": { + "enabled": false, + "stepStatus": {}, + }, + "headings": { + "enabled": false, + "stepStatus": {}, + }, + "images": { + "enabled": false, + "stepStatus": {}, + }, + "keyboardInteraction": { + "enabled": false, + "stepStatus": {}, + }, + "landmarks": { + "enabled": false, + "stepStatus": {}, + }, + "language": { + "enabled": false, + "stepStatus": {}, + }, + "linksAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "liveMultimedia": { + "enabled": false, + "stepStatus": {}, + }, + "nativeWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "page": { + "enabled": false, + "stepStatus": {}, + }, + "parsing": { + "enabled": false, + "stepStatus": {}, + }, + "pointerMotion": { + "enabled": false, + "stepStatus": {}, + }, + "prerecordedMultimedia": { + "enabled": false, + "stepStatus": {}, + }, + "repetitiveContent": { + "enabled": false, + "stepStatus": {}, + }, + "semanticsAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "sequence": { + "enabled": false, + "stepStatus": {}, + }, + "textLegibility": { + "enabled": false, + "stepStatus": {}, + }, + "timedEvents": { + "enabled": false, + "stepStatus": {}, + }, + "visibleFocusOrder": { + "enabled": false, + "stepStatus": {}, + }, + }, + "quickAssess": { + "automated-checks": { + "enabled": false, + "stepStatus": {}, + }, + "contrast": { + "enabled": false, + "stepStatus": {}, + }, + "headings": { + "enabled": false, + "stepStatus": {}, + }, + "images": { + "enabled": false, + "stepStatus": {}, + }, + "keyboardInteraction": { + "enabled": false, + "stepStatus": {}, + }, + "linksAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "nativeWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "repetitiveContent": { + "enabled": false, + "stepStatus": {}, + }, + "textLegibility": { + "enabled": false, + "stepStatus": {}, + }, + "visibleFocusOrder": { + "enabled": false, + "stepStatus": {}, + }, }, }, }, }, - "persistedTabInfo": {}, - "resultDescription": "", - } - } - automatedChecksCardsViewData={ + {}, + ], + ], + "results": [ { - "allCardsCollapsed": true, - "cards": { - "fail": [ + "type": "return", + "value": , + }, + ], + }, + "LeftNav": [Function], + "ReportExportDialogFactory": [Function], + "StartOverComponentFactory": {}, + }, + "tabStopsViewStoreData": { + "failureInstanceState": {}, + }, + "tabStoreData": { + "isChanged": false, + "isClosed": false, + "isOriginChanged": false, + "isPageHidden": false, + }, + "visualizationConfigurationFactory": {}, + "visualizationScanResultData": { + "accessibleNames": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "color": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "headings": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "issues": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "landmarks": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "needsReview": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "tabStops": { + "needToCollectTabbingResults": true, + "requirements": { + "focus-indicator": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "input-focus": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "keyboard-navigation": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "keyboard-traps": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "tab-order": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + }, + "tabbedElements": null, + "tabbingCompleted": false, + }, + }, + "visualizationStoreData": { + "focusedTarget": null, + "injectingState": "notInjecting", + "scanning": null, + "selectedAdhocDetailsView": 1, + "selectedDetailsViewPivot": 0, + "selectedFastPassDetailsView": 1, + "tests": { + "adhoc": { + "accessibleNames": { + "enabled": false, + }, + "color": { + "enabled": false, + }, + "headings": { + "enabled": false, + }, + "issues": { + "enabled": false, + }, + "landmarks": { + "enabled": false, + }, + "needsReview": { + "enabled": false, + }, + "tabStops": { + "enabled": false, + }, + }, + "assessments": { + "audioVideoOnly": { + "enabled": false, + "stepStatus": {}, + }, + "automated-checks": { + "enabled": false, + "stepStatus": {}, + }, + "cognitive": { + "enabled": false, + "stepStatus": {}, + }, + "color": { + "enabled": false, + "stepStatus": {}, + }, + "contrast": { + "enabled": false, + "stepStatus": {}, + }, + "customWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "errors": { + "enabled": false, + "stepStatus": {}, + }, + "headings": { + "enabled": false, + "stepStatus": {}, + }, + "images": { + "enabled": false, + "stepStatus": {}, + }, + "keyboardInteraction": { + "enabled": false, + "stepStatus": {}, + }, + "landmarks": { + "enabled": false, + "stepStatus": {}, + }, + "language": { + "enabled": false, + "stepStatus": {}, + }, + "linksAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "liveMultimedia": { + "enabled": false, + "stepStatus": {}, + }, + "nativeWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "page": { + "enabled": false, + "stepStatus": {}, + }, + "parsing": { + "enabled": false, + "stepStatus": {}, + }, + "pointerMotion": { + "enabled": false, + "stepStatus": {}, + }, + "prerecordedMultimedia": { + "enabled": false, + "stepStatus": {}, + }, + "repetitiveContent": { + "enabled": false, + "stepStatus": {}, + }, + "semanticsAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "sequence": { + "enabled": false, + "stepStatus": {}, + }, + "textLegibility": { + "enabled": false, + "stepStatus": {}, + }, + "timedEvents": { + "enabled": false, + "stepStatus": {}, + }, + "visibleFocusOrder": { + "enabled": false, + "stepStatus": {}, + }, + }, + "quickAssess": { + "automated-checks": { + "enabled": false, + "stepStatus": {}, + }, + "contrast": { + "enabled": false, + "stepStatus": {}, + }, + "headings": { + "enabled": false, + "stepStatus": {}, + }, + "images": { + "enabled": false, + "stepStatus": {}, + }, + "keyboardInteraction": { + "enabled": false, + "stepStatus": {}, + }, + "linksAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "nativeWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "repetitiveContent": { + "enabled": false, + "stepStatus": {}, + }, + "textLegibility": { + "enabled": false, + "stepStatus": {}, + }, + "visibleFocusOrder": { + "enabled": false, + "stepStatus": {}, + }, + }, + }, + }, +} +`; + +exports[`DetailsViewBody render render: QuickAssessCommandBar props 1`] = ` +{ + "assessmentStoreData": { + "assessmentNavState": { + "selectedTestSubview": "sample test step", + }, + "assessments": { + "assessment": { + "fullAxeResultsMap": {}, + "generatedAssessmentInstancesMap": {}, + "manualTestStepResultMap": {}, + "testStepStatus": { + "step-1": { + "isStepScanned": false, + "stepFinalResult": 1, }, - } - } - visualizationStoreData={ + }, + }, + }, + "persistedTabInfo": {}, + "resultDescription": "", + }, + "automatedChecksCardsViewData": { + "allCardsCollapsed": true, + "cards": { + "fail": [ { - "focusedTarget": null, - "injectingState": "notInjecting", - "scanning": null, - "selectedAdhocDetailsView": 1, - "selectedDetailsViewPivot": 0, - "selectedFastPassDetailsView": 1, - "tests": { - "adhoc": { - "accessibleNames": { - "enabled": false, - }, - "color": { - "enabled": false, - }, - "headings": { - "enabled": false, - }, - "issues": { - "enabled": false, - }, - "landmarks": { - "enabled": false, - }, - "needsReview": { - "enabled": false, - }, - "tabStops": { - "enabled": false, - }, - }, - "assessments": { - "audioVideoOnly": { - "enabled": false, - "stepStatus": {}, - }, - "automated-checks": { - "enabled": false, - "stepStatus": {}, - }, - "cognitive": { - "enabled": false, - "stepStatus": {}, - }, - "color": { - "enabled": false, - "stepStatus": {}, - }, - "contrast": { - "enabled": false, - "stepStatus": {}, - }, - "customWidgets": { - "enabled": false, - "stepStatus": {}, - }, - "errors": { - "enabled": false, - "stepStatus": {}, - }, - "headings": { - "enabled": false, - "stepStatus": {}, - }, - "images": { - "enabled": false, - "stepStatus": {}, - }, - "keyboardInteraction": { - "enabled": false, - "stepStatus": {}, - }, - "landmarks": { - "enabled": false, - "stepStatus": {}, - }, - "language": { - "enabled": false, - "stepStatus": {}, - }, - "linksAssessment": { - "enabled": false, - "stepStatus": {}, - }, - "liveMultimedia": { - "enabled": false, - "stepStatus": {}, - }, - "nativeWidgets": { - "enabled": false, - "stepStatus": {}, - }, - "page": { - "enabled": false, - "stepStatus": {}, - }, - "parsing": { - "enabled": false, - "stepStatus": {}, - }, - "pointerMotion": { - "enabled": false, - "stepStatus": {}, - }, - "prerecordedMultimedia": { - "enabled": false, - "stepStatus": {}, - }, - "repetitiveContent": { - "enabled": false, - "stepStatus": {}, - }, - "semanticsAssessment": { - "enabled": false, - "stepStatus": {}, - }, - "sequence": { - "enabled": false, - "stepStatus": {}, - }, - "textLegibility": { - "enabled": false, - "stepStatus": {}, - }, - "timedEvents": { - "enabled": false, - "stepStatus": {}, - }, - "visibleFocusOrder": { - "enabled": false, - "stepStatus": {}, - }, + "description": "sample-description", + "guidance": [ + { + "href": "sample-guidance-href", + "text": "sample-guidance-text", }, - "quickAssess": { - "automated-checks": { - "enabled": false, - "stepStatus": {}, - }, - "contrast": { - "enabled": false, - "stepStatus": {}, - }, - "headings": { - "enabled": false, - "stepStatus": {}, - }, - "images": { - "enabled": false, - "stepStatus": {}, - }, - "keyboardInteraction": { - "enabled": false, - "stepStatus": {}, - }, - "linksAssessment": { - "enabled": false, - "stepStatus": {}, - }, - "nativeWidgets": { - "enabled": false, - "stepStatus": {}, - }, - "repetitiveContent": { - "enabled": false, - "stepStatus": {}, + ], + "id": "some-rule", + "nodes": [ + { + "descriptors": { + "snippet": "this is a sample snippet", }, - "textLegibility": { - "enabled": false, - "stepStatus": {}, + "identifiers": { + "conciseName": "body img", + "css-selector": "body img", + "identifier": "body img", }, - "visibleFocusOrder": { - "enabled": false, - "stepStatus": {}, - }, - }, - }, - } - } - /> -
- -
- -
- - -
-
-
- - + />, + }, + ], + }, + "LeftNav": [Function], + "ReportExportDialogFactory": [Function], + "StartOverComponentFactory": {}, + }, + "tabStopsViewStoreData": { + "failureInstanceState": {}, + }, + "tabStoreData": { + "isChanged": false, + "isClosed": false, + "isOriginChanged": false, + "isPageHidden": false, + }, + "visualizationConfigurationFactory": {}, + "visualizationScanResultData": { + "accessibleNames": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "color": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "headings": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "issues": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "landmarks": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "needsReview": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "tabStops": { + "needToCollectTabbingResults": true, + "requirements": { + "focus-indicator": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "input-focus": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "keyboard-navigation": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "keyboard-traps": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "tab-order": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + }, + "tabbedElements": null, + "tabbingCompleted": false, + }, + }, + "visualizationStoreData": { + "focusedTarget": null, + "injectingState": "notInjecting", + "scanning": null, + "selectedAdhocDetailsView": 1, + "selectedDetailsViewPivot": 0, + "selectedFastPassDetailsView": 1, + "tests": { + "adhoc": { + "accessibleNames": { + "enabled": false, + }, + "color": { + "enabled": false, + }, + "headings": { + "enabled": false, + }, + "issues": { + "enabled": false, + }, + "landmarks": { + "enabled": false, + }, + "needsReview": { + "enabled": false, + }, + "tabStops": { + "enabled": false, + }, + }, + "assessments": { + "audioVideoOnly": { + "enabled": false, + "stepStatus": {}, + }, + "automated-checks": { + "enabled": false, + "stepStatus": {}, + }, + "cognitive": { + "enabled": false, + "stepStatus": {}, + }, + "color": { + "enabled": false, + "stepStatus": {}, + }, + "contrast": { + "enabled": false, + "stepStatus": {}, + }, + "customWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "errors": { + "enabled": false, + "stepStatus": {}, + }, + "headings": { + "enabled": false, + "stepStatus": {}, + }, + "images": { + "enabled": false, + "stepStatus": {}, + }, + "keyboardInteraction": { + "enabled": false, + "stepStatus": {}, + }, + "landmarks": { + "enabled": false, + "stepStatus": {}, + }, + "language": { + "enabled": false, + "stepStatus": {}, + }, + "linksAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "liveMultimedia": { + "enabled": false, + "stepStatus": {}, + }, + "nativeWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "page": { + "enabled": false, + "stepStatus": {}, + }, + "parsing": { + "enabled": false, + "stepStatus": {}, + }, + "pointerMotion": { + "enabled": false, + "stepStatus": {}, + }, + "prerecordedMultimedia": { + "enabled": false, + "stepStatus": {}, + }, + "repetitiveContent": { + "enabled": false, + "stepStatus": {}, + }, + "semanticsAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "sequence": { + "enabled": false, + "stepStatus": {}, + }, + "textLegibility": { + "enabled": false, + "stepStatus": {}, + }, + "timedEvents": { + "enabled": false, + "stepStatus": {}, + }, + "visibleFocusOrder": { + "enabled": false, + "stepStatus": {}, + }, + }, + "quickAssess": { + "automated-checks": { + "enabled": false, + "stepStatus": {}, + }, + "contrast": { + "enabled": false, + "stepStatus": {}, + }, + "headings": { + "enabled": false, + "stepStatus": {}, + }, + "images": { + "enabled": false, + "stepStatus": {}, + }, + "keyboardInteraction": { + "enabled": false, + "stepStatus": {}, + }, + "linksAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "nativeWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "repetitiveContent": { + "enabled": false, + "stepStatus": {}, + }, + "textLegibility": { + "enabled": false, + "stepStatus": {}, + }, + "visibleFocusOrder": { + "enabled": false, + "stepStatus": {}, + }, + }, + }, + }, +} +`; + +exports[`DetailsViewBody render render: QuickAssessToAssessmentConfirmDialog props 1`] = ` +{ + "deps": { + "detailsViewActionMessageCreator": {}, + }, + "isShown": true, +} +`; + +exports[`DetailsViewBody render render: TargetPageHiddenBar props 1`] = ` +{ + "isTargetPageHidden": false, +} `; diff --git a/src/tests/unit/tests/DetailsView/__snapshots__/details-view-container.test.tsx.snap b/src/tests/unit/tests/DetailsView/__snapshots__/details-view-container.test.tsx.snap index bf3aa46d049..dde75107033 100644 --- a/src/tests/unit/tests/DetailsView/__snapshots__/details-view-container.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/__snapshots__/details-view-container.test.tsx.snap @@ -1,15 +1,26 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DetailsViewContainer render content render once; should call details view opened 1`] = ` - + + +`; + +exports[`DetailsViewContainer render content render once; should call details view opened: NarrowModeDetector props 1`] = ` +{ + "Component": [Function], + "childrenProps": { + "deps": { "detailsViewActionMessageCreator": [typemoq mock object], "storesHub": [typemoq mock object], - } - } - storeState={ - { + }, + "isSideNavOpen": false, + "setSideNavOpen": [Function], + "storeState": { "tabStoreData": { "isClosed": false, "isOriginChanged": false, @@ -17,81 +28,102 @@ exports[`DetailsViewContainer render content render once; should call details vi "visualizationStoreData": { "selectedDetailsViewPivot": -1, }, - } - } -/> + }, + }, + "deps": { + "detailsViewActionMessageCreator": [typemoq mock object], + "storesHub": [typemoq mock object], + }, + "isNarrowModeEnabled": true, +} `; exports[`DetailsViewContainer render content show NoContentAvailable when stores are not loaded 1`] = ` - - + - - + + +`; + +exports[`DetailsViewContainer render content show NoContentAvailable when stores are not loaded: NarrowModeDetector props 1`] = ` +{ + "Component": [Function], + "childrenProps": { + "deps": { + "storesHub": [typemoq mock object], + }, + }, + "deps": { + "storesHub": [typemoq mock object], + }, + "isNarrowModeEnabled": false, +} `; exports[`DetailsViewContainer render content show NoContentAvailable when target tab is closed 1`] = ` - - + - - + + +`; + +exports[`DetailsViewContainer render content show NoContentAvailable when target tab is closed: NarrowModeDetector props 1`] = ` +{ + "Component": [Function], + "childrenProps": { + "deps": { + "storesHub": [typemoq mock object], + }, + }, + "deps": { + "storesHub": [typemoq mock object], + }, + "isNarrowModeEnabled": true, +} `; exports[`DetailsViewContainer render content shows NoContentAvailable when target page is changed and no permissions granted 1`] = ` - - + - - + + +`; + +exports[`DetailsViewContainer render content shows NoContentAvailable when target page is changed and no permissions granted: NarrowModeDetector props 1`] = ` +{ + "Component": [Function], + "childrenProps": { + "deps": { + "storesHub": [typemoq mock object], + }, + }, + "deps": { + "storesHub": [typemoq mock object], + }, + "isNarrowModeEnabled": true, +} `; exports[`DetailsViewContainer render renders spinner when stores not ready 1`] = ` - + + + `; + +exports[`DetailsViewContainer render renders spinner when stores not ready: NarrowModeDetector props 1`] = `undefined`; diff --git a/src/tests/unit/tests/DetailsView/__snapshots__/details-view-content.test.tsx.snap b/src/tests/unit/tests/DetailsView/__snapshots__/details-view-content.test.tsx.snap index dd76de7148d..9c3a00d337a 100644 --- a/src/tests/unit/tests/DetailsView/__snapshots__/details-view-content.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/__snapshots__/details-view-content.test.tsx.snap @@ -1,170 +1,248 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DetailsViewContent render renders normally 1`] = ` - - + - + + +`; + +exports[`DetailsViewContent render renders normally: DetailsViewBody props 1`] = ` +{ + "assessmentCardsViewData": { + "allCardsCollapsed": true, + }, + "assessmentInstanceTableHandler": [typemoq mock object], + "assessmentStoreData": { + "assessmentNavState": { + "selectedTestSubview": null, + "selectedTestType": null, + }, + "assessments": {}, + "persistedTabInfo": null, + "resultDescription": "", + }, + "automatedChecksCardsViewData": { + "allCardsCollapsed": false, + }, + "cardsViewStoreData": undefined, + "clickHandlerFactory": undefined, + "dataTransferViewStoreData": { + "showQuickAssessToAssessmentConfirmDialog": false, + }, + "deps": { + "convertAssessmentStoreDataToScanNodeResults": [Function], + "convertUnifiedStoreDataToScanNodeResults": [Function], + "defaultRulesMap": { + "some-rule": { + "a11yCriteria": null, + "help": "some help", + "id": "some-rule", + }, + }, + "detailsViewActionMessageCreator": [typemoq mock object], + "dropdownClickHandler": [typemoq mock object], + "getAssessmentInstanceTableHandler": [Function], + "getCardSelectionViewData": [Function], + "getCardViewData": [Function], + "getDateFromTimestamp": [Function], + "getDetailsRightPanelConfiguration": [Function], + "getDetailsSwitcherNavConfiguration": [Function], + "isResultHighlightUnavailable": [Function], + "storesHub": [typemoq mock object], + "visualizationConfigurationFactory": [typemoq mock object], + }, + "detailsViewStoreData": { + "contentPath": "", + "contentTitle": "", + "currentPanel": { + "isContentOpen": false, + "isPreviewFeaturesOpen": false, + "isScopingOpen": false, + "isSettingsOpen": false, + }, + "detailsViewRightContentPanel": "TestView", + }, + "dropdownClickHandler": [typemoq mock object], + "featureFlagStoreData": { + "logTelemetryToConsole": false, + }, + "getOverviewHeadingIntro": undefined, + "getOverviewHelpSectionAbout": undefined, + "isSideNavOpen": false, + "issuesTableHandler": undefined, + "linkDataSource": undefined, + "narrowModeStatus": { + "isCardFooterCollapsed": false, + "isCommandBarCollapsed": false, + "isHeaderAndNavCollapsed": false, + "isVirtualKeyboardCollapsed": false, + }, + "needsReviewCardsViewData": { + "allCardsCollapsed": true, + "visualHelperEnabled": true, + }, + "pathSnippetStoreData": { + "path": null, + "snippet": null, + }, + "rightPanelConfiguration": {}, + "scanIncompleteWarnings": undefined, + "scanMetadata": { + "targetAppInfo": { + "name": "DetailsViewContainerTest title", + "url": "http://detailsViewContainerTest/url/", + }, + "timespan": { + "scanComplete": 1900-02-02T03:00:00.000Z, + }, + "toolData": { + "applicationProperties": { + "name": "some app", + }, + }, + }, + "selectedTest": -1, + "setSideNavOpen": [Function], + "switcherNavConfiguration": { + "getSelectedAssessmentCardSelectionStoreData": [Function], + "getSelectedAssessmentStoreData": [Function], + "getSelectedDetailsView": [Function], + }, + "tabStopRequirementData": { + "focus-indicator": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "input-focus": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "keyboard-navigation": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "keyboard-traps": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + "tab-order": { + "instances": [], + "isExpanded": false, + "status": "unknown", + }, + }, + "tabStopsViewStoreData": { + "failureInstanceState": { + "actionType": "CREATE", + "description": null, + "isPanelOpen": false, + "selectedInstanceId": null, + "selectedRequirementId": null, + }, + }, + "tabStoreData": { + "id": 1, + "isChanged": false, + "isClosed": false, + "isOriginChanged": false, + "isPageHidden": false, + "title": "DetailsViewContainerTest title", + "url": "http://detailsViewContainerTest/url/", + }, + "testViewContainerProvider": undefined, + "userConfigurationStoreData": { + "bugService": "gitHub", + "bugServicePropertiesMap": { + "gitHub": { + "repository": "gitHub-repository", + }, + }, + "enableHighContrast": false, + "enableTelemetry": true, + "isFirstTime": false, + "lastSelectedHighContrast": false, + "showAutoDetectedFailuresDialog": true, + "showSaveAssessmentDialog": true, + }, + "visualizationConfigurationFactory": [typemoq mock object], + "visualizationScanResultData": { + "accessibleNames": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "color": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "headings": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "issues": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "landmarks": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "needsReview": { + "fullAxeResultsMap": null, + "fullIdToRuleResultMap": null, + "scanResult": null, + }, + "tabStops": { + "needToCollectTabbingResults": true, + "requirements": { "focus-indicator": { "instances": [], "isExpanded": false, @@ -190,360 +268,292 @@ exports[`DetailsViewContent render renders normally 1`] = ` "isExpanded": false, "status": "unknown", }, - } - } - tabStopsViewStoreData={ - { - "failureInstanceState": { - "actionType": "CREATE", - "description": null, - "isPanelOpen": false, - "selectedInstanceId": null, - "selectedRequirementId": null, - }, - } - } - tabStoreData={ - { - "id": 1, - "isChanged": false, - "isClosed": false, - "isOriginChanged": false, - "isPageHidden": false, - "title": "DetailsViewContainerTest title", - "url": "http://detailsViewContainerTest/url/", - } - } - userConfigurationStoreData={ - { - "bugService": "gitHub", - "bugServicePropertiesMap": { - "gitHub": { - "repository": "gitHub-repository", - }, - }, - "enableHighContrast": false, - "enableTelemetry": true, - "isFirstTime": false, - "lastSelectedHighContrast": false, - "showAutoDetectedFailuresDialog": true, - "showSaveAssessmentDialog": true, - } - } - visualizationConfigurationFactory={[typemoq mock object]} - visualizationScanResultData={ - { + }, + "tabbedElements": null, + "tabbingCompleted": false, + }, + }, + "visualizationStoreData": { + "focusedTarget": null, + "injectingState": "notInjecting", + "scanning": null, + "selectedAdhocDetailsView": -1, + "selectedDetailsViewPivot": 0, + "selectedFastPassDetailsView": 1, + "tests": { + "adhoc": { "accessibleNames": { - "fullAxeResultsMap": null, - "fullIdToRuleResultMap": null, - "scanResult": null, + "enabled": false, }, "color": { - "fullAxeResultsMap": null, - "fullIdToRuleResultMap": null, - "scanResult": null, + "enabled": false, }, "headings": { - "fullAxeResultsMap": null, - "fullIdToRuleResultMap": null, - "scanResult": null, + "enabled": false, }, "issues": { - "fullAxeResultsMap": null, - "fullIdToRuleResultMap": null, - "scanResult": null, + "enabled": false, }, "landmarks": { - "fullAxeResultsMap": null, - "fullIdToRuleResultMap": null, - "scanResult": null, + "enabled": false, }, "needsReview": { - "fullAxeResultsMap": null, - "fullIdToRuleResultMap": null, - "scanResult": null, + "enabled": false, }, "tabStops": { - "needToCollectTabbingResults": true, - "requirements": { - "focus-indicator": { - "instances": [], - "isExpanded": false, - "status": "unknown", - }, - "input-focus": { - "instances": [], - "isExpanded": false, - "status": "unknown", - }, - "keyboard-navigation": { - "instances": [], - "isExpanded": false, - "status": "unknown", - }, - "keyboard-traps": { - "instances": [], - "isExpanded": false, - "status": "unknown", - }, - "tab-order": { - "instances": [], - "isExpanded": false, - "status": "unknown", - }, - }, - "tabbedElements": null, - "tabbingCompleted": false, - }, - } - } - visualizationStoreData={ - { - "focusedTarget": null, - "injectingState": "notInjecting", - "scanning": null, - "selectedAdhocDetailsView": -1, - "selectedDetailsViewPivot": 0, - "selectedFastPassDetailsView": 1, - "tests": { - "adhoc": { - "accessibleNames": { - "enabled": false, - }, - "color": { - "enabled": false, - }, - "headings": { - "enabled": false, - }, - "issues": { - "enabled": false, - }, - "landmarks": { - "enabled": false, - }, - "needsReview": { - "enabled": false, - }, - "tabStops": { - "enabled": false, - }, - }, - "assessments": { - "audioVideoOnly": { - "enabled": false, - "stepStatus": {}, - }, - "automated-checks": { - "enabled": false, - "stepStatus": {}, - }, - "cognitive": { - "enabled": false, - "stepStatus": {}, - }, - "color": { - "enabled": false, - "stepStatus": {}, - }, - "contrast": { - "enabled": false, - "stepStatus": {}, - }, - "customWidgets": { - "enabled": false, - "stepStatus": {}, - }, - "errors": { - "enabled": false, - "stepStatus": {}, - }, - "headings": { - "enabled": false, - "stepStatus": {}, - }, - "images": { - "enabled": false, - "stepStatus": {}, - }, - "keyboardInteraction": { - "enabled": false, - "stepStatus": {}, - }, - "landmarks": { - "enabled": false, - "stepStatus": {}, - }, - "language": { - "enabled": false, - "stepStatus": {}, - }, - "linksAssessment": { - "enabled": false, - "stepStatus": {}, - }, - "liveMultimedia": { - "enabled": false, - "stepStatus": {}, - }, - "nativeWidgets": { - "enabled": false, - "stepStatus": {}, - }, - "page": { - "enabled": false, - "stepStatus": {}, - }, - "parsing": { - "enabled": false, - "stepStatus": {}, - }, - "pointerMotion": { - "enabled": false, - "stepStatus": {}, - }, - "prerecordedMultimedia": { - "enabled": false, - "stepStatus": {}, - }, - "repetitiveContent": { - "enabled": false, - "stepStatus": {}, - }, - "semanticsAssessment": { - "enabled": false, - "stepStatus": {}, - }, - "sequence": { - "enabled": false, - "stepStatus": {}, - }, - "textLegibility": { - "enabled": false, - "stepStatus": {}, - }, - "timedEvents": { - "enabled": false, - "stepStatus": {}, - }, - "visibleFocusOrder": { - "enabled": false, - "stepStatus": {}, - }, - }, - "quickAssess": { - "automated-checks": { - "enabled": false, - "stepStatus": {}, - }, - "contrast": { - "enabled": false, - "stepStatus": {}, - }, - "headings": { - "enabled": false, - "stepStatus": {}, - }, - "images": { - "enabled": false, - "stepStatus": {}, - }, - "keyboardInteraction": { - "enabled": false, - "stepStatus": {}, - }, - "linksAssessment": { - "enabled": false, - "stepStatus": {}, - }, - "nativeWidgets": { - "enabled": false, - "stepStatus": {}, - }, - "repetitiveContent": { - "enabled": false, - "stepStatus": {}, - }, - "textLegibility": { - "enabled": false, - "stepStatus": {}, - }, - "visibleFocusOrder": { - "enabled": false, - "stepStatus": {}, - }, - }, - }, - } - } - /> - - + "enabled": false, + }, + }, + "assessments": { + "audioVideoOnly": { + "enabled": false, + "stepStatus": {}, + }, + "automated-checks": { + "enabled": false, + "stepStatus": {}, + }, + "cognitive": { + "enabled": false, + "stepStatus": {}, + }, + "color": { + "enabled": false, + "stepStatus": {}, + }, + "contrast": { + "enabled": false, + "stepStatus": {}, + }, + "customWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "errors": { + "enabled": false, + "stepStatus": {}, + }, + "headings": { + "enabled": false, + "stepStatus": {}, + }, + "images": { + "enabled": false, + "stepStatus": {}, + }, + "keyboardInteraction": { + "enabled": false, + "stepStatus": {}, + }, + "landmarks": { + "enabled": false, + "stepStatus": {}, + }, + "language": { + "enabled": false, + "stepStatus": {}, + }, + "linksAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "liveMultimedia": { + "enabled": false, + "stepStatus": {}, + }, + "nativeWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "page": { + "enabled": false, + "stepStatus": {}, + }, + "parsing": { + "enabled": false, + "stepStatus": {}, + }, + "pointerMotion": { + "enabled": false, + "stepStatus": {}, + }, + "prerecordedMultimedia": { + "enabled": false, + "stepStatus": {}, + }, + "repetitiveContent": { + "enabled": false, + "stepStatus": {}, + }, + "semanticsAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "sequence": { + "enabled": false, + "stepStatus": {}, + }, + "textLegibility": { + "enabled": false, + "stepStatus": {}, + }, + "timedEvents": { + "enabled": false, + "stepStatus": {}, + }, + "visibleFocusOrder": { + "enabled": false, + "stepStatus": {}, + }, + }, + "quickAssess": { + "automated-checks": { + "enabled": false, + "stepStatus": {}, + }, + "contrast": { + "enabled": false, + "stepStatus": {}, + }, + "headings": { + "enabled": false, + "stepStatus": {}, + }, + "images": { + "enabled": false, + "stepStatus": {}, + }, + "keyboardInteraction": { + "enabled": false, + "stepStatus": {}, + }, + "linksAssessment": { + "enabled": false, + "stepStatus": {}, + }, + "nativeWidgets": { + "enabled": false, + "stepStatus": {}, + }, + "repetitiveContent": { + "enabled": false, + "stepStatus": {}, + }, + "textLegibility": { + "enabled": false, + "stepStatus": {}, + }, + "visibleFocusOrder": { + "enabled": false, + "stepStatus": {}, + }, + }, + }, + }, +} +`; + +exports[`DetailsViewContent render renders normally: DetailsViewOverlay props 1`] = ` +{ + "deps": { + "convertAssessmentStoreDataToScanNodeResults": [Function], + "convertUnifiedStoreDataToScanNodeResults": [Function], + "defaultRulesMap": { + "some-rule": { + "a11yCriteria": null, + "help": "some help", + "id": "some-rule", + }, + }, + "detailsViewActionMessageCreator": [typemoq mock object], + "dropdownClickHandler": [typemoq mock object], + "getAssessmentInstanceTableHandler": [Function], + "getCardSelectionViewData": [Function], + "getCardViewData": [Function], + "getDateFromTimestamp": [Function], + "getDetailsRightPanelConfiguration": [Function], + "getDetailsSwitcherNavConfiguration": [Function], + "isResultHighlightUnavailable": [Function], + "storesHub": [typemoq mock object], + "visualizationConfigurationFactory": [typemoq mock object], + }, + "detailsViewStoreData": { + "contentPath": "", + "contentTitle": "", + "currentPanel": { + "isContentOpen": false, + "isPreviewFeaturesOpen": false, + "isScopingOpen": false, + "isSettingsOpen": false, + }, + "detailsViewRightContentPanel": "TestView", + }, + "featureFlagStoreData": { + "logTelemetryToConsole": false, + }, + "inspectActionMessageCreator": undefined, + "previewFeatureFlagsHandler": undefined, + "scopingActionMessageCreator": undefined, + "scopingStoreData": { + "selectors": { + "exclude": [], + "include": [], + }, + }, + "userConfigurationStoreData": { + "bugService": "gitHub", + "bugServicePropertiesMap": { + "gitHub": { + "repository": "gitHub-repository", + }, + }, + "enableHighContrast": false, + "enableTelemetry": true, + "isFirstTime": false, + "lastSelectedHighContrast": false, + "showAutoDetectedFailuresDialog": true, + "showSaveAssessmentDialog": true, + }, +} +`; + +exports[`DetailsViewContent render renders normally: InteractiveHeader props 1`] = ` +{ + "deps": { + "convertAssessmentStoreDataToScanNodeResults": [Function], + "convertUnifiedStoreDataToScanNodeResults": [Function], + "defaultRulesMap": { + "some-rule": { + "a11yCriteria": null, + "help": "some help", + "id": "some-rule", + }, + }, + "detailsViewActionMessageCreator": [typemoq mock object], + "dropdownClickHandler": [typemoq mock object], + "getAssessmentInstanceTableHandler": [Function], + "getCardSelectionViewData": [Function], + "getCardViewData": [Function], + "getDateFromTimestamp": [Function], + "getDetailsRightPanelConfiguration": [Function], + "getDetailsSwitcherNavConfiguration": [Function], + "isResultHighlightUnavailable": [Function], + "storesHub": [typemoq mock object], + "visualizationConfigurationFactory": [typemoq mock object], + }, + "featureFlagStoreData": { + "logTelemetryToConsole": false, + }, + "isSideNavOpen": false, + "narrowModeStatus": { + "isCardFooterCollapsed": false, + "isCommandBarCollapsed": false, + "isHeaderAndNavCollapsed": false, + "isVirtualKeyboardCollapsed": false, + }, + "navMenu": undefined, + "selectedPivot": 0, + "setSideNavOpen": [Function], + "tabClosed": false, +} `; diff --git a/src/tests/unit/tests/DetailsView/components/__snapshots__/status-icon.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/__snapshots__/status-icon.test.tsx.snap index d5c0fa2f438..8cd2953226a 100644 --- a/src/tests/unit/tests/DetailsView/components/__snapshots__/status-icon.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/__snapshots__/status-icon.test.tsx.snap @@ -1,46 +1,56 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`StatusIcon render for FAIL 1`] = ` - + + + `; exports[`StatusIcon render for PASS 1`] = ` - + + + `; exports[`StatusIcon render for PASS with extra class name 1`] = ` - + + + `; exports[`StatusIcon render for UNKNOWN 1`] = ` - + + + `; exports[`StatusIcon render for default 1`] = ` - + + + `; diff --git a/src/tests/unit/tests/DetailsView/components/__snapshots__/switcher.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/__snapshots__/switcher.test.tsx.snap index 33b1e128a32..471619bc465 100644 --- a/src/tests/unit/tests/DetailsView/components/__snapshots__/switcher.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/__snapshots__/switcher.test.tsx.snap @@ -30,22 +30,29 @@ exports[`Switcher props dropdown has correct options 1`] = ` `; exports[`Switcher renders Switcher itself matches snapshot 1`] = ` -"
- -
" + +
+ +
+
`; exports[`Switcher renders option renderer override matches snapshot 1`] = ` - - FastPass - + /> `; diff --git a/src/tests/unit/tests/DetailsView/components/__snapshots__/tab-stops-failed-instance-section.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/__snapshots__/tab-stops-failed-instance-section.test.tsx.snap index e76b4c91948..ab03b87ef0f 100644 --- a/src/tests/unit/tests/DetailsView/components/__snapshots__/tab-stops-failed-instance-section.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/__snapshots__/tab-stops-failed-instance-section.test.tsx.snap @@ -1,78 +1,87 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`TabStopsFailedInstanceSection does not render when no results are failing 1`] = `null`; +exports[`TabStopsFailedInstanceSection does not render when no results are failing 1`] = ``; exports[`TabStopsFailedInstanceSection does renders when no results are failing and set to alwaysRenderSection 1`] = ` -
- +
- + + + - - -
+
+
`; exports[`TabStopsFailedInstanceSection renders with failing results 1`] = ` -
- +
- + + + - - + +`; + +exports[`TabStopsFailedInstanceSection renders with failing results: TabStopsRequirementsWithInstances props 1`] = ` +{ + "deps": {}, + "getCollapsibleComponentPropsWithInstance": [Function], + "headingLevel": 3, + "results": [ + { + "description": "All interactive elements can be reached using the Tab and arrow keys. (Partially automated)", + "id": "keyboard-navigation", + "instances": [ { - "description": "All interactive elements can be reached using the Tab and arrow keys. (Partially automated)", - "id": "keyboard-navigation", - "instances": [ - { - "description": "test desc 1", - "id": "test-id-1", - }, - ], - "isExpanded": false, - "name": "Keyboard navigation", + "description": "test desc 1", + "id": "test-id-1", }, + ], + "isExpanded": false, + "name": "Keyboard navigation", + }, + { + "description": "There are no interactive elements that “trap” input focus and prevent navigating away. (Partially automated)", + "id": "keyboard-traps", + "instances": [ { - "description": "There are no interactive elements that “trap” input focus and prevent navigating away. (Partially automated)", - "id": "keyboard-traps", - "instances": [ - { - "description": "test desc 2", - "id": "test-id-2", - }, - ], - "isExpanded": false, - "name": "Keyboard traps", + "description": "test desc 2", + "id": "test-id-2", }, - ] - } - /> -
+ ], + "isExpanded": false, + "name": "Keyboard traps", + }, + ], +} `; diff --git a/src/tests/unit/tests/DetailsView/components/__snapshots__/tab-stops-minimal-requirement-header.test.tsx.snap b/src/tests/unit/tests/DetailsView/components/__snapshots__/tab-stops-minimal-requirement-header.test.tsx.snap index 0522547952e..dfad718e097 100644 --- a/src/tests/unit/tests/DetailsView/components/__snapshots__/tab-stops-minimal-requirement-header.test.tsx.snap +++ b/src/tests/unit/tests/DetailsView/components/__snapshots__/tab-stops-minimal-requirement-header.test.tsx.snap @@ -1,33 +1,35 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`TabStopsMinimalRequirementHeader renders 1`] = ` - - -