docs(accessibility-testing): fix syntax issues in example 1 (#15204)

This commit is contained in:
Dan Bjorge 2022-06-29 15:47:31 -04:00 committed by GitHub
parent 28f382bea6
commit cf6ffdf043
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,10 +30,10 @@ The following examples demonstrate a few basic accessibility testing scenarios.
This example demonstrates how to test an entire page for automatically detectable accessibility violations. The test: This example demonstrates how to test an entire page for automatically detectable accessibility violations. The test:
1. Imports the `@axe-core/playwright` package 1. Imports the `@axe-core/playwright` package
2. Uses normal Playwright Test syntax to define a test case 1. Uses normal Playwright Test syntax to define a test case
3. Uses normal Playwright syntax to navigate to the page under test 1. Uses normal Playwright syntax to navigate to the page under test
4. Awaits `AxeBuilder.analyze()` to run the accessibility scan against the page 1. Awaits `AxeBuilder.analyze()` to run the accessibility scan against the page
5. Uses normal Playwright Test [expect] syntax to verify that there are no violations in the returned scan results 1. Uses normal Playwright Test [assertions](./test-assertions) to verify that there are no violations in the returned scan results
```js tab=js-ts ```js tab=js-ts
import { test, expect } from '@playwright/test'; import { test, expect } from '@playwright/test';