diff --git a/projects/plugins/social/tests/e2e/specs/connection.test.js b/projects/plugins/social/tests/e2e/specs/connection.test.js index 3eebec8a36ac0..f9cb50695febe 100644 --- a/projects/plugins/social/tests/e2e/specs/connection.test.js +++ b/projects/plugins/social/tests/e2e/specs/connection.test.js @@ -13,12 +13,27 @@ test.beforeEach( async ( { page } ) => { } ); test( 'Jetpack Social connection', async ( { page } ) => { + const errorLogs = []; + page.on( 'console', message => { + if ( message.type() === 'error' ) { + errorLogs.push( message.text() ); + } + } ); + + page.on( 'pageerror', err => { + console.log( 'PAGE ERROR', err ); + } ); + await test.step( 'Can connect wordpress.com account to Jetpack Social', async () => { - page.on( 'pageerror', err => { - console.log( err.message ); - } ); await connect( page ); + + await page.evaluate( () => { + console.error( 'hello from the browser' ); + } ); + const socialPage = await JetpackSocialPage.init( page ); + + console.log( 'CONSOLE ERRORS', errorLogs ); expect( await socialPage.isConnected(), 'Jetpack Social should be connected' ).toBeTruthy(); } ); } );