This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): problems with init on windows (#921)
- Loading branch information
Showing
24 changed files
with
367 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const jetpack = require("fs-jetpack"); | ||
|
||
function run() { | ||
jetpack.remove("./build"); | ||
} | ||
run(); |
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,9 @@ | ||
const jetpack = require("fs-jetpack"); | ||
const path = require("path"); | ||
|
||
function run() { | ||
const sourceDir = path.join("src", "templates"); | ||
const destinationDir = path.join("build", "templates"); | ||
jetpack.copy(sourceDir, destinationDir); | ||
} | ||
run(); |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const STAGES = { | ||
STABLE: "latest stable (recommended)", | ||
CANARY: "canary (current master branch)", | ||
LOCAL: "local contibution (to contribute locally in shopware-pwa)", | ||
}; |
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
packages/default-theme/__e2e__/integration/checkout_guest_desktop.spec.js
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,16 @@ | ||
describe("Test Checkout for guest, different billing address, paid in advance, desktop", () => { | ||
beforeEach(() => { | ||
cy.viewport(1280, 800) | ||
}) | ||
it("checks if place my order button works", () => { | ||
cy.addtocart() | ||
cy.wait(1000) | ||
cy.personal_detail_step() | ||
cy.shipping_step() | ||
cy.payment_step() | ||
cy.rewiev_guest_pay_inadvance() | ||
cy.get("[data-cy=place-my-order]").click({ force: true }) | ||
cy.wait(2000) | ||
cy.url().should("contain", Cypress.config().baseUrl + "order?orderId=") | ||
}) | ||
}) |
55 changes: 55 additions & 0 deletions
55
packages/default-theme/__e2e__/integration/checkout_payment_step.js
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,55 @@ | ||
describe("Payment step with different address for billing and pay in advance method", () => { | ||
beforeEach(() => { | ||
cy.viewport(1280, 800) | ||
cy.addtocart() | ||
cy.wait(1000) | ||
cy.personal_detail_step() | ||
cy.shipping_step() | ||
cy.payment_step() | ||
}) | ||
it("check if there are radio buttons for payment methods", () => { | ||
cy.get('[type="radio"]').should("exist") | ||
cy.get(".sf-radio__label").should("not.be.empty") | ||
}) | ||
it("check if go back to shipping button exist", () => { | ||
cy.get("button").contains("Go back", { matchCase: false }) | ||
}) | ||
it("check if go back to shipping button work", () => { | ||
cy.get("button") | ||
.contains("Go back", { matchCase: false }) | ||
.click({ force: true }) | ||
cy.url().should("eq", Cypress.config().baseUrl + "checkout?step=SHIPPING") | ||
cy.get("[data-cy=continue-to-payment]").click({ force: true }) | ||
}) | ||
it("check if there is checkobox for use different address for billing", () => { | ||
cy.get('[type="checkbox"]').should("exist") | ||
cy.get(".sf-checkbox__label").should("not.be.empty") | ||
}) | ||
|
||
it("requires filling in all the fields", () => { | ||
cy.get('[type="checkbox"]').check({ force: true }) | ||
cy.get("[data-cy=review-order]").click({ force: true }) | ||
|
||
cy.get("[data-cy=form] > [error-message]") | ||
.should("have.length", 8) | ||
.each(($el, index, $list) => { | ||
expect($el).to.contain("This field is required") | ||
}) | ||
}) | ||
it.only("contiunue to rewiev order after filling in address for billing", () => { | ||
cy.get('[type="checkbox"]').check({ force: true }) | ||
cy.get("[data-cy=first-name]").last().clear().type("Bill") | ||
cy.get("[data-cy=last-name]").last().clear().type("Bing") | ||
cy.get("[data-cy=street-name]").last().clear().type("Billable") | ||
cy.get("[data-cy=apartment]").last().clear().type("12") | ||
cy.get("[data-cy=city]").last().clear().type("BillCity") | ||
cy.get("[data-cy=state]").last().clear().type("BillState") | ||
cy.get("[data-cy=zipcode]").last().clear().type("1112SC") | ||
cy.get("[data-cy=phone]").last().clear().type("987654321") | ||
cy.get("[data-cy=country]").click() | ||
cy.get("li").contains("Poland").click({ force: true }) | ||
cy.get('[type="radio"]').eq(2).check({ force: true }) | ||
cy.get("[data-cy=review-order]").click({ force: true }) | ||
cy.url().should("eq", Cypress.config().baseUrl + "checkout?step=REVIEW") | ||
}) | ||
}) |
56 changes: 56 additions & 0 deletions
56
packages/default-theme/__e2e__/integration/checkout_personal_detail_step.js
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,56 @@ | ||
describe("Test Personal detail step", () => { | ||
beforeEach(() => { | ||
cy.viewport(1280, 800) | ||
cy.addtocart() | ||
cy.wait(1000) | ||
cy.personal_detail_step() | ||
}) | ||
it("check if go back to shop button exist", () => { | ||
cy.wait(2000) | ||
cy.get("button").contains("Go Back to shop", { matchCase: false }) | ||
}) | ||
it("check if go back to shop button work", () => { | ||
cy.wait(2000) | ||
cy.get("[data-cy=go-back-to-shop-button").click({ force: true }) | ||
cy.url().should("eq", Cypress.config().baseUrl) | ||
}) | ||
it("requires first name, last name and email", () => { | ||
cy.get("[data-cy=cart-icon] > .sf-icon-path").click({ force: true }) | ||
cy.get("[data-cy=goToCheckout-button").click({ force: true }) | ||
cy.wait(2000) | ||
cy.get("button").contains("Continue to shipping").click({ force: true }) | ||
cy.get('[label="First name"] > .sf-input__error-message > div').should( | ||
"contain", | ||
"First name is required" | ||
) | ||
cy.get("[data-cy=first-name]").should("contain", "First name is required") | ||
cy.get("[data-cy=last-name").should("contain", "last name is required") | ||
cy.get("[data-cy=proper-email").should( | ||
"contain", | ||
"Proper email is required" | ||
) | ||
}) | ||
it("requires vailid email", () => { | ||
cy.get(".sf-input__wrapper > [data-cy=first-name]").type("Joe") | ||
cy.get(".sf-input__wrapper > [data-cy=last-name]").type("Example") | ||
cy.get(".sf-input__wrapper > [data-cy=proper-email]").type("invalid") | ||
cy.get("[data-cy=continue-to-shipping-button]").click({ force: true }) | ||
cy.get("[data-cy=proper-email").should( | ||
"contain", | ||
"Proper email is required" | ||
) | ||
}) | ||
it("continue to shipping after giving vaild first name, last name and email", () => { | ||
cy.get(".sf-input__wrapper > [data-cy=first-name]").type("Joe") | ||
cy.get(".sf-input__wrapper > [data-cy=last-name]").type("Example") | ||
cy.get(".sf-input__wrapper > [data-cy=proper-email]") | ||
.clear() | ||
.type("joe@example.com") | ||
cy.get("[data-cy=proper-email]").should( | ||
"not.contain", | ||
"Proper email is required" | ||
) | ||
cy.get("[data-cy=continue-to-shipping-button]").click({ force: true }) | ||
cy.url().should("contain", "step=SHIPPING") | ||
}) | ||
}) |
55 changes: 55 additions & 0 deletions
55
packages/default-theme/__e2e__/integration/checkout_shipping_step.js
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,55 @@ | ||
describe("shipping step", () => { | ||
beforeEach(() => { | ||
cy.viewport(1280, 800) | ||
cy.addtocart() | ||
cy.wait(1000) | ||
cy.personal_detail_step() | ||
cy.shipping_step() | ||
}) | ||
it("requires filling in all the fields", () => { | ||
cy.get("[data-cy=continue-to-payment]").click({ force: true }) | ||
|
||
cy.get("[data-cy=form] > [error-message]") | ||
.should("have.length", 8) | ||
.each(($el, index, $list) => { | ||
expect($el).to.contain("This field is required", { matchCase: false }) | ||
}) | ||
|
||
cy.get("[data-cy=country]").should("contain", "This field is required") | ||
}) | ||
it("check if go back to personal details button exist", () => { | ||
cy.get("button").contains("Go Back", { matchCase: false }).should("exist") | ||
}) | ||
it("check if go back to personal details button work", () => { | ||
cy.get("button") | ||
.contains("Go Back", { matchCase: false }) | ||
.click({ force: true }) | ||
cy.url().should( | ||
"eq", | ||
Cypress.config().baseUrl + "checkout?step=PERSONAL_DETAILS" | ||
) | ||
cy.get("[data-cy=continue-to-shipping-button]").click({ force: true }) | ||
}) | ||
it("shows message: Shipping methods", () => { | ||
cy.contains("Shipping methods", { matchCase: false }) | ||
}) | ||
it("check if there are radio buttons for shipping methods", () => { | ||
cy.get('[type="radio"]').should("exist") | ||
cy.get(".sf-radio__label").should("not.be.empty") | ||
}) | ||
it("continue to payment after filing in shipping details", () => { | ||
cy.get("[data-cy=first-name]").last().clear().type("Joe") | ||
cy.get("[data-cy=last-name]").last().clear().type("Example") | ||
cy.get("[data-cy=street-name]").last().clear().type("TestStreet") | ||
cy.get("[data-cy=apartment]").last().clear().type("1") | ||
cy.get("[data-cy=city]").last().clear().type("TestCity") | ||
cy.get("[data-cy=state]").last().clear().type("TestState") | ||
cy.get("[data-cy=zipcode]").last().clear().type("11-11a") | ||
cy.get("[data-cy=phone]").last().clear().type("123456789") | ||
cy.get('[type="radio"]').last().check({ force: true }) | ||
cy.get("[data-cy=country]").click() | ||
cy.get("li").contains("Poland").click({ force: true }) | ||
cy.get("[data-cy=continue-to-payment]").click({ force: true }) | ||
cy.url().should("eq", Cypress.config().baseUrl + "checkout?step=PAYMENT") | ||
}) | ||
}) |
50 changes: 50 additions & 0 deletions
50
packages/default-theme/__e2e__/integration/checkout_summary.js
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,50 @@ | ||
const { isTaggedTemplateExpression } = require("typescript") | ||
|
||
describe("Test Checkout functionality for guest user Desktop view", () => { | ||
beforeEach(() => { | ||
cy.viewport(1280, 800) | ||
cy.addtocart() | ||
cy.wait(1000) | ||
cy.personal_detail_step() | ||
cy.shipping_step() | ||
cy.payment_step() | ||
cy.rewiev_guest_pay_inadvance() | ||
}) | ||
it("check if go back to payment button exist", () => { | ||
cy.get("button") | ||
.contains("Go back to Payment", { matchCase: false }) | ||
.should("exist") | ||
}) | ||
it("check if go back to payment button works", () => { | ||
cy.get("[data-cy=go-back-to-payment]").click({ force: true }) | ||
cy.url().should("eq", Cypress.config().baseUrl + "checkout?step=PAYMENT") | ||
}) | ||
it("check if product image is visible", () => { | ||
cy.get("[data-cy=product-image]").should("be.visible") | ||
}) | ||
it.skip("check quantity and amount", () => { | ||
cy.get("[data-cy=quantity]").should("contain", 1) | ||
}) | ||
it("check if personal details are correct", () => { | ||
cy.get("[data-cy=name]") | ||
.should("contain", "Joe Example", { matchCase: false }) | ||
.and("contain", "joe@example.com", { matchCase: false }) | ||
}) | ||
it("check if shipping details are correct", () => { | ||
cy.get("[data-cy=shipping]") | ||
.should("contain", "TestStreet 1, 11-11a", { matchCase: false }) | ||
.and("contain", "TestCity", { matchCase: false }) | ||
.and("contain", "123456789", { matchCase: false }) | ||
}) | ||
it("check if billing address is correct", () => { | ||
cy.get("[data-cy=billing]") | ||
.should("contain", "Billable 12, 1112SC", { matchCase: false }) | ||
.and("contain", "BillCity", { matchCase: false }) | ||
.and("contain", "987654321", { matchCase: false }) | ||
}) | ||
it.only("check if place my order button exist", () => { | ||
cy.get("button") | ||
.contains("Place my order", { matchCase: false }) | ||
.should("exist") | ||
}) | ||
}) |
Oops, something went wrong.
b23cf38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: