Skip to content

Commit

Permalink
This should intercept the oembed request properly
Browse files Browse the repository at this point in the history
  • Loading branch information
notnownikki committed Sep 20, 2018
1 parent c35eed4 commit 0338bcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e/specs/demo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe( 'new editor state', () => {
// cannot leave errors in the console and cause the test to fail.
await page.setRequestInterception( true );
page.on( 'request', ( request ) => {
if ( request.url === '/index.php?rest_route=/oembed/1.0/proxy&url=https%3A%2F%2Fvimeo.com%2F22439234' ) {
if ( request.url().indexOf( 'oembed/1.0/proxy' ) !== -1 ) {
request.respond( {
content: 'application/json',
body: JSON.stringify( MOCK_EMBED_RESPONSE ),
Expand All @@ -42,6 +42,7 @@ describe( 'new editor state', () => {
request.continue();
}
} );

await visitAdmin( 'post-new.php', 'gutenberg-demo' );
} );

Expand Down

0 comments on commit 0338bcc

Please sign in to comment.