Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E: fix merchant-orders-full-refund missing order amount #8319

Merged
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,18 @@ describe( 'Order > Full refund', () => {
);
orderId = await orderIdField.evaluate( ( el ) => el.innerText );

// Get the order total so we can verify the refund amount
const orderTotalField = await page.$(
'.woocommerce-order-overview__total .woocommerce-Price-amount'
deepakpathania marked this conversation as resolved.
Show resolved Hide resolved
);
orderAmount = await orderTotalField.evaluate( ( el ) => el.innerText );

// Login and open the order
await merchant.login();
await merchant.goToOrder( orderId );

// We need to remove any listeners on the `dialog` event otherwise we can't catch the dialog below
await page.removeAllListeners( 'dialog' );

// Get the order price
const priceElement = await page.$( '.woocommerce-Price-amount' );
orderAmount = await page.evaluate(
( el ) => el.textContent,
priceElement
);
} );

afterAll( async () => {
Expand Down
Loading