fix links to shipping rates (#1916)
This commit is contained in:
parent
2b2b4de4dd
commit
5e0c8d25dd
3 changed files with 8 additions and 13 deletions
|
@ -18,7 +18,6 @@ export const urlList = {
|
|||
pageTypes: "page-types/",
|
||||
permissionsGroups: "permission-groups/",
|
||||
plugins: "plugins/",
|
||||
priceRate: "price/",
|
||||
products: "products/",
|
||||
productTypes: "product-types/",
|
||||
sales: "discounts/sales/",
|
||||
|
@ -30,8 +29,7 @@ export const urlList = {
|
|||
variants: "variant/",
|
||||
vouchers: "discounts/vouchers/",
|
||||
variant: "variant/",
|
||||
warehouses: "warehouses/",
|
||||
weightRete: "weight/"
|
||||
warehouses: "warehouses/"
|
||||
};
|
||||
|
||||
export const appDetailsUrl = appId => `${urlList.apps}custom/${appId}`;
|
||||
|
@ -77,11 +75,8 @@ export const shippingZoneDetailsUrl = shippingZoneId =>
|
|||
|
||||
export const userDetailsUrl = userId => `${urlList.staffMembers}${userId}`;
|
||||
|
||||
export const weightRateUrl = (shippingZoneId, weightRateId) =>
|
||||
`${urlList.shippingMethods}${shippingZoneId}/${urlList.weightRete}${weightRateId}`;
|
||||
|
||||
export const priceRateUrl = (shippingZoneId, priceRateId) =>
|
||||
`${urlList.shippingMethods}${shippingZoneId}/${urlList.priceRate}${priceRateId}`;
|
||||
export const shippingRateUrl = (shippingZoneId, weightRateId) =>
|
||||
`${urlList.shippingMethods}${shippingZoneId}/${weightRateId}`;
|
||||
|
||||
export const warehouseDetailsUrl = warehouseId =>
|
||||
`${urlList.warehouses}${warehouseId}`;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
import faker from "faker";
|
||||
|
||||
import { priceRateUrl } from "../../../fixtures/urlList";
|
||||
import { shippingRateUrl } from "../../../fixtures/urlList";
|
||||
import {
|
||||
addChannelToShippingMethod,
|
||||
createShippingRate,
|
||||
|
@ -59,7 +59,7 @@ filterTests({ definedTags: ["all"] }, () => {
|
|||
const updatedRateName = `${startsWith}Updated`;
|
||||
const deliveryTime = { min: 1, max: 7 };
|
||||
|
||||
cy.visit(priceRateUrl(shippingZone.id, shippingMethod.id));
|
||||
cy.visit(shippingRateUrl(shippingZone.id, shippingMethod.id));
|
||||
fillUpShippingRate({
|
||||
rateName: updatedRateName,
|
||||
price,
|
||||
|
@ -82,7 +82,7 @@ filterTests({ definedTags: ["all"] }, () => {
|
|||
|
||||
it("should be able to delete shipping rate. TC: SALEOR_0807", () => {
|
||||
cy.visit(
|
||||
priceRateUrl(shippingZone.id, shippingMethod.id)
|
||||
shippingRateUrl(shippingZone.id, shippingMethod.id)
|
||||
).deleteElementWithReqAlias("DeleteShippingRate");
|
||||
getShippingZone(shippingZone.id).then(({ shippingMethods }) => {
|
||||
const deletedShipping = shippingMethods.find(
|
||||
|
|
|
@ -5,7 +5,7 @@ import faker from "faker";
|
|||
|
||||
import { SHARED_ELEMENTS } from "../../../../elements/shared/sharedElements";
|
||||
import { SHIPPING_RATE_DETAILS } from "../../../../elements/shipping/shipping-rate-details";
|
||||
import { urlList, weightRateUrl } from "../../../../fixtures/urlList";
|
||||
import { shippingRateUrl, urlList } from "../../../../fixtures/urlList";
|
||||
import {
|
||||
createShippingRate as createShippingRateViaApi,
|
||||
createShippingZone
|
||||
|
@ -73,7 +73,7 @@ filterTests({ definedTags: ["all"] }, () => {
|
|||
changeWeightUnit("G");
|
||||
|
||||
cy.addAliasToGraphRequest("ShippingZone");
|
||||
cy.visit(weightRateUrl(shippingZone.id, shippingMethod.id))
|
||||
cy.visit(shippingRateUrl(shippingZone.id, shippingMethod.id))
|
||||
.wait("@ShippingZone")
|
||||
.its("response.body");
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue