Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelzaleski committed Dec 15, 2023
1 parent d8ba572 commit 835ed55
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions tests/e2e/specs/wcpay/merchant/merchant-orders-full-refund.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,21 @@ describe( 'Order > Full refund', () => {

await page.waitForNavigation( { waitUntil: 'networkidle0' } );

await page.waitForSelector( '#woocommerce-order-notes', {
timeout: 10000,
// Verify the product line item shows the refunded amount
await expect( page ).toMatchElement( '.line_cost .refunded', {
text: `-${ orderAmount }`,
timeout: 5000,
} );
// Verify the refund shows in the list with the amount
await expect( page ).toMatchElement( '.refund > .line_cost', {
text: `-${ orderAmount }`,
timeout: 5000,
} );
// Verify system note was added
await expect( page ).toMatchElement( '.system-note', {
text: `A refund of ${ orderAmount } was successfully processed using WooPayments. Reason: No longer wanted`,
timeout: 5000,
} );
await Promise.all( [
// Verify the product line item shows the refunded amount
expect( page ).toMatchElement( '.line_cost .refunded', {
text: `-${ orderAmount }`,
timeout: 5000,
} ),

// Verify the refund shows in the list with the amount
expect( page ).toMatchElement( '.refund > .line_cost', {
text: `-${ orderAmount }`,
timeout: 5000,
} ),

// Verify system note was added
expect( page ).toMatchElement( '.system-note', {
text: `A refund of ${ orderAmount } was successfully processed using WooPayments. Reason: No longer wanted`,
timeout: 5000,
} ),
] );
await takeScreenshot( 'merchant-orders-full-refund_refunded' );
} );

Expand Down

0 comments on commit 835ed55

Please sign in to comment.