Skip to content

Commit

Permalink
Some more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
manzoorwanijk committed Jul 30, 2024
1 parent 4fec643 commit c415f13
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions projects/plugins/social/tests/e2e/specs/connection.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
} );
} );

0 comments on commit c415f13

Please sign in to comment.