Skip to content

Commit

Permalink
Update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jul 19, 2023
1 parent c9d501b commit 9f80ce0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/specs/__snapshots__/test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

exports[`Block should update attributes in the block sidebar. 1`] = `"<!-- wp:piano-block/piano {"showOnFront":true} /-->"`;

exports[`Block should update attributes related to sound using only keyboard. 1`] = `"<!-- wp:piano-block/piano {"volume":-0.3,"octaveOffset":-1,"instrument":"synthesizer","useSustainPedal":false,"showOnFront":false,"synthesizerSetting":{"oscillator":{"type":"sawtooth"},"envelope":{"attack":0.4,"decay":1.1,"sustain":0.6,"release":1.6}}} /-->"`;
exports[`Block should update attributes related to sound using only keyboard. 1`] = `"<!-- wp:piano-block/piano {"volume":-0.3,"octaveOffset":-1,"instrument":"synthesizer","useSustainPedal":false,"showOnFront":false,"synthesizerSetting":{"oscillator":{"type":"sawtooth"},"envelope":{"attack":0.4,"decay":1.1,"sustain":0.6,"release":1.6}},"keyLayout":"qwerty-2"} /-->"`;
9 changes: 9 additions & 0 deletions test/e2e/specs/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ describe( 'Block', () => {
}
await page.keyboard.press( 'Escape' );

// Pressing a piano key should not remove focus.
await page.keyboard.press( 'z' );

// Key Layout
await page.keyboard.press( 'ArrowRight' );
await page.keyboard.press( 'Enter' );
await page.keyboard.press( 'ArrowDown' );
await page.keyboard.press( 'Enter' );

expect( await getEditedPostContent() ).toMatchSnapshot();
} );

Expand Down

0 comments on commit 9f80ce0

Please sign in to comment.