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