Skip to content
Merged
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
9 changes: 7 additions & 2 deletions src/versions/develop/pages/BO/shipping/carriers/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class BOCarriersCreatePage extends BOBasePage implements BOCarriersCreatePageInt

protected freeShippingToggle: (toggle: string) => string;

protected billingConfigRadioButton: string;

protected billingPriceRadioButton: string;

protected billingWeightButton: string;
Expand Down Expand Up @@ -122,8 +124,9 @@ class BOCarriersCreatePage extends BOBasePage implements BOCarriersCreatePageInt
this.addHandlingCostsToggle = (toggle: string) => `${this.carrierForm
} #carrier_shipping_settings_has_additional_handling_fee_${toggle}`;
this.freeShippingToggle = (toggle: string) => `${this.carrierForm} #carrier_shipping_settings_is_free_${toggle}`;
this.billingPriceRadioButton = `${this.carrierForm} #carrier_shipping_settings_shipping_method_0`;
Comment thread
Progi1984 marked this conversation as resolved.
this.billingWeightButton = `${this.carrierForm} #carrier_shipping_settings_shipping_method_1`;
this.billingConfigRadioButton = `${this.carrierForm} input[name="carrier[shipping_settings][shipping_method]"][value="0"]`;
this.billingPriceRadioButton = `${this.carrierForm} input[name="carrier[shipping_settings][shipping_method]"][value="2"]`;
this.billingWeightButton = `${this.carrierForm} input[name="carrier[shipping_settings][shipping_method]"][value="1"]`;
this.taxRuleSelect = `${this.carrierForm} #carrier_shipping_settings_id_tax_rule_group`;
this.rangeBehaviorSelect = `${this.carrierForm} #carrier_shipping_settings_range_behavior`;
/// Zones
Expand Down Expand Up @@ -227,6 +230,8 @@ class BOCarriersCreatePage extends BOBasePage implements BOCarriersCreatePageInt
await this.selectByVisibleText(page, this.taxRuleSelect, carrierData.taxRule);
if (carrierData.billing === 'According to total price') {
await page.locator(this.billingPriceRadioButton).click();
} else if (carrierData.billing === 'Based on the shop configuration') {
await page.locator(this.billingConfigRadioButton).click();
} else {
await page.locator(this.billingWeightButton).click();
}
Expand Down
Loading