From 7106454691da54f26c23d6139c0c329bfc6e3fd9 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Wed, 17 Apr 2019 14:55:13 +0200 Subject: [PATCH 1/7] Testing: Add partial support for Axe verification in e2e tests --- package-lock.json | 1 + packages/e2e-tests/CHANGELOG.md | 6 +++++ .../e2e-tests/config/setup-test-framework.js | 24 +++++++++++++++++-- packages/e2e-tests/jest.config.js | 1 + packages/e2e-tests/package.json | 1 + .../e2e-tests/plugins/format-api/index.js | 2 +- .../__snapshots__/format-api.test.js.snap | 2 +- packages/jest-puppeteer-axe/CHANGELOG.md | 6 +++++ packages/jest-puppeteer-axe/README.md | 6 +++-- packages/jest-puppeteer-axe/src/index.js | 19 +++++++++------ 10 files changed, 55 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2ea228aa9e96f..e7af47a4f0dbd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3271,6 +3271,7 @@ "requires": { "@wordpress/e2e-test-utils": "file:packages/e2e-test-utils", "@wordpress/jest-console": "file:packages/jest-console", + "@wordpress/jest-puppeteer-axe": "file:packages/jest-puppeteer-axe", "@wordpress/scripts": "file:packages/scripts", "expect-puppeteer": "^4.0.0", "lodash": "^4.17.11" diff --git a/packages/e2e-tests/CHANGELOG.md b/packages/e2e-tests/CHANGELOG.md index 75b6278875283..397c64f9d17a8 100644 --- a/packages/e2e-tests/CHANGELOG.md +++ b/packages/e2e-tests/CHANGELOG.md @@ -1,3 +1,9 @@ +## Unreleased + +### New features + +- Added Axe (the Accessibility Engine) API integration with e2e tests suite. + ## 1.0.0 (2019-03-06) - Initial release. diff --git a/packages/e2e-tests/config/setup-test-framework.js b/packages/e2e-tests/config/setup-test-framework.js index 4800da23a860f..3659d9c405999 100644 --- a/packages/e2e-tests/config/setup-test-framework.js +++ b/packages/e2e-tests/config/setup-test-framework.js @@ -8,13 +8,13 @@ import { get } from 'lodash'; */ import '@wordpress/jest-console'; import { + activatePlugin, clearLocalStorage, enablePageDialogAccept, setBrowserViewport, - visitAdminPage, - activatePlugin, switchUserToAdmin, switchUserToTest, + visitAdminPage, } from '@wordpress/e2e-test-utils'; /** @@ -162,6 +162,26 @@ beforeAll( async () => { } ); afterEach( async () => { + if ( await page.$( '.block-editor' ) ) { + await expect( page ).toPassAxeTests( { + disabledRules: [ + 'aria-allowed-role', + 'aria-valid-attr-value', + 'color-contrast', + 'dlitem', + 'duplicate-id', + 'label', + 'link-name', + 'listitem', + 'region', + ], + exclude: [ + '.edit-post-layout__metaboxes', + '.mce-open', + ], + } ); + } + await setupBrowser(); } ); diff --git a/packages/e2e-tests/jest.config.js b/packages/e2e-tests/jest.config.js index ea4d99ce56ac1..8ee2efc1395e3 100644 --- a/packages/e2e-tests/jest.config.js +++ b/packages/e2e-tests/jest.config.js @@ -5,6 +5,7 @@ module.exports = { ], setupFilesAfterEnv: [ '/config/setup-test-framework.js', + '@wordpress/jest-puppeteer-axe', 'expect-puppeteer', ], }; diff --git a/packages/e2e-tests/package.json b/packages/e2e-tests/package.json index 98a3e325e3a0c..302aa7eaf57fb 100644 --- a/packages/e2e-tests/package.json +++ b/packages/e2e-tests/package.json @@ -24,6 +24,7 @@ "dependencies": { "@wordpress/e2e-test-utils": "file:../e2e-test-utils", "@wordpress/jest-console": "file:../jest-console", + "@wordpress/jest-puppeteer-axe": "file:../jest-puppeteer-axe", "@wordpress/scripts": "file:../scripts", "expect-puppeteer": "^4.0.0", "lodash": "^4.17.11" diff --git a/packages/e2e-tests/plugins/format-api/index.js b/packages/e2e-tests/plugins/format-api/index.js index 4d41f7c26c4b3..671767e204926 100644 --- a/packages/e2e-tests/plugins/format-api/index.js +++ b/packages/e2e-tests/plugins/format-api/index.js @@ -18,7 +18,7 @@ props.value, { type: 'my-plugin/link', attributes: { - url: '#test', + url: 'https://example.com', } } ) diff --git a/packages/e2e-tests/specs/plugins/__snapshots__/format-api.test.js.snap b/packages/e2e-tests/specs/plugins/__snapshots__/format-api.test.js.snap index 20a79ccc33efb..e5a006328d097 100644 --- a/packages/e2e-tests/specs/plugins/__snapshots__/format-api.test.js.snap +++ b/packages/e2e-tests/specs/plugins/__snapshots__/format-api.test.js.snap @@ -2,6 +2,6 @@ exports[`Using Format API Clicking the control wraps the selected text properly with HTML code 1`] = ` " -

First paragraph

+

First paragraph

" `; diff --git a/packages/jest-puppeteer-axe/CHANGELOG.md b/packages/jest-puppeteer-axe/CHANGELOG.md index 2256a6340e4fc..c8e5368f48496 100644 --- a/packages/jest-puppeteer-axe/CHANGELOG.md +++ b/packages/jest-puppeteer-axe/CHANGELOG.md @@ -1,3 +1,9 @@ +## Unreleased + +### New features + +- Added optional `disabledRules` option to use with `toPassAxeTests` matcher. + ## 1.0.0 (2019-03-06) - Initial release. diff --git a/packages/jest-puppeteer-axe/README.md b/packages/jest-puppeteer-axe/README.md index 29fd06538ed47..c28b7ed96f752 100644 --- a/packages/jest-puppeteer-axe/README.md +++ b/packages/jest-puppeteer-axe/README.md @@ -38,8 +38,9 @@ test( 'checks the test page with Axe', async () => { ``` It is also possible to pass optional Axe API options to perform customized check: -- `include` - CSS selector to to add the list of elements to include in analysis. -- `exclude` - CSS selector to to add the list of elements to exclude from analysis. +- `include` - CSS selector(s) to to add the list of elements to include in analysis. +- `exclude` - CSS selector(s) to to add the list of elements to exclude from analysis. +- `disabledRules` - the list of [Axe rules](https://github.com/dequelabs/axe-core/blob/master/doc/rule-descriptions.md) to skip from verification. ```js test( 'checks the test component with Axe excluding some button', async () => { @@ -50,6 +51,7 @@ test( 'checks the test component with Axe excluding some button', async () => { await expect( page ).toPassAxeTests( { include: '.test-component', exclude: '.some-button', + disabledRules: [ 'aria-allowed-role' ], } ); } ); ``` diff --git a/packages/jest-puppeteer-axe/src/index.js b/packages/jest-puppeteer-axe/src/index.js index ccf1be7cf0a64..65951cac52ead 100644 --- a/packages/jest-puppeteer-axe/src/index.js +++ b/packages/jest-puppeteer-axe/src/index.js @@ -52,16 +52,17 @@ function formatViolations( violations ) { * * @see https://github.com/dequelabs/axe-puppeteer * - * @param {Page} page Puppeteer's page instance. - * @param {?Object} params Optional Axe API options. - * @param {?string} params.include CSS selector to add to the list of elements - * to include in analysis. - * @param {?string} params.exclude CSS selector to add to the list of elements - * to exclude from analysis. + * @param {Page} page Puppeteer's page instance. + * @param {?Object} params Optional Axe API options. + * @param {?string|Array} params.include CSS selector to add to the list of elements + * to include in analysis. + * @param {?string|Array} params.exclude CSS selector to add to the list of elements + * to exclude from analysis. + * @param {?Array} params.disabledRules The list of Axe rules to skip from verification. * * @return {Object} A matcher object with two keys `pass` and `message`. */ -async function toPassAxeTests( page, { include, exclude } = {} ) { +async function toPassAxeTests( page, { include, exclude, disabledRules } = {} ) { const axe = new AxePuppeteer( page ); if ( include ) { @@ -72,6 +73,10 @@ async function toPassAxeTests( page, { include, exclude } = {} ) { axe.exclude( exclude ); } + if ( disabledRules ) { + axe.disableRules( disabledRules ); + } + const { violations } = await axe.analyze(); const pass = violations.length === 0; From 83f681d9b13e12564576a2adf6d7a4eabbcecdc6 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Wed, 17 Apr 2019 16:56:29 +0200 Subject: [PATCH 2/7] Execute build earlier on Travis to make ensure jest-puppeteer-axe can be used --- .travis.yml | 17 +++++++++-------- .../e2e-tests/config/setup-test-framework.js | 1 - packages/e2e-tests/jest.config.js | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0de440677a9f..b7158c74a1dfe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,8 +69,8 @@ jobs: install: - ./bin/setup-local-env.sh script: - - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run build + - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests ) - name: E2E tests (Admin with plugins) (2/4) @@ -78,8 +78,8 @@ jobs: install: - ./bin/setup-local-env.sh script: - - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run build + - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests ) - name: E2E tests (Admin with plugins) (3/4) @@ -87,8 +87,8 @@ jobs: install: - ./bin/setup-local-env.sh script: - - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run build + - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests ) - name: E2E tests (Admin with plugins) (4/4) @@ -96,8 +96,8 @@ jobs: install: - ./bin/setup-local-env.sh script: - - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run build + - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests ) - name: E2E tests (Author without plugins) (1/4) @@ -105,8 +105,8 @@ jobs: install: - ./bin/setup-local-env.sh script: - - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run build + - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests ) - name: E2E tests (Author without plugins) (2/4) @@ -114,8 +114,8 @@ jobs: install: - ./bin/setup-local-env.sh script: - - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run build + - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests ) - name: E2E tests (Author without plugins) (3/4) @@ -123,8 +123,8 @@ jobs: install: - ./bin/setup-local-env.sh script: - - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run build + - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests ) - name: E2E tests (Author without plugins) (4/4) @@ -132,9 +132,10 @@ jobs: install: - ./bin/setup-local-env.sh script: - - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run build + - $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests - npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests ) + allow_failures: - name: PHP unit tests (PHP 5.3) env: WP_VERSION=latest SWITCH_TO_PHP=5.3 diff --git a/packages/e2e-tests/config/setup-test-framework.js b/packages/e2e-tests/config/setup-test-framework.js index 3659d9c405999..e6a96ba481d01 100644 --- a/packages/e2e-tests/config/setup-test-framework.js +++ b/packages/e2e-tests/config/setup-test-framework.js @@ -6,7 +6,6 @@ import { get } from 'lodash'; /** * WordPress dependencies */ -import '@wordpress/jest-console'; import { activatePlugin, clearLocalStorage, diff --git a/packages/e2e-tests/jest.config.js b/packages/e2e-tests/jest.config.js index 8ee2efc1395e3..eeb88d9aa0daf 100644 --- a/packages/e2e-tests/jest.config.js +++ b/packages/e2e-tests/jest.config.js @@ -5,6 +5,7 @@ module.exports = { ], setupFilesAfterEnv: [ '/config/setup-test-framework.js', + '@wordpress/jest-console', '@wordpress/jest-puppeteer-axe', 'expect-puppeteer', ], From 88f576826e162230e5f8652795365c41a4d2ce7e Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Wed, 17 Apr 2019 17:16:44 +0200 Subject: [PATCH 3/7] Exclude TinyMCE toolbar from Axe verification in e2e tests --- packages/e2e-tests/config/setup-test-framework.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/e2e-tests/config/setup-test-framework.js b/packages/e2e-tests/config/setup-test-framework.js index e6a96ba481d01..8580394f68ba1 100644 --- a/packages/e2e-tests/config/setup-test-framework.js +++ b/packages/e2e-tests/config/setup-test-framework.js @@ -176,7 +176,7 @@ afterEach( async () => { ], exclude: [ '.edit-post-layout__metaboxes', - '.mce-open', + '.mce-tinymce', ], } ); } From c69b2efc8603507d19454606f04855a9275b421d Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Thu, 18 Apr 2019 11:38:10 +0200 Subject: [PATCH 4/7] Update tests setup to make all tests pass --- .../e2e-tests/config/setup-test-framework.js | 55 ++++++++++++------- .../plugins/meta-attribute-block.test.js | 9 +-- packages/jest-puppeteer-axe/src/index.js | 5 +- 3 files changed, 43 insertions(+), 26 deletions(-) diff --git a/packages/e2e-tests/config/setup-test-framework.js b/packages/e2e-tests/config/setup-test-framework.js index 8580394f68ba1..368f0540920d0 100644 --- a/packages/e2e-tests/config/setup-test-framework.js +++ b/packages/e2e-tests/config/setup-test-framework.js @@ -147,6 +147,40 @@ function observeConsoleLogging() { } ); } +/** + * Runs Axe tests when the block editor is found on the current page. + * + * @return {?Promise} Promise resolving once Axe texts are finished. + */ +async function runAxeTestsForBlockEditor() { + if ( ! await page.$( '.block-editor' ) ) { + return; + } + + await expect( page ).toPassAxeTests( { + // Temporary disabled rules to enable initial integration. + // See: https://github.com/WordPress/gutenberg/pull/15018. + disabledRules: [ + 'aria-allowed-role', + 'aria-valid-attr-value', + 'button-name', + 'color-contrast', + 'dlitem', + 'duplicate-id', + 'label', + 'link-name', + 'listitem', + 'region', + ], + exclude: [ + // Ignores elements created by metaboxes. + '.edit-post-layout__metaboxes', + // Ignores elements created by TinyMCE. + '.mce-container', + ], + } ); +} + // Before every test suite run, delete all content created by the test. This ensures // other posts/comments/etc. aren't dirtying tests and tests don't depend on // each other's side-effects. @@ -161,26 +195,7 @@ beforeAll( async () => { } ); afterEach( async () => { - if ( await page.$( '.block-editor' ) ) { - await expect( page ).toPassAxeTests( { - disabledRules: [ - 'aria-allowed-role', - 'aria-valid-attr-value', - 'color-contrast', - 'dlitem', - 'duplicate-id', - 'label', - 'link-name', - 'listitem', - 'region', - ], - exclude: [ - '.edit-post-layout__metaboxes', - '.mce-tinymce', - ], - } ); - } - + await runAxeTestsForBlockEditor(); await setupBrowser(); } ); diff --git a/packages/e2e-tests/specs/plugins/meta-attribute-block.test.js b/packages/e2e-tests/specs/plugins/meta-attribute-block.test.js index 45c8256159979..5de9ea1f6c619 100644 --- a/packages/e2e-tests/specs/plugins/meta-attribute-block.test.js +++ b/packages/e2e-tests/specs/plugins/meta-attribute-block.test.js @@ -41,13 +41,14 @@ describe( 'Block with a meta attribute', () => { await page.keyboard.type( 'Meta Value' ); const inputs = await page.$$( '.my-meta-input' ); - await inputs.forEach( async ( input ) => { + await Promise.all( inputs.map( async ( input ) => { // Clicking the input selects the block, // and selecting the block enables the sync data mode - // as otherwise the asynchronous rerendering of unselected blocks + // as otherwise the asynchronous re-rendering of unselected blocks // may cause the input to have not yet been updated for the other blocks await input.click(); - expect( await input.getProperty( 'value' ) ).toBe( 'Meta Value' ); - } ); + const inputValue = await input.getProperty( 'value' ); + expect( await inputValue.jsonValue() ).toBe( 'Meta Value' ); + } ) ); } ); } ); diff --git a/packages/jest-puppeteer-axe/src/index.js b/packages/jest-puppeteer-axe/src/index.js index 65951cac52ead..ee736ef43f1d0 100644 --- a/packages/jest-puppeteer-axe/src/index.js +++ b/packages/jest-puppeteer-axe/src/index.js @@ -11,8 +11,9 @@ import AxePuppeteer from 'axe-puppeteer'; * @return {string} The user friendly message to display when the matcher fails. */ function formatViolations( violations ) { - return violations.map( ( { help, id, nodes } ) => { - let output = `Rule: ${ id } (${ help })\n` + + return violations.map( ( { help, helpUrl, id, nodes } ) => { + let output = `Rule: "${ id }" (${ help })\n` + + `Help: ${ helpUrl }\n` + 'Affected Nodes:\n'; nodes.forEach( ( node ) => { From 1e4b85960e553c5ff432d3183281500f3bd9391d Mon Sep 17 00:00:00 2001 From: Nicola Heald Date: Thu, 18 Apr 2019 13:40:45 +0100 Subject: [PATCH 5/7] Respond to the test instagram URL with a 404 --- .../e2e-test-utils/src/mocks/create-404-response.js | 12 ++++++++++++ packages/e2e-test-utils/src/mocks/index.js | 1 + packages/e2e-tests/specs/embedding.test.js | 1 + 3 files changed, 14 insertions(+) create mode 100644 packages/e2e-test-utils/src/mocks/create-404-response.js diff --git a/packages/e2e-test-utils/src/mocks/create-404-response.js b/packages/e2e-test-utils/src/mocks/create-404-response.js new file mode 100644 index 0000000000000..a18272eb4ed6a --- /dev/null +++ b/packages/e2e-test-utils/src/mocks/create-404-response.js @@ -0,0 +1,12 @@ +/** + * Respond to a request with a 404 response. + * + * @return {Promise} Promise that responds to a request with the mock 404 response. + */ +export function create404Response() { + return async ( request ) => request.respond( { + status: 404, + contentType: 'text/plain', + body: 'Not Found.', + } ); +} diff --git a/packages/e2e-test-utils/src/mocks/index.js b/packages/e2e-test-utils/src/mocks/index.js index 4212e2badb7c1..fd48c3f391b9d 100644 --- a/packages/e2e-test-utils/src/mocks/index.js +++ b/packages/e2e-test-utils/src/mocks/index.js @@ -1,4 +1,5 @@ export { createURLMatcher } from './create-url-matcher'; +export { create404Response } from './create-404-response'; export { createJSONResponse } from './create-json-response'; export { createEmbeddingMatcher } from './create-embedding-matcher'; export { mockOrTransform } from './mock-or-transform'; diff --git a/packages/e2e-tests/specs/embedding.test.js b/packages/e2e-tests/specs/embedding.test.js index df7fdb30a7a4c..5fcc318c46705 100644 --- a/packages/e2e-tests/specs/embedding.test.js +++ b/packages/e2e-tests/specs/embedding.test.js @@ -8,6 +8,7 @@ import { createURLMatcher, setUpResponseMocking, createJSONResponse, + create404Response, getEditedPostContent, clickButton, insertBlock, From d264a91c7cbe58bd78d54d5e97783716379176a3 Mon Sep 17 00:00:00 2001 From: Nicola Heald Date: Thu, 18 Apr 2019 14:34:54 +0100 Subject: [PATCH 6/7] Revert "Respond to the test instagram URL with a 404" This reverts commit 35b5a5c5b6714d08694a0fae5ce1ba3fc81a0e2f. --- .../e2e-test-utils/src/mocks/create-404-response.js | 12 ------------ packages/e2e-test-utils/src/mocks/index.js | 1 - packages/e2e-tests/specs/embedding.test.js | 1 - 3 files changed, 14 deletions(-) delete mode 100644 packages/e2e-test-utils/src/mocks/create-404-response.js diff --git a/packages/e2e-test-utils/src/mocks/create-404-response.js b/packages/e2e-test-utils/src/mocks/create-404-response.js deleted file mode 100644 index a18272eb4ed6a..0000000000000 --- a/packages/e2e-test-utils/src/mocks/create-404-response.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Respond to a request with a 404 response. - * - * @return {Promise} Promise that responds to a request with the mock 404 response. - */ -export function create404Response() { - return async ( request ) => request.respond( { - status: 404, - contentType: 'text/plain', - body: 'Not Found.', - } ); -} diff --git a/packages/e2e-test-utils/src/mocks/index.js b/packages/e2e-test-utils/src/mocks/index.js index fd48c3f391b9d..4212e2badb7c1 100644 --- a/packages/e2e-test-utils/src/mocks/index.js +++ b/packages/e2e-test-utils/src/mocks/index.js @@ -1,5 +1,4 @@ export { createURLMatcher } from './create-url-matcher'; -export { create404Response } from './create-404-response'; export { createJSONResponse } from './create-json-response'; export { createEmbeddingMatcher } from './create-embedding-matcher'; export { mockOrTransform } from './mock-or-transform'; diff --git a/packages/e2e-tests/specs/embedding.test.js b/packages/e2e-tests/specs/embedding.test.js index 5fcc318c46705..df7fdb30a7a4c 100644 --- a/packages/e2e-tests/specs/embedding.test.js +++ b/packages/e2e-tests/specs/embedding.test.js @@ -8,7 +8,6 @@ import { createURLMatcher, setUpResponseMocking, createJSONResponse, - create404Response, getEditedPostContent, clickButton, insertBlock, From 21ea6eaa9ef8ab3bced6d4fa56fad774729fcad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=28Greg=29=20Zi=C3=B3=C5=82kowski?= Date: Thu, 18 Apr 2019 16:09:18 +0200 Subject: [PATCH 7/7] Update index.js --- packages/jest-puppeteer-axe/src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jest-puppeteer-axe/src/index.js b/packages/jest-puppeteer-axe/src/index.js index ee736ef43f1d0..336cec9bcf816 100644 --- a/packages/jest-puppeteer-axe/src/index.js +++ b/packages/jest-puppeteer-axe/src/index.js @@ -55,9 +55,9 @@ function formatViolations( violations ) { * * @param {Page} page Puppeteer's page instance. * @param {?Object} params Optional Axe API options. - * @param {?string|Array} params.include CSS selector to add to the list of elements + * @param {?string|Array} params.include CSS selector(s) to add to the list of elements * to include in analysis. - * @param {?string|Array} params.exclude CSS selector to add to the list of elements + * @param {?string|Array} params.exclude CSS selector(s) to add to the list of elements * to exclude from analysis. * @param {?Array} params.disabledRules The list of Axe rules to skip from verification. *