saleor-dashboard/cypress/url/urlList.js

47 lines
1.5 KiB
JavaScript
Raw Normal View History

export const urlList = {
apiUri: Cypress.env("API_URI"),
channels: "channels/",
configuration: "configuration/",
draftOrders: "orders/drafts/",
homePage: "/",
orders: "orders/",
products: "products/",
2021-02-18 09:00:08 +00:00
warehouses: "warehouses/",
shippingMethods: "shipping/",
sales: "discounts/sales/",
collections: "collections/",
vouchers: "discounts/vouchers/",
staffMembers: "staff/",
newPassword: "new-password/",
2021-07-05 10:21:35 +00:00
permissionsGroups: "permission-groups/",
weightRete: "weight/",
attributes: "attributes/",
productTypes: "product-types/",
2021-07-15 10:27:07 +00:00
apps: "apps/",
customers: "customers/"
};
export const productDetailsUrl = productId => `${urlList.products}${productId}`;
export const userDetailsUrl = userId => `${urlList.staffMembers}${userId}`;
export const staffMemberDetailsUrl = staffMemberId =>
`${urlList.staffMembers}${staffMemberId}`;
export const permissionGroupDetails = permissionGroupId =>
`${urlList.permissionsGroups}${permissionGroupId}`;
2021-07-05 10:21:35 +00:00
export const shippingZoneDetailsUrl = shippingZoneId =>
`${urlList.shippingMethods}${shippingZoneId}`;
export const weightRateUrl = (shippingZoneId, weightRateId) =>
`${urlList.shippingMethods}${shippingZoneId}/${urlList.weightRete}${weightRateId}`;
export const warehouseDetailsUrl = warehouseId =>
`${urlList.warehouses}${warehouseId}`;
2021-07-05 10:21:35 +00:00
export const productTypeDetailsUrl = productTypeId =>
`${urlList.productTypes}${productTypeId}`;
2021-07-15 10:27:07 +00:00
export const appDetailsUrl = appId => `${urlList.apps}custom/${appId}`;