Skip to content

Commit

Permalink
E2E Test: Handle undefined user details in WooCommerce signup test (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
chihsuan authored Jan 31, 2025
1 parent 8edbbe3 commit 6f474fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/e2e/specs/onboarding/signup__woo-email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe(
const emailClient = new EmailClient();

let page: Page;
let newUserDetails: NewUserResponse;
let newUserDetails: NewUserResponse | undefined;

beforeAll( async () => {
page = await browser.newPage();
Expand Down Expand Up @@ -60,6 +60,11 @@ describe(
} );

afterAll( async function () {
if ( ! newUserDetails ) {
// Test fails before signup is complete so we don't need to close account.
return;
}

const restAPIClient = new RestAPIClient(
{
username: testUser.username,
Expand Down

0 comments on commit 6f474fa

Please sign in to comment.