accessibility-insights-web/.gitignore

29 строки
391 B
Plaintext
Исходник Обычный вид История

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Visual Studio working files
.vs/
*.suo
*.user
2019-01-05 00:29:37 +03:00
# Output of build/deploy tasks
/ref/
/extension/
/package/
test(combined-report-ui): establish monorepo setup with new empty report-e2e-tests package (#3494) #### Description of changes This PR adds a new packages at `/packages/report-e2e-tests`. We'll be using this as part of the combined-report-ui feature to test report generation as it would work in real usage (ie, across package boundaries and with proper style embedding), but this also has the secondary benefit of setting up a lot of the infrastructure we'll be using for migrating the rest of the repo to the lerna/yarn workspaces monorepo format. Specifically, for generalized changes, it: * Adds a new devDependency on lerna * Establishes a `lerna.json` and a root level package.json `workspaces` property to establish the root of the repo as a yarn worktree/lerna monorepo (similar to the setup that service uses) * Updates a variety of ignore/lint tool rules to ignore build output directories in subdirectories, not just the root * Splits out the parts of `tsconfig.json` that will be shared among packages into `tsconfig.base.json` (the same layout that service uses) Specific to the new `report-e2e-tests` package (empty with a placeholder test for now), it also: * Creates the empty package, set up with typescript/jest/etc and a placeholder test * Adds a root-level `yarn test:report:e2e` that runs the tests * Adds a step to run the tests in CI/PR builds Using yarn workspaces means that `yarn install` from the root like usual will cover all the requirements for installing the new package's dependencies. I used `lerna` to implement `yarn test:report:e2e` mostly as a POC (you could technically invoke `jest --projects packages/report-e2e-tests` and it would work equally well) This PR **does not migrate /src to /packages/web/src** - instead, it leaves package.json to act as *both* the worktree root (the aggregator of workspaces) and *also* an individual workspace root representing web/unified/etc. This is supported by yarn, but not what we want to use long-term, since it's a bit confusing; this is an incremental step on the way towards using a layout closer to what service uses. Out of scope for this PR: * Migrating existing web code to `/packages/web` * Migrating existing report package code to `/packages/report` * Migrating the existing report integration tests to `/packages/report-e2e-tests` * Extracting common Jest configuration to a `jest.config.base.js` like service does (this required a lot of changes, so I left it for a separate PR) #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [x] Addresses an existing issue: 1783601 - [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: `<rootDir>/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
2020-10-21 00:31:59 +03:00
test: convert mock-adb to .NET (#5720) #### Details This PR migrates `mock-adb` from being a Node.js script packaged into an exe using `pkg` to being a .NET 6.0 console application built as a standalone exe. ##### Motivation The main motivation is to improve the reliability of the unified tests by improving mock-adb performance. The .NET version is more than an order of magnitude faster than the Node.js version due to the high startup time involved to initialize the Node.js runtime, before our code starts running, and mock-adb is invoked tens of times per test for all unified tests of scenarios beyond the "device setup" flow. ##### Context For internal folks, see the recording of our 7/7/22 engineering discussion for more context and team discussion. We considered and rejected a few other approaches, including: * Rewrite in Rust/Go instead of .NET * Move to a different repo as part of the rewrite * Instead of rewriting, rearchitect some of the unified tests to avoid having to shell out to a separate `adb.exe` process so much #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [n/a] Addresses an existing issue: #0000 - [x] Ran `yarn fastpass` - [no] Added/updated relevant unit test(s) (and ran `yarn test`) - [x] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/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
2022-07-12 23:03:08 +03:00
bin/
bundle/
test(combined-report-ui): establish monorepo setup with new empty report-e2e-tests package (#3494) #### Description of changes This PR adds a new packages at `/packages/report-e2e-tests`. We'll be using this as part of the combined-report-ui feature to test report generation as it would work in real usage (ie, across package boundaries and with proper style embedding), but this also has the secondary benefit of setting up a lot of the infrastructure we'll be using for migrating the rest of the repo to the lerna/yarn workspaces monorepo format. Specifically, for generalized changes, it: * Adds a new devDependency on lerna * Establishes a `lerna.json` and a root level package.json `workspaces` property to establish the root of the repo as a yarn worktree/lerna monorepo (similar to the setup that service uses) * Updates a variety of ignore/lint tool rules to ignore build output directories in subdirectories, not just the root * Splits out the parts of `tsconfig.json` that will be shared among packages into `tsconfig.base.json` (the same layout that service uses) Specific to the new `report-e2e-tests` package (empty with a placeholder test for now), it also: * Creates the empty package, set up with typescript/jest/etc and a placeholder test * Adds a root-level `yarn test:report:e2e` that runs the tests * Adds a step to run the tests in CI/PR builds Using yarn workspaces means that `yarn install` from the root like usual will cover all the requirements for installing the new package's dependencies. I used `lerna` to implement `yarn test:report:e2e` mostly as a POC (you could technically invoke `jest --projects packages/report-e2e-tests` and it would work equally well) This PR **does not migrate /src to /packages/web/src** - instead, it leaves package.json to act as *both* the worktree root (the aggregator of workspaces) and *also* an individual workspace root representing web/unified/etc. This is supported by yarn, but not what we want to use long-term, since it's a bit confusing; this is an incremental step on the way towards using a layout closer to what service uses. Out of scope for this PR: * Migrating existing web code to `/packages/web` * Migrating existing report package code to `/packages/report` * Migrating the existing report integration tests to `/packages/report-e2e-tests` * Extracting common Jest configuration to a `jest.config.base.js` like service does (this required a lot of changes, so I left it for a separate PR) #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [x] Addresses an existing issue: 1783601 - [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: `<rootDir>/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
2020-10-21 00:31:59 +03:00
dist/
drop/
test: convert mock-adb to .NET (#5720) #### Details This PR migrates `mock-adb` from being a Node.js script packaged into an exe using `pkg` to being a .NET 6.0 console application built as a standalone exe. ##### Motivation The main motivation is to improve the reliability of the unified tests by improving mock-adb performance. The .NET version is more than an order of magnitude faster than the Node.js version due to the high startup time involved to initialize the Node.js runtime, before our code starts running, and mock-adb is invoked tens of times per test for all unified tests of scenarios beyond the "device setup" flow. ##### Context For internal folks, see the recording of our 7/7/22 engineering discussion for more context and team discussion. We considered and rejected a few other approaches, including: * Rewrite in Rust/Go instead of .NET * Move to a different repo as part of the rewrite * Instead of rewriting, rearchitect some of the unified tests to avoid having to shell out to a separate `adb.exe` process so much #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [n/a] Addresses an existing issue: #0000 - [x] Ran `yarn fastpass` - [no] Added/updated relevant unit test(s) (and ran `yarn test`) - [x] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/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
2022-07-12 23:03:08 +03:00
obj/
test(combined-report-ui): establish monorepo setup with new empty report-e2e-tests package (#3494) #### Description of changes This PR adds a new packages at `/packages/report-e2e-tests`. We'll be using this as part of the combined-report-ui feature to test report generation as it would work in real usage (ie, across package boundaries and with proper style embedding), but this also has the secondary benefit of setting up a lot of the infrastructure we'll be using for migrating the rest of the repo to the lerna/yarn workspaces monorepo format. Specifically, for generalized changes, it: * Adds a new devDependency on lerna * Establishes a `lerna.json` and a root level package.json `workspaces` property to establish the root of the repo as a yarn worktree/lerna monorepo (similar to the setup that service uses) * Updates a variety of ignore/lint tool rules to ignore build output directories in subdirectories, not just the root * Splits out the parts of `tsconfig.json` that will be shared among packages into `tsconfig.base.json` (the same layout that service uses) Specific to the new `report-e2e-tests` package (empty with a placeholder test for now), it also: * Creates the empty package, set up with typescript/jest/etc and a placeholder test * Adds a root-level `yarn test:report:e2e` that runs the tests * Adds a step to run the tests in CI/PR builds Using yarn workspaces means that `yarn install` from the root like usual will cover all the requirements for installing the new package's dependencies. I used `lerna` to implement `yarn test:report:e2e` mostly as a POC (you could technically invoke `jest --projects packages/report-e2e-tests` and it would work equally well) This PR **does not migrate /src to /packages/web/src** - instead, it leaves package.json to act as *both* the worktree root (the aggregator of workspaces) and *also* an individual workspace root representing web/unified/etc. This is supported by yarn, but not what we want to use long-term, since it's a bit confusing; this is an incremental step on the way towards using a layout closer to what service uses. Out of scope for this PR: * Migrating existing web code to `/packages/web` * Migrating existing report package code to `/packages/report` * Migrating the existing report integration tests to `/packages/report-e2e-tests` * Extracting common Jest configuration to a `jest.config.base.js` like service does (this required a lot of changes, so I left it for a separate PR) #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [x] Addresses an existing issue: 1783601 - [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: `<rootDir>/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
2020-10-21 00:31:59 +03:00
test-results/
analysis/
*.scss.d.ts
original-manifest-copy.json
feat(mv3-part7): Convert mv3 extension to use build generated JSON validator (#5975) #### Details Fixes mv3 bug with loading assessments. Repro steps: 1. Open mv3 canary/ dev assessment 2. Try to load assessment file 3. See nothing happens in details view, see following errors in console: ``` exception-telemetry-listener.ts:87 Error compiling schema, function code: const schema2 = scope.schema[2];const schema1 = scope.schema[1];return function validate1(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs1 = errors;if(!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))){validate1.errors = [{instancePath,schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type: "integer"},message:"must be integer"}];return false;}if(errors === _errs1){if((typeof data == "number") && (isFinite(data))){if(data < 0 || isNaN(data)){validate1.errors = [{instancePath,schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"}];return false;}}}validate1.errors = vErrors;return errors === 0;} ``` ``` Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'". ``` ##### Motivation Feature work ##### Context The root cause of this bug is that AJV, the library we use to validate the JSON input of assessment files, requires `unsafe-eval` in in the app's content security policy (see their docs: https://ajv.js.org/security.html#content-security-policy). This isn't a problem in mv2, we just add the appropriate line to the manifest: https://github.com/microsoft/accessibility-insights-web/blob/main/Gruntfile.js#L518. But with mv3, chrome no longer allows extensions to include `unsafe-eval` in their manifest CSP, so this is no longer an option. As a solution, this PR migrates us to use AJV's standalone validation code process instead: https://ajv.js.org/standalone.html. A few changes were necessary to convert to the standalone process: 1. Add json generator package. This allows us to build the validator generation code separately from the rest of the codebase. 2. Add extra steps to mv3 build process to (A) build the validator generation code, (B) run the validation generator, and (C) place the generated validator in the expected file such that it can be accessed by the rest of the code. 3. Add extra logic to `load-assessment-data-validator.ts` to determine if the build generated validator is populated or if we should fallback on using the old, dynamically generated validator. We theoretically could convert all products to use the new, build generated validator and remove the old code, but I decided to only convert the mv3 extension to minimize changes to the other products that share this logic. 5. In the case that we use the build generated validator, also check that the assessments data matches the enabled feature flags. With the dynamically generated validator, we are able to check on the fly which feature flags are enabled/ disabled, and as a result, the schema that the validator checks against excludes any assessments that are behind disabled feature flags. We can't check which flags are disabled when we're generating the validator on build, so instead we include all assessments in the build generated validator schema and separately check in `LoadAssessmentDataValidator.uploadedDataIsValid` that none of the assessments in the uploaded data are behind disabled feature flags. #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [n/a] Addresses an existing issue: #0000 - [x] Ran `yarn null:autoadd` - [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: `<rootDir>/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
2022-09-03 00:53:19 +03:00
validate-assessment-json.js
2018-12-07 03:40:02 +03:00
# Dependency directories
node_modules/
.DS_STORE
yarn-error.log