Skip to content

Commit

Permalink
feat: apply changes to schematics
Browse files Browse the repository at this point in the history
  • Loading branch information
field123 committed Nov 20, 2023
1 parent c7f0598 commit 1012059
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export function createD2CCheckoutPage(page: Page): D2CCheckoutPage {
},
async continueShopping() {
await continueShoppingBtn.click();
await expect(page).toHaveURL(`/`);
await expect(
page.getByRole("heading", { name: "Your Elastic Path storefront" }),
).toBeVisible();
},
};
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
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";
Expand All @@ -10,7 +9,6 @@ import { skipIfCIEnvironment } from "./util/skip-ci-env";
test.describe("Checkout flow", async () => {
test.beforeEach(async () => {
skipIfCIEnvironment();
await skipIfMissingCatalog();
await gatewayIsEnabled();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { createD2CHomePage } from "./models/d2c-home-page";
import { skipIfMissingCatalog } from "./util/missing-published-catalog";

test.describe("Home Page", async () => {
test.beforeEach(async () => {
await skipIfMissingCatalog();
});

test("should load home page", async ({ page }) => {
const d2cHomePage = createD2CHomePage(page);
await d2cHomePage.goto();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ 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);
Expand All @@ -31,7 +25,7 @@ test.describe("Checkout flow", async () => {

/* Enter information */
await checkoutPage.enterInformation({
"Email Address": { value: "[email protected]", fieldType: "input" },
Email: { value: "[email protected]", fieldType: "input" },
"First Name": { value: "Jim", fieldType: "input" },
"Last Name": { value: "Brown", fieldType: "input" },
"Street Address": { value: "Main Street", fieldType: "input" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import { client } from "./util/epcc-client";
import { skipIfMissingCatalog } from "./util/missing-published-catalog";

test.describe("Product Details Page", async () => {
test.beforeEach(async () => {
await skipIfMissingCatalog();
});

test("should add a simple product to cart", async ({ page }) => {
const productDetailPage = createD2CProductDetailPage(page, client);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,13 @@ const config: PlaywrightTestConfig = {
...devices["Desktop Firefox"],
},
},
{
name: "Desktop Safari",
use: {
...devices["Desktop Safari"],
},
},
// Test against mobile viewports.
{
name: "Mobile Chrome",
use: {
...devices["Pixel 5"],
},
},
{
name: "Mobile Safari",
use: devices["iPhone 12"],
},
],
};
export default config;

0 comments on commit 1012059

Please sign in to comment.