saleor-dashboard/cypress/url/urlList.js
Karolina Rakoczy e76c78a23b
tests for shipping (#1173)
* tests for shipping

* fix typo

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>

* add data-test-id

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
2021-07-12 11:50:50 +03:00

42 lines
1.4 KiB
JavaScript

export const urlList = {
apiUri: Cypress.env("API_URI"),
channels: "channels/",
configuration: "configuration/",
draftOrders: "orders/drafts/",
homePage: "/",
orders: "orders/",
products: "products/",
warehouses: "warehouses/",
shippingMethods: "shipping/",
sales: "discounts/sales/",
collections: "collections/",
vouchers: "discounts/vouchers/",
staffMembers: "staff/",
newPassword: "new-password/",
permissionsGroups: "permission-groups/",
weightRete: "weight/",
attributes: "attributes/",
productTypes: "product-types/"
};
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}`;
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}`;
export const productTypeDetailsUrl = productTypeId =>
`${urlList.productTypes}${productTypeId}`;