update e2e test

This commit is contained in:
Simone Taeggi 2022-09-08 00:11:12 +02:00
parent f856602bae
commit ad3ff0b455

View File

@ -292,14 +292,14 @@ describe('Role CRUD End to End', () => {
"subCategory": "roles", "subCategory": "roles",
}, },
], ],
"settings": Array [ "settings": [
Object { {
"action": "admin::api-tokens.access", "action": "admin::api-tokens.access",
"category": "api tokens", "category": "api tokens",
"displayName": "Access the API tokens settings page", "displayName": "Access the API tokens settings page",
"subCategory": "api Tokens", "subCategory": "api Tokens",
}, },
Object { {
"action": "admin::api-tokens.create", "action": "admin::api-tokens.create",
"category": "api tokens", "category": "api tokens",
"displayName": "Create (generate)", "displayName": "Create (generate)",
@ -789,14 +789,14 @@ describe('Role CRUD End to End', () => {
"subCategory": "roles", "subCategory": "roles",
}, },
], ],
"settings": Array [ "settings": [
Object { {
"action": "admin::api-tokens.access", "action": "admin::api-tokens.access",
"category": "api tokens", "category": "api tokens",
"displayName": "Access the API tokens settings page", "displayName": "Access the API tokens settings page",
"subCategory": "api Tokens", "subCategory": "api Tokens",
}, },
Object { {
"action": "admin::api-tokens.create", "action": "admin::api-tokens.create",
"category": "api tokens", "category": "api tokens",
"displayName": "Create (generate)", "displayName": "Create (generate)",
@ -1038,329 +1038,493 @@ describe('Role CRUD End to End', () => {
`); `);
} else { } else {
expect(sortedData).toMatchInlineSnapshot(` expect(sortedData).toMatchInlineSnapshot(`
Object { {
"conditions": Array [ "conditions": [
Object { {
"category": "default", "category": "default",
"displayName": "Is creator", "displayName": "Is creator",
"id": "admin::is-creator", "id": "admin::is-creator",
}, },
Object { {
"category": "default", "category": "default",
"displayName": "Has same role as creator", "displayName": "Has same role as creator",
"id": "admin::has-same-role-as-creator", "id": "admin::has-same-role-as-creator",
}, },
], ],
"sections": Object { "sections": {
"contentTypes": Array [ "collectionTypes": [
Object { [
"action": "plugin::content-manager.explorer.create", {
"displayName": "Create", "actionId": "plugin::content-manager.explorer.create",
"subjects": Array [ "applyToProperties": [
"fields",
"locales",
],
"label": "Create",
"subjects": [
"plugin::users-permissions.user", "plugin::users-permissions.user",
], ],
}, },
Object { {
"action": "plugin::content-manager.explorer.delete", "actionId": "plugin::content-manager.explorer.read",
"displayName": "Delete", "applyToProperties": [
"subjects": Array [ "fields",
"locales",
],
"label": "Read",
"subjects": [
"plugin::users-permissions.user", "plugin::users-permissions.user",
], ],
}, },
Object { {
"action": "plugin::content-manager.explorer.publish", "actionId": "plugin::content-manager.explorer.update",
"displayName": "Publish", "applyToProperties": [
"subjects": Array [], "fields",
}, "locales",
Object { ],
"action": "plugin::content-manager.explorer.read", "label": "Update",
"displayName": "Read", "subjects": [
"subjects": Array [
"plugin::users-permissions.user", "plugin::users-permissions.user",
], ],
}, },
Object { {
"action": "plugin::content-manager.explorer.update", "actionId": "plugin::content-manager.explorer.delete",
"displayName": "Update", "applyToProperties": [
"subjects": Array [ "locales",
],
"label": "Delete",
"subjects": [
"plugin::users-permissions.user", "plugin::users-permissions.user",
], ],
}, },
{
"actionId": "plugin::content-manager.explorer.publish",
"applyToProperties": [
"locales",
], ],
"plugins": Array [ "label": "Publish",
Object { "subjects": [],
},
],
[
{
"label": "user",
"properties": [
{
"children": [
{
"label": "username",
"required": true,
"value": "username",
},
{
"label": "email",
"required": true,
"value": "email",
},
{
"label": "provider",
"value": "provider",
},
{
"label": "password",
"value": "password",
},
{
"label": "resetPasswordToken",
"value": "resetPasswordToken",
},
{
"label": "confirmationToken",
"value": "confirmationToken",
},
{
"label": "confirmed",
"value": "confirmed",
},
{
"label": "blocked",
"value": "blocked",
},
{
"label": "role",
"value": "role",
},
],
"label": "Fields",
"value": "fields",
},
],
"uid": "plugin::users-permissions.user",
},
],
],
"plugins": [
{
"action": "plugin::content-manager.collection-types.configure-view", "action": "plugin::content-manager.collection-types.configure-view",
"displayName": "Configure view", "displayName": "Configure view",
"plugin": "plugin::content-manager", "plugin": "content-manager",
"subCategory": "collection types", "subCategory": "collection types",
}, },
Object { {
"action": "plugin::content-manager.components.configure-layout", "action": "plugin::content-manager.components.configure-layout",
"displayName": "Configure Layout", "displayName": "Configure Layout",
"plugin": "plugin::content-manager", "plugin": "content-manager",
"subCategory": "components", "subCategory": "components",
}, },
Object { {
"action": "plugin::content-manager.single-types.configure-view", "action": "plugin::content-manager.single-types.configure-view",
"displayName": "Configure view", "displayName": "Configure view",
"plugin": "plugin::content-manager", "plugin": "content-manager",
"subCategory": "single types", "subCategory": "single types",
}, },
Object { {
"action": "plugin::content-type-builder.read", "action": "plugin::content-type-builder.read",
"displayName": "Read", "displayName": "Read",
"plugin": "plugin::content-type-builder", "plugin": "content-type-builder",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "plugin::documentation.read", "action": "plugin::documentation.read",
"displayName": "Access the Documentation", "displayName": "Access the Documentation",
"plugin": "plugin::documentation", "plugin": "documentation",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "plugin::documentation.settings.regenerate", "action": "plugin::documentation.settings.regenerate",
"displayName": "Regenerate", "displayName": "Regenerate",
"plugin": "plugin::documentation", "plugin": "documentation",
"subCategory": "settings",
},
Object {
"action": "plugin::documentation.settings.update",
"displayName": "Update and delete",
"plugin": "plugin::documentation",
"subCategory": "settings",
},
Object {
"action": "plugin::upload.assets.copy-link",
"displayName": "Copy link",
"plugin": "plugin::upload",
"subCategory": "assets",
},
Object {
"action": "plugin::upload.assets.create",
"displayName": "Create (upload)",
"plugin": "plugin::upload",
"subCategory": "assets",
},
Object {
"action": "plugin::upload.assets.download",
"displayName": "Download",
"plugin": "plugin::upload",
"subCategory": "assets",
},
Object {
"action": "plugin::upload.assets.update",
"displayName": "Update (crop, details, replace) + delete",
"plugin": "plugin::upload",
"subCategory": "assets",
},
Object {
"action": "plugin::upload.read",
"displayName": "Access the Media Library",
"plugin": "plugin::upload",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "plugin::documentation.settings.update",
"displayName": "Update and delete",
"plugin": "documentation",
"subCategory": "general",
},
{
"action": "plugin::upload.assets.copy-link",
"displayName": "Copy link",
"plugin": "upload",
"subCategory": "assets",
},
{
"action": "plugin::upload.assets.create",
"displayName": "Create (upload)",
"plugin": "upload",
"subCategory": "assets",
},
{
"action": "plugin::upload.assets.download",
"displayName": "Download",
"plugin": "upload",
"subCategory": "assets",
},
{
"action": "plugin::upload.assets.update",
"displayName": "Update (crop, details, replace) + delete",
"plugin": "upload",
"subCategory": "assets",
},
{
"action": "plugin::upload.read",
"displayName": "Access the Media Library",
"plugin": "upload",
"subCategory": "general",
},
{
"action": "plugin::users-permissions.advanced-settings.read", "action": "plugin::users-permissions.advanced-settings.read",
"displayName": "Read", "displayName": "Read",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "advancedSettings", "subCategory": "advancedSettings",
}, },
Object { {
"action": "plugin::users-permissions.advanced-settings.update", "action": "plugin::users-permissions.advanced-settings.update",
"displayName": "Edit", "displayName": "Edit",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "advancedSettings", "subCategory": "advancedSettings",
}, },
Object { {
"action": "plugin::users-permissions.email-templates.read", "action": "plugin::users-permissions.email-templates.read",
"displayName": "Read", "displayName": "Read",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "emailTemplates", "subCategory": "emailTemplates",
}, },
Object { {
"action": "plugin::users-permissions.email-templates.update", "action": "plugin::users-permissions.email-templates.update",
"displayName": "Edit", "displayName": "Edit",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "emailTemplates", "subCategory": "emailTemplates",
}, },
Object { {
"action": "plugin::users-permissions.providers.read", "action": "plugin::users-permissions.providers.read",
"displayName": "Read", "displayName": "Read",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "providers", "subCategory": "providers",
}, },
Object { {
"action": "plugin::users-permissions.providers.update", "action": "plugin::users-permissions.providers.update",
"displayName": "Edit", "displayName": "Edit",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "providers", "subCategory": "providers",
}, },
Object { {
"action": "plugin::users-permissions.roles.create", "action": "plugin::users-permissions.roles.create",
"displayName": "Create", "displayName": "Create",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "roles", "subCategory": "roles",
}, },
Object { {
"action": "plugin::users-permissions.roles.delete", "action": "plugin::users-permissions.roles.delete",
"displayName": "Delete", "displayName": "Delete",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "roles", "subCategory": "roles",
}, },
Object { {
"action": "plugin::users-permissions.roles.read", "action": "plugin::users-permissions.roles.read",
"displayName": "Read", "displayName": "Read",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "roles", "subCategory": "roles",
}, },
Object { {
"action": "plugin::users-permissions.roles.update", "action": "plugin::users-permissions.roles.update",
"displayName": "Update", "displayName": "Update",
"plugin": "plugin::users-permissions", "plugin": "users-permissions",
"subCategory": "roles", "subCategory": "roles",
}, },
], ],
"settings": Array [ "settings": [
Object { {
"action": "admin::api-tokens.access", "action": "admin::api-tokens.access",
"category": "api tokens", "category": "api tokens",
"displayName": "Access the API tokens settings page", "displayName": "Access the API tokens settings page",
"subCategory": "api Tokens", "subCategory": "api Tokens",
}, },
Object { {
"action": "admin::api-tokens.create", "action": "admin::api-tokens.create",
"category": "api tokens", "category": "api tokens",
"displayName": "Create (generate)", "displayName": "Create (generate)",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "admin::api-tokens.delete", "action": "admin::api-tokens.delete",
"category": "api tokens", "category": "api tokens",
"displayName": "Delete (revoke)", "displayName": "Delete (revoke)",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "admin::api-tokens.read", "action": "admin::api-tokens.read",
"category": "api tokens", "category": "api tokens",
"displayName": "Read", "displayName": "Read",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "admin::api-tokens.update", "action": "admin::api-tokens.update",
"category": "api tokens", "category": "api tokens",
"displayName": "Update", "displayName": "Update",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "admin::marketplace.plugins.install", "action": "admin::marketplace.plugins.install",
"category": "plugins and marketplace", "category": "plugins and marketplace",
"displayName": "Install (only for dev env)", "displayName": "Install (only for dev env)",
"subCategory": "plugins", "subCategory": "plugins",
}, },
Object { {
"action": "admin::marketplace.plugins.uninstall", "action": "admin::marketplace.plugins.uninstall",
"category": "plugins and marketplace", "category": "plugins and marketplace",
"displayName": "Uninstall (only for dev env)", "displayName": "Uninstall (only for dev env)",
"subCategory": "plugins", "subCategory": "plugins",
}, },
Object { {
"action": "admin::marketplace.read", "action": "admin::marketplace.read",
"category": "plugins and marketplace", "category": "plugins and marketplace",
"displayName": "Access the marketplace", "displayName": "Access the marketplace",
"subCategory": "marketplace", "subCategory": "marketplace",
}, },
Object { {
"action": "admin::project-settings.read",
"category": "project",
"displayName": "Read the project level settings",
"subCategory": "general",
},
{
"action": "admin::project-settings.update", "action": "admin::project-settings.update",
"category": "project", "category": "project",
"displayName": "Update the project level settings", "displayName": "Update the project level settings",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "admin::roles.create", "action": "admin::roles.create",
"category": "users and roles", "category": "users and roles",
"displayName": "Create", "displayName": "Create",
"subCategory": "roles", "subCategory": "roles",
}, },
Object { {
"action": "admin::roles.delete", "action": "admin::roles.delete",
"category": "users and roles", "category": "users and roles",
"displayName": "Delete", "displayName": "Delete",
"subCategory": "roles", "subCategory": "roles",
}, },
Object { {
"action": "admin::roles.read", "action": "admin::roles.read",
"category": "users and roles", "category": "users and roles",
"displayName": "Read", "displayName": "Read",
"subCategory": "roles", "subCategory": "roles",
}, },
Object { {
"action": "admin::roles.update", "action": "admin::roles.update",
"category": "users and roles", "category": "users and roles",
"displayName": "Update", "displayName": "Update",
"subCategory": "roles", "subCategory": "roles",
}, },
Object { {
"action": "admin::users.create", "action": "admin::users.create",
"category": "users and roles", "category": "users and roles",
"displayName": "Create (invite)", "displayName": "Create (invite)",
"subCategory": "users", "subCategory": "users",
}, },
Object { {
"action": "admin::users.delete", "action": "admin::users.delete",
"category": "users and roles", "category": "users and roles",
"displayName": "Delete", "displayName": "Delete",
"subCategory": "users", "subCategory": "users",
}, },
Object { {
"action": "admin::users.read", "action": "admin::users.read",
"category": "users and roles", "category": "users and roles",
"displayName": "Read", "displayName": "Read",
"subCategory": "users", "subCategory": "users",
}, },
Object { {
"action": "admin::users.update", "action": "admin::users.update",
"category": "users and roles", "category": "users and roles",
"displayName": "Update", "displayName": "Update",
"subCategory": "users", "subCategory": "users",
}, },
Object { {
"action": "admin::webhooks.create", "action": "admin::webhooks.create",
"category": "webhooks", "category": "webhooks",
"displayName": "Create", "displayName": "Create",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "admin::webhooks.delete", "action": "admin::webhooks.delete",
"category": "webhooks", "category": "webhooks",
"displayName": "Delete", "displayName": "Delete",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "admin::webhooks.read", "action": "admin::webhooks.read",
"category": "webhooks", "category": "webhooks",
"displayName": "Read", "displayName": "Read",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "admin::webhooks.update", "action": "admin::webhooks.update",
"category": "webhooks", "category": "webhooks",
"displayName": "Update", "displayName": "Update",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "plugin::documentation.settings.read",
"category": "documentation",
"displayName": "Access the documentation settings page",
"subCategory": "general",
},
{
"action": "plugin::email.settings.read", "action": "plugin::email.settings.read",
"category": "email", "category": "email",
"displayName": "Access the Email Settings page", "displayName": "Access the Email Settings page",
"subCategory": "general", "subCategory": "general",
}, },
Object { {
"action": "plugin::i18n.locale.create",
"category": "Internationalization",
"displayName": "Create",
"subCategory": "Locales",
},
{
"action": "plugin::i18n.locale.delete",
"category": "Internationalization",
"displayName": "Delete",
"subCategory": "Locales",
},
{
"action": "plugin::i18n.locale.read",
"category": "Internationalization",
"displayName": "Read",
"subCategory": "Locales",
},
{
"action": "plugin::i18n.locale.update",
"category": "Internationalization",
"displayName": "Update",
"subCategory": "Locales",
},
{
"action": "plugin::upload.settings.read", "action": "plugin::upload.settings.read",
"category": "media library", "category": "media library",
"displayName": "Access the Media Library settings page", "displayName": "Access the Media Library settings page",
"subCategory": "general", "subCategory": "general",
}, },
], ],
"singleTypes": [
[
{
"actionId": "plugin::content-manager.explorer.create",
"applyToProperties": [
"fields",
"locales",
],
"label": "Create",
"subjects": [
"plugin::users-permissions.user",
],
},
{
"actionId": "plugin::content-manager.explorer.read",
"applyToProperties": [
"fields",
"locales",
],
"label": "Read",
"subjects": [
"plugin::users-permissions.user",
],
},
{
"actionId": "plugin::content-manager.explorer.update",
"applyToProperties": [
"fields",
"locales",
],
"label": "Update",
"subjects": [
"plugin::users-permissions.user",
],
},
{
"actionId": "plugin::content-manager.explorer.delete",
"applyToProperties": [
"locales",
],
"label": "Delete",
"subjects": [
"plugin::users-permissions.user",
],
},
{
"actionId": "plugin::content-manager.explorer.publish",
"applyToProperties": [
"locales",
],
"label": "Publish",
"subjects": [],
},
],
[],
],
}, },
} }
`); `);