Skip to content

Commit

Permalink
build: turbo made aware of the outputs of next apps (#128)
Browse files Browse the repository at this point in the history
* 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
field123 and github-actions[bot] authored Nov 16, 2023
1 parent 3218ac8 commit c1d0fd1
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["algolia", "basic"]
"ignore": ["algolia", "simple", "payments"]
}
5 changes: 5 additions & 0 deletions .changeset/pink-spoons-attend.md
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
11 changes: 0 additions & 11 deletions examples/simple/e2e/checkout-flow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,7 @@ test.describe("Checkout flow", async () => {
},
});

/* Move to payment */
await checkoutPage.checkout();

await checkoutPage.enterPaymentInformation({
"Card number": { value: "4242424242424242", fieldType: "input" },
Expiration: { value: "1272", fieldType: "input" },
CVC: { value: "123", fieldType: "input" },
Country: { value: "United Kingdom", fieldType: "select" },
"Postal code": { value: "ABC 123", fieldType: "input" },
});

await checkoutPage.submitPayment();
await checkoutPage.checkOrderComplete;

/* Continue Shopping */
Expand Down
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();
});
});
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
"outputs": ["dist/**", ".next/**", "!.next/cache/**"]
},
"generate": {
"outputs": []
Expand Down

0 comments on commit c1d0fd1

Please sign in to comment.