-
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.
Update tests to add products to cart by name instead of ID
- Loading branch information
1 parent
d5930df
commit 5df9643
Showing
25 changed files
with
127 additions
and
165 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
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
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
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 |
---|---|---|
|
@@ -10,10 +10,7 @@ import * as shopper from '../../../utils/shopper'; | |
import { getMerchant, getShopper } from '../../../utils/helpers'; | ||
import * as merchant from '../../../utils/merchant'; | ||
import { config } from '../../../config/default'; | ||
import { | ||
goToProductPageBySlug, | ||
goToShop, | ||
} from '../../../utils/shopper-navigation'; | ||
import { goToProductPageBySlug } from '../../../utils/shopper-navigation'; | ||
|
||
test.describe( 'Klarna Checkout', () => { | ||
let merchantPage: Page; | ||
|
@@ -54,16 +51,19 @@ test.describe( 'Klarna Checkout', () => { | |
} ); | ||
|
||
test( 'allows to use Klarna as a payment method', async () => { | ||
await goToShop( shopperPage ); | ||
await shopper.setupProductCheckout( shopperPage, [ [ 'Belt', 1 ] ], { | ||
...config.addresses.customer.billing, | ||
// these are Klarna-specific values: | ||
// https://docs.klarna.com/resources/test-environment/sample-customer-data/#united-states-of-america | ||
email: '[email protected]', | ||
phone: '+13106683312', | ||
firstname: 'Test', | ||
lastname: 'Person-us', | ||
} ); | ||
await shopper.setupProductCheckout( | ||
shopperPage, | ||
[ [ config.products.belt, 1 ] ], | ||
{ | ||
...config.addresses.customer.billing, | ||
// these are Klarna-specific values: | ||
// https://docs.klarna.com/resources/test-environment/sample-customer-data/#united-states-of-america | ||
email: '[email protected]', | ||
phone: '+13106683312', | ||
firstname: 'Test', | ||
lastname: 'Person-us', | ||
} | ||
); | ||
|
||
await shopperPage | ||
.locator( '.wc_payment_methods' ) | ||
|
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
Oops, something went wrong.