Skip to content

Commit

Permalink
Adjust e2e, multi selection does not work across nested levels
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Apr 7, 2018
1 parent 9989adc commit f967804
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions test/e2e/specs/__snapshots__/adding-blocks.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ exports[`adding blocks Should insert content using the placeholder and the regul
<!-- wp:quote -->
<blockquote class=\\"wp-block-quote\\">
<!-- wp:paragraph -->
<p>Quote block</p>
</blockquote>
<!-- /wp:quote -->
<!-- /wp:paragraph -->
<!-- wp:code -->
<pre class=\\"wp-block-code\\"><code>Code block</code></pre>
<!-- /wp:code -->"
<!-- wp:code -->
<pre class=\\"wp-block-code\\"><code>Code block</code></pre>
<!-- /wp:code -->
</blockquote>
<!-- /wp:quote -->"
`;
6 changes: 3 additions & 3 deletions test/e2e/specs/multi-block-selection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe( 'Multi-block selection', () => {
it( 'Should select/unselect multiple blocks', async () => {
const firstBlockSelector = '[data-type="core/paragraph"]';
const secondBlockSelector = '[data-type="core/image"]';
const thirdBlockSelector = '[data-type="core/quote"]';
const thirdBlockSelector = '[data-type="core/list"]';
const multiSelectedCssClass = 'is-multi-selected';

// Creating test blocks
Expand All @@ -24,10 +24,10 @@ describe( 'Multi-block selection', () => {
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Enter' );
await page.click( '.edit-post-header [aria-label="Add block"]' );
await page.keyboard.type( 'Quote' );
await page.keyboard.type( 'List' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Enter' );
await page.keyboard.type( 'Quote Block' );
await page.keyboard.type( 'List Block' );

const blocks = [ firstBlockSelector, secondBlockSelector, thirdBlockSelector ];
const expectMultiSelected = ( selectors, areMultiSelected ) => {
Expand Down

0 comments on commit f967804

Please sign in to comment.