saleor-dashboard/cypress/fixtures/permissions.js
Wojciech Mista c922dfb6fe
Application Marketplace available in dashboard (#2054)
* Add marketplace

* Update messages

* Extract styles

* Update test env

* Update config and rename uri

* Update template

* Trigger CI

* Possible fix

* Update deploy yml

* Add marketplace to staging

* Fix responsiveness

* Trigger CI

* Fix navigation tests (#2081)

* fix navigate through shop

* wait for progress bar not to exist

* simplify code

* add wait

* Fix navigate through shop (#2076)

* fix navigate through shop

* wait for progress bar not to exist

* simplify code

* Refine App about section (#2056)

* Trigger CI

* Trigger CI

* Trigger CI

* Trigger CI

* Fix app activation/deactivation

* Hide configuration url and policy if theres none

* Remove about and support links

* Remove unused code

* Update stories and tests

* Update messages

* Fix privacy policy

* Fix activation and "open app"

* Update tests

Co-authored-by: Karolina Rakoczy <rakoczy.karolina@gmail.com>
2022-06-08 08:44:28 +02:00

98 lines
2.7 KiB
JavaScript

import * as menuSelectors from "../elements/account/left-menu/left-menu-selectors";
import { CONFIGURATION_SELECTORS } from "../elements/configuration/configuration-selectors";
const configurationAsParent = {
parentMenuSelector: menuSelectors.LEFT_MENU_SELECTORS.configuration,
parentSelectors: CONFIGURATION_SELECTORS
};
export const PERMISSIONS = {
channel: {
parent: configurationAsParent,
permissionSelectors: [CONFIGURATION_SELECTORS.channels]
},
customer: {
permissionSelectors: [menuSelectors.LEFT_MENU_SELECTORS.customers]
},
discounts: {
parent: {
parentMenuSelector: menuSelectors.LEFT_MENU_SELECTORS.discounts,
parentSelectors: [menuSelectors.DISCOUNTS_MENU_SELECTORS]
},
permissionSelectors: [
menuSelectors.DISCOUNTS_MENU_SELECTORS.sales,
menuSelectors.DISCOUNTS_MENU_SELECTORS.vouchers
]
},
order: {
parent: {
parentMenuSelector: menuSelectors.LEFT_MENU_SELECTORS.orders,
parentSelectors: menuSelectors.ORDERS
},
permissionSelectors: [
menuSelectors.ORDERS.orders,
menuSelectors.ORDERS.draftOrders
]
},
page: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.pageTypes,
menuSelectors.LEFT_MENU_SELECTORS.pages
]
},
plugin: {
parent: configurationAsParent,
permissionSelectors: [CONFIGURATION_SELECTORS.plugin]
},
product: {
parent: {
parentMenuSelector: menuSelectors.LEFT_MENU_SELECTORS.catalog,
parentSelectors: menuSelectors.CATALOG
},
permissionSelectors: [
menuSelectors.CATALOG.categories,
menuSelectors.CATALOG.collections,
menuSelectors.CATALOG.products
]
},
productTypeAndAttribute: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.attributes,
CONFIGURATION_SELECTORS.productTypes
]
},
pageTypeAndAttribute: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.pageTypes,
CONFIGURATION_SELECTORS.attributes
]
},
settings: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.taxes,
CONFIGURATION_SELECTORS.settings
]
},
shipping: {
parent: configurationAsParent,
permissionSelectors: [CONFIGURATION_SELECTORS.shipping]
},
staff: {
parent: configurationAsParent,
permissionSelectors: [
CONFIGURATION_SELECTORS.staffMembers,
CONFIGURATION_SELECTORS.permissionGroups
]
},
translations: {
permissionSelectors: [menuSelectors.LEFT_MENU_SELECTORS.translations]
},
warehouse: {
parent: configurationAsParent,
permissionSelectors: [CONFIGURATION_SELECTORS.warehouse]
}
};