Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: turbo made aware of the outputs of next apps #128

Merged
merged 6 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading