mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 19:04:38 +00:00
Change wording to leafs
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
c0f3a22ce2
commit
516b15ea7c
@ -147,7 +147,7 @@ describe('ADMIN | COMPONENTS | Permissions | reducer', () => {
|
||||
});
|
||||
|
||||
describe('ON_CHANGE_TOGGLE_PARENT_CHECKBOX', () => {
|
||||
it('should set all the deepest values of the create action to true', () => {
|
||||
it('should set all the leafs of the create action to true', () => {
|
||||
const action = {
|
||||
type: 'ON_CHANGE_TOGGLE_PARENT_CHECKBOX',
|
||||
keys: 'restaurant..create',
|
||||
|
||||
@ -14,7 +14,7 @@ describe('ADMIN | COMPONENTS | Permissions | utils | updateValues', () => {
|
||||
expect(updateValues(simpleObject, false)).toEqual(expected);
|
||||
});
|
||||
|
||||
it('set the deepest values of an object with the second argument passed to the function', () => {
|
||||
it('set the leafs of an object with the second argument passed to the function', () => {
|
||||
const complexeObject = {
|
||||
enabled: true,
|
||||
conditions: 'test',
|
||||
|
||||
@ -4,7 +4,7 @@ import { isObject } from 'lodash';
|
||||
* Sets all the none object values of an object to the given one
|
||||
* @param {object} obj
|
||||
* @param {boolean} valueToSet The value we want to set
|
||||
* It preserves the shape of the object, it only modifies the "deepest value"
|
||||
* It preserves the shape of the object, it only modifies the leafs
|
||||
* of an object.
|
||||
* This utility is very helpful when dealing with parent<>children checkboxes
|
||||
*/
|
||||
|
||||
@ -10,7 +10,7 @@ describe('ADMIN | COMPONENTS | PERMISSIONS | ContentTypeCollapse | utils', () =>
|
||||
expect(createArrayOfValues('null')).toEqual([]);
|
||||
});
|
||||
|
||||
it('should return an array with the deepest values from the object', () => {
|
||||
it('should return an array with the leafs from the object', () => {
|
||||
const data = {
|
||||
collectionTypes: {
|
||||
address: {
|
||||
|
||||
@ -8,7 +8,7 @@ describe('ADMIN | COMPONENTS | PERMISSIONS | ContentTypeCollapse | utils | getCh
|
||||
expect(getCheckboxState({})).toEqual(expected);
|
||||
});
|
||||
|
||||
it('should return an object with all the keys set to false when all the deepest values of the object are falsy', () => {
|
||||
it('should return an object with all the keys set to false when all the leafs of the object are falsy', () => {
|
||||
const complexeData = {
|
||||
f1: false,
|
||||
f2: {
|
||||
@ -27,7 +27,7 @@ describe('ADMIN | COMPONENTS | PERMISSIONS | ContentTypeCollapse | utils | getCh
|
||||
expect(getCheckboxState(complexeData)).toEqual(expected);
|
||||
});
|
||||
|
||||
it('should return an object with hasAllActionsSelected to false and hasSomeActionsSelected to true when some of the deepest values of the object are falsy', () => {
|
||||
it('should return an object with hasAllActionsSelected to false and hasSomeActionsSelected to true when some of the leafs of the object are falsy', () => {
|
||||
const complexeData = {
|
||||
f1: true,
|
||||
f2: {
|
||||
@ -45,7 +45,7 @@ describe('ADMIN | COMPONENTS | PERMISSIONS | ContentTypeCollapse | utils | getCh
|
||||
expect(getCheckboxState(complexeData)).toEqual(expected);
|
||||
});
|
||||
|
||||
it('should return an object with hasAllActionsSelected key set to true and the other set to false when all the deepest values of the object are truthy', () => {
|
||||
it('should return an object with hasAllActionsSelected key set to true and the other set to false when all the leafs of the object are truthy', () => {
|
||||
const complexeData = {
|
||||
f1: true,
|
||||
f2: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user