Skip to content

Commit

Permalink
Merge pull request #890 from InseeFrLab/keep_hidden_field_in_the_tree
Browse files Browse the repository at this point in the history
Keep hidden field in the tree
  • Loading branch information
garronej authored Nov 28, 2024
2 parents 9d1c89d + 8a891d7 commit cf9f978
Show file tree
Hide file tree
Showing 40 changed files with 469 additions and 191 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "foo"
value: "foo",
isHidden: false
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
}
],
disabledDependencies: [],
Expand All @@ -97,7 +99,8 @@ describe(symToStr({ computeRootForm }), () => {
description: undefined,
value: 2,
isInteger: false,
minimum: undefined
minimum: undefined,
isHidden: false
}
],
dependencies: {
Expand All @@ -110,7 +113,8 @@ describe(symToStr({ computeRootForm }), () => {
fieldType: "checkbox",
helmValuesPath: ["postgresql", "enabled"],
description: undefined,
value: true
value: true,
isHidden: false
}
],
global: [
Expand All @@ -124,7 +128,8 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "admin"
value: "admin",
isHidden: false
},
{
type: "field",
Expand All @@ -136,7 +141,8 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "xxx"
value: "xxx",
isHidden: false
}
]
}
Expand Down Expand Up @@ -221,11 +227,13 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of services.a"
value: "value of services.a",
isHidden: false
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
},
{
type: "field",
Expand All @@ -237,7 +245,8 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of foo.b"
value: "value of foo.b",
isHidden: false
}
],
disabledDependencies: [],
Expand All @@ -251,7 +260,8 @@ describe(symToStr({ computeRootForm }), () => {
description: undefined,
value: 2,
isInteger: false,
minimum: undefined
minimum: undefined,
isHidden: false
},
{
type: "field",
Expand All @@ -263,7 +273,8 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of global.foo.username"
value: "value of global.foo.username",
isHidden: false
},
{
type: "field",
Expand All @@ -275,7 +286,8 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of global.foo.password"
value: "value of global.foo.password",
isHidden: false
}
],
dependencies: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
helmValuesPath: ["a"],
doRenderAsTextArea: false,
isSensitive: false,
value: "foo"
value: "foo",
isHidden: false
},
{
type: "field",
Expand All @@ -57,11 +58,13 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
fieldType: "select",
helmValuesPath: ["b"],
options: [1, 2, 3],
selectedOptionIndex: 1
selectedOptionIndex: 1,
isHidden: false
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
};

expect(got).toStrictEqual(expected);
Expand Down Expand Up @@ -100,11 +103,13 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
helmValuesPath: ["a"],
doRenderAsTextArea: false,
isSensitive: false,
value: "foo"
value: "foo",
isHidden: false
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
};

expect(got).toStrictEqual(expected);
Expand Down Expand Up @@ -172,15 +177,32 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
fieldType: "checkbox",
helmValuesPath: ["persistence", "enabled"],
description: "Create a persistent volume",
value: false
value: false,
isHidden: false
},
{
type: "field",
title: "Persistent volume size",
isReadonly: false,
fieldType: "slider",
helmValuesPath: ["persistence", "size"],
description: "Size of the persistent volume",
min: 1,
max: 100,
unit: "Gi",
step: 1,
value: 10,
isHidden: true
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
};

expect(got).toStrictEqual(expected);
Expand Down Expand Up @@ -248,15 +270,32 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
fieldType: "checkbox",
helmValuesPath: ["persistence", "enabled"],
description: "Create a persistent volume",
value: false
value: false,
isHidden: false
},
{
type: "field",
title: "Persistent volume size",
isReadonly: false,
fieldType: "slider",
helmValuesPath: ["persistence", "size"],
description: "Size of the persistent volume",
min: 1,
max: 100,
unit: "Gi",
step: 1,
value: 10,
isHidden: true
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
};

expect(got).toStrictEqual(expected);
Expand Down Expand Up @@ -308,7 +347,8 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of a"
value: "value of a",
isHidden: false
},
{
type: "group",
Expand All @@ -332,7 +372,8 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of foo"
value: "value of foo",
isHidden: false
},
{
type: "field",
Expand All @@ -343,19 +384,23 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
description: undefined,
value: 42,
isInteger: false,
minimum: undefined
minimum: undefined,
isHidden: false
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
}
],
canAdd: true,
canRemove: false
canRemove: false,
isHidden: false
}
],
canAdd: false,
canRemove: false
canRemove: false,
isHidden: false
};

expect(got).toStrictEqual(expected);
Expand Down
Loading

0 comments on commit cf9f978

Please sign in to comment.