Skip to content

Commit

Permalink
Use selector to indicate Tumblr is ready for login (#98841)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbradsha authored Jan 23, 2025
1 parent c2354ff commit e40a0ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/calypso-e2e/src/lib/pages/marketing-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ export class MarketingPage {
* @param {string} param1.password Tumblr password.
*/
async setupTumblr( popup: Page, { username, password }: { username: string; password: string } ) {
// Wait for the page load to complete. Otherwise, a `Cannot POST /login` error
// is shown.
await popup.waitForLoadState( 'networkidle' );
// This selector allows us to proceed without waiting for `networkidle`.
await popup.waitForSelector( '[data-tumblr-ready="true"]' );

// Fill in the email and password.
await popup.getByRole( 'textbox', { name: 'email' } ).fill( username );
Expand Down

0 comments on commit e40a0ec

Please sign in to comment.