Skip to content

Commit

Permalink
Revert to not including hidden fields in the root form
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Dec 2, 2024
1 parent f776dc3 commit 5e82938
Show file tree
Hide file tree
Showing 29 changed files with 137 additions and 313 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,11 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "foo",
isHidden: false
value: "foo"
}
],
canAdd: false,
canRemove: false,
isHidden: false
canRemove: false
}
],
disabledDependencies: [],
Expand All @@ -99,8 +97,7 @@ describe(symToStr({ computeRootForm }), () => {
description: undefined,
value: 2,
isInteger: false,
minimum: undefined,
isHidden: false
minimum: undefined
}
],
dependencies: {
Expand All @@ -113,8 +110,7 @@ describe(symToStr({ computeRootForm }), () => {
fieldType: "checkbox",
helmValuesPath: ["postgresql", "enabled"],
description: undefined,
value: true,
isHidden: false
value: true
}
],
global: [
Expand All @@ -128,8 +124,7 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "admin",
isHidden: false
value: "admin"
},
{
type: "field",
Expand All @@ -141,8 +136,7 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "xxx",
isHidden: false
value: "xxx"
}
]
}
Expand Down Expand Up @@ -227,13 +221,11 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of services.a",
isHidden: false
value: "value of services.a"
}
],
canAdd: false,
canRemove: false,
isHidden: false
canRemove: false
},
{
type: "field",
Expand All @@ -245,8 +237,7 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of foo.b",
isHidden: false
value: "value of foo.b"
}
],
disabledDependencies: [],
Expand All @@ -260,8 +251,7 @@ describe(symToStr({ computeRootForm }), () => {
description: undefined,
value: 2,
isInteger: false,
minimum: undefined,
isHidden: false
minimum: undefined
},
{
type: "field",
Expand All @@ -273,8 +263,7 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of global.foo.username",
isHidden: false
value: "value of global.foo.username"
},
{
type: "field",
Expand All @@ -286,8 +275,7 @@ describe(symToStr({ computeRootForm }), () => {
doRenderAsTextArea: false,
isSensitive: false,
pattern: undefined,
value: "value of global.foo.password",
isHidden: false
value: "value of global.foo.password"
}
],
dependencies: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
helmValuesPath: ["a"],
doRenderAsTextArea: false,
isSensitive: false,
value: "foo",
isHidden: false
value: "foo"
},
{
type: "field",
Expand All @@ -58,13 +57,11 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
fieldType: "select",
helmValuesPath: ["b"],
options: [1, 2, 3],
selectedOptionIndex: 1,
isHidden: false
selectedOptionIndex: 1
}
],
canAdd: false,
canRemove: false,
isHidden: false
canRemove: false
};

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

expect(got).toStrictEqual(expected);
Expand Down Expand Up @@ -177,32 +172,15 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
fieldType: "checkbox",
helmValuesPath: ["persistence", "enabled"],
description: "Create a persistent volume",
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
value: false
}
],
canAdd: false,
canRemove: false,
isHidden: false
canRemove: false
}
],
canAdd: false,
canRemove: false,
isHidden: false
canRemove: false
};

expect(got).toStrictEqual(expected);
Expand Down Expand Up @@ -270,32 +248,15 @@ describe(symToStr({ computeRootFormFieldGroup }), () => {
fieldType: "checkbox",
helmValuesPath: ["persistence", "enabled"],
description: "Create a persistent volume",
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
value: false
}
],
canAdd: false,
canRemove: false,
isHidden: false
canRemove: false
}
],
canAdd: false,
canRemove: false,
isHidden: false
canRemove: false
};

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

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

0 comments on commit 5e82938

Please sign in to comment.