-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: turbo made aware of the outputs of next apps (#128)
* build: turbo made aware of the outputs of next apps * fix: no payment view for manual payment setup * chore: generated latest examples * feat: latest examples * feat: changelog --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
3218ac8
commit c1d0fd1
Showing
6 changed files
with
64 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@elasticpath/d2c-schematics": patch | ||
--- | ||
|
||
e2e test fixed for checkout manual flow |
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
File renamed without changes.
57 changes: 57 additions & 0 deletions
57
packages/d2c-schematics/manual-payment-gateway/files/e2e/checkout-flow.spec.ts.template
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,57 @@ | ||
import { test } from "@playwright/test"; | ||
import { createD2CProductDetailPage } from "./models/d2c-product-detail-page"; | ||
import { client } from "./util/epcc-client"; | ||
import { skipIfMissingCatalog } from "./util/missing-published-catalog"; | ||
import { createD2CCartPage } from "./models/d2c-cart-page"; | ||
import { createD2CCheckoutPage } from "./models/d2c-checkout-page"; | ||
import { gatewayIsEnabled } from "./util/gateway-is-enabled"; | ||
import { skipIfCIEnvironment } from "./util/skip-ci-env"; | ||
|
||
test.describe("Checkout flow", async () => { | ||
test.beforeEach(async () => { | ||
skipIfCIEnvironment(); | ||
await skipIfMissingCatalog(); | ||
await gatewayIsEnabled(); | ||
}); | ||
|
||
test("should perform product checkout", async ({ page }) => { | ||
const productDetailPage = createD2CProductDetailPage(page, client); | ||
const cartPage = createD2CCartPage(page); | ||
const checkoutPage = createD2CCheckoutPage(page); | ||
|
||
/* Go to simple product page */ | ||
await productDetailPage.gotoSimpleProduct(); | ||
|
||
/* Add the product to cart */ | ||
await productDetailPage.addProductToCart(); | ||
|
||
/* Go to cart page and checkout */ | ||
await cartPage.goto(); | ||
await cartPage.checkoutCart(); | ||
|
||
/* Enter information */ | ||
await checkoutPage.enterInformation({ | ||
"Email Address": { value: "[email protected]", fieldType: "input" }, | ||
"First Name": { value: "Jim", fieldType: "input" }, | ||
"Last Name": { value: "Brown", fieldType: "input" }, | ||
"Street Address": { value: "Main Street", fieldType: "input" }, | ||
"Extended Address": { value: "Extended Address", fieldType: "input" }, | ||
City: { value: "Brownsville", fieldType: "input" }, | ||
County: { value: "Brownsville County", fieldType: "input" }, | ||
Region: { value: "Browns", fieldType: "input" }, | ||
Postcode: { value: "ABC 123", fieldType: "input" }, | ||
Country: { value: "Algeria", fieldType: "select" }, | ||
"Phone Number": { value: "01234567891", fieldType: "input" }, | ||
"Additional Instructions": { | ||
value: "This is some extra instructions.", | ||
fieldType: "input", | ||
}, | ||
}); | ||
|
||
await checkoutPage.checkout(); | ||
await checkoutPage.checkOrderComplete; | ||
|
||
/* Continue Shopping */ | ||
await checkoutPage.continueShopping(); | ||
}); | ||
}); |
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