-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into update/deprecating-sofort-from-checkout
- Loading branch information
Showing
8 changed files
with
120 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: dev | ||
|
||
E2E Playwright Migration: convert shopper-wc-blocks-checkout-purchase spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Update gateway form fields references to prevent errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
tests/e2e-pw/specs/shopper/shopper-wc-blocks-checkout-purchase.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { test, expect, Page } from '@playwright/test'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { | ||
checkPageExists, | ||
describeif, | ||
getMerchant, | ||
getShopper, | ||
} from '../../utils/helpers'; | ||
import { shouldRunWCBlocksTests } from '../../utils/constants'; | ||
import { addWCBCheckoutPage } from '../../utils/merchant'; | ||
import { goToCheckoutWCB } from '../../utils/shopper-navigation'; | ||
import { | ||
addCartProduct, | ||
confirmCardAuthentication, | ||
fillBillingAddressWCB, | ||
fillCardDetailsWCB, | ||
} from '../../utils/shopper'; | ||
import { config } from '../../config/default'; | ||
|
||
describeif( shouldRunWCBlocksTests )( | ||
'WooCommerce Blocks > Successful purchase', | ||
() => { | ||
let shopperPage: Page; | ||
|
||
test.beforeAll( async ( { browser }, { project } ) => { | ||
shopperPage = ( await getShopper( browser ) ).shopperPage; | ||
if ( | ||
! ( await checkPageExists( | ||
shopperPage, | ||
project.use.baseURL + '/checkout-wcb' | ||
) ) | ||
) { | ||
const { merchantPage } = await getMerchant( browser ); | ||
await addWCBCheckoutPage( merchantPage ); | ||
} | ||
} ); | ||
|
||
test( 'using a basic card', async () => { | ||
await addCartProduct( shopperPage ); | ||
await goToCheckoutWCB( shopperPage ); | ||
await fillBillingAddressWCB( | ||
shopperPage, | ||
config.addresses.customer.billing | ||
); | ||
await fillCardDetailsWCB( shopperPage, config.cards.basic ); | ||
await shopperPage | ||
.getByRole( 'button', { name: 'Place Order' } ) | ||
.click(); | ||
await expect( | ||
shopperPage.getByRole( 'heading', { | ||
name: 'Order received', | ||
} ) | ||
).toBeVisible(); | ||
} ); | ||
|
||
test( 'using a 3DS card', async () => { | ||
await addCartProduct( shopperPage ); | ||
await goToCheckoutWCB( shopperPage ); | ||
await fillBillingAddressWCB( | ||
shopperPage, | ||
config.addresses.customer.billing | ||
); | ||
await fillCardDetailsWCB( shopperPage, config.cards[ '3ds' ] ); | ||
await shopperPage | ||
.getByRole( 'button', { name: 'Place Order' } ) | ||
.click(); | ||
await confirmCardAuthentication( shopperPage ); | ||
await expect( | ||
shopperPage.getByRole( 'heading', { | ||
name: 'Order received', | ||
} ) | ||
).toBeVisible(); | ||
} ); | ||
} | ||
); |
102 changes: 0 additions & 102 deletions
102
tests/e2e/specs/blocks/shopper/shopper-wc-blocks-checkout-purchase.spec.js
This file was deleted.
Oops, something went wrong.