Skip to content

Commit

Permalink
Try to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed May 8, 2020
1 parent 9d97c0b commit 606c0b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ function ButtonBlockAppender(
rootClientId,
className,
__experimentalSelectBlockOnInsert: selectBlockOnInsert,
...props
onFocus,
tabIndex,
},
ref
) {
Expand Down Expand Up @@ -55,6 +56,8 @@ function ButtonBlockAppender(
<Tooltip text={ label }>
<Button
ref={ ref }
onFocus={ onFocus }
tabIndex={ tabIndex }
className={ classnames(
className,
'block-editor-button-block-appender'
Expand All @@ -68,7 +71,6 @@ function ButtonBlockAppender(
}
disabled={ disabled }
label={ label }
{ ...props }
>
<VisuallyHidden as="span">{ label }</VisuallyHidden>
<Icon icon={ create } />
Expand Down
5 changes: 3 additions & 2 deletions packages/e2e-tests/config/setup-test-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ async function runAxeTestsForBlockEditor() {
// See: https://github.com/WordPress/gutenberg/pull/15018.
disabledRules: [
'aria-allowed-role',
'aria-allowed-attr',
'aria-hidden-focus',
'aria-input-field-name',
'aria-valid-attr-value',
Expand All @@ -247,8 +248,8 @@ async function runAxeTestsForBlockEditor() {
// These properties were not included in the 1.1 spec
// through error, they should be allowed on role="row":
// https://github.com/w3c/aria/issues/558
'[role="row"][aria-setsize]',
'[role="row"][aria-posinset]',
'[role="treegrid"] [aria-posinset]',
'[role="treegrid"] [aria-setsize]',
],
} );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
async function openBlockNavigator() {
await pressKeyWithModifier( 'access', 'o' );
await page.waitForSelector(
'.block-editor-block-navigation-item__block.is-selected'
'.block-editor-block-navigation-row.is-selected'
);
}

Expand All @@ -38,7 +38,7 @@ describe( 'Navigating the block hierarchy', () => {
await page.click( '[aria-label="Block navigation"]' );
const columnsBlockMenuItem = (
await page.$x(
"//button[contains(@class,'block-editor-block-navigation-item__button') and contains(text(), 'Columns')]"
"//button[contains(@class,'block-editor-block-navigation-row__select-button') and contains(text(), 'Columns')]"
)
)[ 0 ];
await columnsBlockMenuItem.click();
Expand All @@ -57,7 +57,7 @@ describe( 'Navigating the block hierarchy', () => {
await page.click( '[aria-label="Block navigation"]' );
const lastColumnsBlockMenuItem = (
await page.$x(
"//button[contains(@class,'block-editor-block-navigation-item__button') and contains(text(), 'Column')]"
"//button[contains(@class,'block-editor-block-navigation-row__select-button') and contains(text(), 'Column')]"
)
)[ 3 ];
await lastColumnsBlockMenuItem.click();
Expand Down Expand Up @@ -163,7 +163,7 @@ describe( 'Navigating the block hierarchy', () => {
await page.click( '[aria-label="Block navigation"]' );
const groupMenuItem = (
await page.$x(
"//button[contains(@class,'block-editor-block-navigation__item') and contains(text(), 'Group')]"
"//button[contains(@class,'block-editor-block-navigation-row__select-button') and contains(text(), 'Group')]"
)
)[ 0 ];
await groupMenuItem.click();
Expand Down

0 comments on commit 606c0b7

Please sign in to comment.