Skip to content
Open
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
3 changes: 2 additions & 1 deletion src/locales/de/storefront/checkout.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"completeOrder": "Bestellung abschließen",
"submitOrder": "Zahlungspflichtig bestellen",
"termsAndConditions": "Ich habe die AGB gelesen und bin mit ihnen einverstanden.",
"immediateAccessToDigitalProduct": "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt."
"immediateAccessToDigitalProduct": "Ja, ich möchte sofort Zugang zu dem digitalen Inhalt und weiß, dass mein Widerrufsrecht mit dem Zugang erlischt.",
"autoConfirmTermsText": "Mit Ihrer Bestellung akzeptieren Sie unsere AGB und die Widerrufsbelehrung."
},
"finish": {
"thankYouForOrder": "Vielen Dank für Ihre Bestellung"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en/storefront/checkout.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"completeOrder": "Complete order",
"submitOrder": "Submit order",
"termsAndConditions": "I have read and accepted the general terms and conditions.",
"immediateAccessToDigitalProduct": "I want immediate access to the digital content and I acknowledge that thereby I waive my right to cancel."
"immediateAccessToDigitalProduct": "I want immediate access to the digital content and I acknowledge that thereby I waive my right to cancel.",
"autoConfirmTermsText": "By placing your order you accept our Terms and Conditions and cancellation policy."
},
"finish": {
"thankYouForOrder": "Thank you for your order"
Expand Down
2 changes: 2 additions & 0 deletions src/page-objects/storefront/CheckoutConfirm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class CheckoutConfirm implements PageObject {
public readonly grandTotalPrice: Locator;
public readonly taxPrice: Locator;
public readonly submitOrderButton: Locator;
public readonly termsAutoConfirmedText: Locator;

/**
* Payment and Shipping options
Expand Down Expand Up @@ -54,6 +55,7 @@ export class CheckoutConfirm implements PageObject {
this.shippingExpress = page.getByLabel(translate("storefront:checkout:common.express"));

this.cartLineItemImages = page.locator(".line-item-img-link");
this.termsAutoConfirmedText = page.locator(".checkout-confirm-tos-information");
}

url() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ export const ConfirmTermsAndConditions = base.extend<{ ConfirmTermsAndConditions
ConfirmTermsAndConditions: async ({ ShopCustomer, StorefrontCheckoutConfirm }, use) => {
const task = () => {
return async function ConfirmTermsAndConditions() {
await ShopCustomer.presses(StorefrontCheckoutConfirm.termsAndConditionsCheckbox);
await ShopCustomer.expects(StorefrontCheckoutConfirm.termsAndConditionsCheckbox).toBeChecked();
if (await StorefrontCheckoutConfirm.termsAndConditionsCheckbox.isVisible()) {
await ShopCustomer.presses(StorefrontCheckoutConfirm.termsAndConditionsCheckbox);
await ShopCustomer.expects(StorefrontCheckoutConfirm.termsAndConditionsCheckbox).toBeChecked();
}
};
};

Expand Down
Loading