Accessibility Insights for Web
Перейти к файлу
Dan Bjorge 370a2ba0e0 test: add "yarn test:e2e:docker" run script to reproduce CI build docker steps locally (#936)
* Add run script to emulate CI build docker e2e testing

* document new run script in readme

* Enable passing through extra arguments to jest

* Fixes to README
2019-07-11 09:30:50 -07:00
.github chore: update issue templates (#828) 2019-06-19 12:45:19 -07:00
.vscode make sure vscode is using typescript from node_modules (#489) 2019-04-02 11:40:26 -07:00
deploy update grunt version on deploy package deps (#880) 2019-07-01 13:28:05 -07:00
docs docs: update readme to include fork instructions (#872) 2019-06-28 09:33:31 -07:00
pipeline chore: remove unnecessary -- args to "yarn run" to fix build warnings (#931) 2019-07-10 14:36:36 -07:00
src chore: add checks for fonts and icons in request failed error handler from e2e base page.ts (#927) 2019-07-10 17:05:42 -07:00
.dockerignore chore: run e2e tests as part of PR build process on ubuntu (#907) 2019-07-09 13:13:10 -07:00
.gitattributes adding prettier (not enabling yet) (#100) 2019-01-22 13:49:33 -08:00
.gitignore Spike: Using CSS Modules in React (with generated and ignored typings) (#688) 2019-05-24 15:43:55 -07:00
.prettierignore chore: .prettierignore for .dockerignore and Dockerfile (no prettier support) (#922) 2019-07-09 13:58:53 -07:00
AppXManifest.xml feat: Add manifest, icons, build script for Microsoft Edge store package (#648) 2019-05-06 16:06:16 -07:00
CODE_OF_CONDUCT.md Adding Code of Conduct and Contributing MD files (#369) 2019-03-15 14:09:00 -07:00
CONTRIBUTING.md Add guidance for git branch setup (#381) 2019-03-19 16:49:30 -07:00
Dockerfile test: add "yarn test:e2e:docker" run script to reproduce CI build docker steps locally (#936) 2019-07-11 09:30:50 -07:00
Gruntfile.js Revert "building the web extension only (#881)" (#911) 2019-07-05 17:08:58 -07:00
LICENSE Updating License text (#133) 2019-01-28 10:29:30 -08:00
README.md test: add "yarn test:e2e:docker" run script to reproduce CI build docker steps locally (#936) 2019-07-11 09:30:50 -07:00
build.yaml refactor: separate e2e result publishing with separate artifacts per job (#921) 2019-07-09 13:55:45 -07:00
copyright-header.txt Migrate code to GitHub 2019-01-04 13:29:37 -08:00
jest.config.js Using jest projects config to run tests (#135) 2019-02-05 17:33:03 -08:00
new-appx.ps1 feat: Add manifest, icons, build script for Microsoft Edge store package (#648) 2019-05-06 16:06:16 -07:00
package.json test: add "yarn test:e2e:docker" run script to reproduce CI build docker steps locally (#936) 2019-07-11 09:30:50 -07:00
prettier.config.js Enable prettier except for src folder (#118) 2019-01-23 17:22:57 -08:00
targets.config.js feat: build electron application from our existing configurations (#695) 2019-05-22 17:44:01 -07:00
tsconfig.json force case sensitive imports from tsconfig (#368) 2019-03-15 09:49:15 -07:00
tslint.json chore: enable some react-a11y-* tslint rules (#918) 2019-07-08 16:04:50 -07:00
wallaby.conf.js Enable continuous testing by adding wallaby.js support (#290) 2019-03-05 18:00:40 -08:00
webpack.config.js update css-loader (#849) 2019-06-24 15:20:04 -07:00
yarn.lock update some dependencies (#930) 2019-07-10 14:20:12 -07:00

README.md

Product Logo Accessibility Insights for Web

Build Status Azure DevOps coverage Chrome Web Store Chrome Web Store Chrome Web Store

Accessibility Insights for Web is a Google Chrome and Microsoft Edge Insider browser extension for assessing the accessibility of web sites and web applications.

Running the extension

You can install the extension from one of the following links

Building the code

Prerequisites

Please ensure that you have at least the minimum recommended versions

  • Node - 10.15.0 (Check by running node --version) - This is the version being enforced on our builds
  • Yarn - Version >= v1.15.2 (Check by running yarn --version)

In case you don't have yarn, please install from: Yarn

1. Fork and clone the repository

2. Install packages

  • Install the packages

    yarn install
    

3. Build and run unit tests

  • Build and run the unit tests
    yarn build
    yarn test
    
  • Run the end-to-end tests (note: you must use a non-admin prompt to avoid this issue)
    yarn test:e2e
    
    There are more details in the Testing section below.

4. Load the extension locally

  • Build the (unpacked) extension

    yarn build
    
  • Add the extension to your browser

    • Click on the 3-dotted-menu in the upper right corner and then select "More Tools" and then "Extensions"

    • Verify that developer mode is enabled in the upper right

    • Click on the Load unpacked button

    • Choose the following directory

      ./drop/dev/extension/ - bundled like a production release

    IMPORTANT: Ensure that you are testing locally before pushing a change.

  • Look for the Dev Logo extension icon to the right of the address bar

5. Commands to run before check in

  • Run the below command to build, test, check if files have copyright header, check file format styling & tslint issues
    yarn precheckin
    
  • If the above command failed for formatting issues, run the below command to format all files
    yarn format
    

More Information

Developer Workflow

Testing

We use jest as our test framework and puppeteer for browser automation in our end-to-end UI tests.

This project's end to end tests require the ability to run a non-headless chromium process. Because of this, they are incompatible with non-graphical development environments (notably, a default WSL environment on Windows). For an example of emulating a graphical environment using xvfb, see ./Dockerfile. For details, see issue #853.

Using VS Code

To run a task from the command palette, press Ctrl + Shift + P, select Tasks: Run Task, and select the task you want to run:

  • Test current file in VSCode runs just the tests in the currently-opened test file

To debug a test inside VS Code, set a breakpoint and click the debug button or press F5.

To attach VS Code as a debugger to a separate instance of Chrome, make sure you've launched Chrome with the --remote-debugging-port=9230 command line argument, and then use either of the Attach debugger... debug profiles from the VS Code Debug pane.

To debug using an external tool, run the Debug current test file outside VS Code task. In Chrome, for example, navigate to chrome://inspect and click Open dedicated DevTools for Node.

You can start an interactive watch session that automatically runs tests affected by uncommitted changes. To do this, run Begin Jest watch session from the command palette.

Using the terminal

yarn test runs all unit tests. yarn test -u runs all unit tests and updates snapshot files.

yarn test:e2e runs all end-to-end tests - you'll need to run yarn build first if you've changed non-test code. yarn test:e2e -u runs all end-to-end tests and updates snapshot files.

yarn test:e2e:docker runs all end-to-end tests in the same Docker container our linux CI build uses. Prerequisite: Install Docker.

Extra command line arguments and flags are passed along to Jest. For example:

  • To run a single or small number of unit test files, run yarn test {FILE_NAME_REGEX}
  • yarn test --watch will start an interactive watch session.

See more about Jest options here.

To debug using an external tool, run node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand {RELATIVE_FILE_PATH}. In Chrome, for example, navigate to chrome://inspect and click Open dedicated DevTools for Node.

Data/Telemetry

By opting into telemetry, you help the community develop inclusive software. We collect anonymized data to identify the top accessibility issues found by the users. This will help focus the accessibility tools and standards community to improve guidelines, rules engines, and features.

This project collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more.

Reporting security vulnerabilities

If you believe you have found a security vulnerability in this project, please follow these steps to report it. For more information on how vulnerabilities are disclosed, see Coordinated Vulnerability Disclosure.

FAQ

Please visit our FAQ page.

Contributing

All contributions are welcome! Please read through our guidelines on contributions to this project.

Code of Conduct

Please read through our Code of Conduct to this project.