Skip to content

Commit

Permalink
Update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Sep 20, 2021
1 parent 400960e commit b8bcb4e
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ async function tabToColumnsControl() {
isColumnsControl = await page.evaluate( () => {
const activeElement = document.activeElement;
return (
activeElement.tagName === 'INPUT' &&
activeElement.attributes.getNamedItem( 'aria-label' ).value ===
'Columns'
activeElement.tagName === 'BUTTON' &&
activeElement.getAttribute( 'role' ) === 'radio' &&
activeElement
.closest( '[role=radiogroup]' )
?.getAttribute( 'aria-label' ) === 'Quantity'
);
} );
} while ( ! isColumnsControl );
Expand Down Expand Up @@ -59,12 +61,9 @@ describe( 'Navigating the block hierarchy', () => {
// Tweak the columns count.
await openDocumentSettingsSidebar();
await page.focus(
'.block-editor-block-inspector [aria-label="Columns"][type="number"]'
'.block-editor-block-inspector [aria-label="Quantity"] [aria-checked="true"]'
);
await page.keyboard.down( 'Shift' );
await page.keyboard.press( 'ArrowLeft' );
await page.keyboard.up( 'Shift' );
await page.keyboard.type( '3' );
await page.keyboard.press( 'ArrowRight' );

// Wait for the new column block to appear in the list view
// 5 = Columns, Column, Paragraph, Column, *Column*
Expand Down

0 comments on commit b8bcb4e

Please sign in to comment.