From 20e3aaa3c7bd5a17ba76461be8ddd6b6afb94698 Mon Sep 17 00:00:00 2001 From: ZenMasterJacob20011 Date: Thu, 5 Dec 2024 10:39:38 -0600 Subject: [PATCH 1/3] created test for FIO-8727 --- test/unit/Panel.unit.js | 9 ++++++++- test/unit/fixtures/panel/comp3.js | 33 +++++++++++++++++++++++++++++++ test/unit/fixtures/panel/index.js | 3 ++- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 test/unit/fixtures/panel/comp3.js diff --git a/test/unit/Panel.unit.js b/test/unit/Panel.unit.js index 7870e158d0..3351027275 100644 --- a/test/unit/Panel.unit.js +++ b/test/unit/Panel.unit.js @@ -6,7 +6,8 @@ import panelEditForm from '../../src/components/panel/Panel.form'; import { Formio } from '../../src/Formio'; import { comp1, - comp2 + comp2, + comp3 } from './fixtures/panel'; describe('Panel Component', () => { @@ -68,6 +69,12 @@ describe('Panel Component', () => { }).catch(done); }); + it('Should show its label in DataGrid when "Hide Label" is set to true and "Show Label in DataGrid" is set to true', () => { + return Formio.createForm(document.createElement('div'), comp3, {}).then((form) => { + assert(form.getComponent('panel').element.querySelector('.card-title'), 'Panel should display its label'); + }); + }); + describe('Edit Form', () => { it('should include components for important settings', () => { const components = flattenComponents(panelEditForm().components); diff --git a/test/unit/fixtures/panel/comp3.js b/test/unit/fixtures/panel/comp3.js new file mode 100644 index 0000000000..85a2ab84a7 --- /dev/null +++ b/test/unit/fixtures/panel/comp3.js @@ -0,0 +1,33 @@ +export default { + components: [ + { + "label": "Data Grid", + "reorder": false, + "addAnotherPosition": "bottom", + "layoutFixed": false, + "enableRowGroups": false, + "initEmpty": false, + "tableView": false, + "defaultValue": [ + {} + ], + "validateWhenHidden": false, + "key": "dataGrid", + "type": "datagrid", + "input": true, + "components": [ + { + "collapsible": false, + "hideLabel": true, + "dataGridLabel": true, + "key": "panel", + "type": "panel", + "label": "Panel", + "input": false, + "tableView": false, + "components": [] + } + ] + } + ] +} diff --git a/test/unit/fixtures/panel/index.js b/test/unit/fixtures/panel/index.js index 7c38dd8065..63f18da5cf 100644 --- a/test/unit/fixtures/panel/index.js +++ b/test/unit/fixtures/panel/index.js @@ -1,3 +1,4 @@ import comp1 from './comp1'; import comp2 from './comp2'; -export { comp1, comp2 }; +import comp3 from './comp3'; +export { comp1, comp2, comp3 }; From 77723676f69a90d7869162e8f707ae239df12852 Mon Sep 17 00:00:00 2001 From: lane-formio Date: Mon, 16 Dec 2024 16:07:06 -0600 Subject: [PATCH 2/3] FIO-8727 - update with bootstrap changes --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a6656d7916..9953e9a4ae 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ }, "homepage": "https://github.com/formio/formio.js#readme", "dependencies": { - "@formio/bootstrap": "3.0.0-dev.98.17ba6ea", + "@formio/bootstrap": "3.0.0-dev.114.048bd4d", "@formio/choices.js": "^10.2.1", "@formio/core": "2.1.0-dev.191.8c609ab", "@formio/text-mask-addons": "^3.8.0-formio.3", diff --git a/yarn.lock b/yarn.lock index a600f82a4e..a61a08b4ed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -367,10 +367,10 @@ resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== -"@formio/bootstrap@3.0.0-dev.98.17ba6ea": - version "3.0.0-dev.98.17ba6ea" - resolved "https://registry.npmjs.org/@formio/bootstrap/-/bootstrap-3.0.0-dev.98.17ba6ea.tgz#80a2feb1583ff0125acbee437eb0f74f01ef1459" - integrity sha512-n5bp54vClndwSAk8yERqBGQ6O2vVLvwbaOz65JQ/8j8UoNeUf1zoC++MdLAW9wTcgXpNPhi+4TvBQuj/bt0/tg== +"@formio/bootstrap@3.0.0-dev.114.048bd4d": + version "3.0.0-dev.114.048bd4d" + resolved "https://registry.yarnpkg.com/@formio/bootstrap/-/bootstrap-3.0.0-dev.114.048bd4d.tgz#243f3aa0a1d91e5f031f995248444ea88dde35bc" + integrity sha512-owvBFvAwqlSy110RM1lrz11SNnTHzYkRGULh6bI8084XhaHOQOh6bx3Op4RWPF0He8ETWU3fp+dzWca0JjzClg== "@formio/choices.js@^10.2.1": version "10.2.1" From 6595453d87b42733c8a0f21e456275586af16787 Mon Sep 17 00:00:00 2001 From: ZenMasterJacob20011 Date: Tue, 17 Dec 2024 12:50:00 -0600 Subject: [PATCH 3/3] update renders --- ...component-bootstrap-datagrid-multiple.html | 4 +- ...component-bootstrap-datagrid-required.html | 4 +- .../renders/component-bootstrap-datagrid.html | 4 +- ...trap-calculateValueWithManualOverride.html | 4 +- test/renders/form-bootstrap-data.html | 8 +- test/renders/form-bootstrap-defaults.html | 4 +- ...rm-bootstrap-formWithCustomFormatDate.html | 4 +- .../form-bootstrap-modalEditComponents.html | 84 ++++++++++--------- ...ootstrap-readOnly-modalEditComponents.html | 84 ++++++++++--------- 9 files changed, 108 insertions(+), 92 deletions(-) diff --git a/test/renders/component-bootstrap-datagrid-multiple.html b/test/renders/component-bootstrap-datagrid-multiple.html index 67ea65ca24..f1d8a742f3 100644 --- a/test/renders/component-bootstrap-datagrid-multiple.html +++ b/test/renders/component-bootstrap-datagrid-multiple.html @@ -6,8 +6,8 @@ "> - - diff --git a/test/renders/component-bootstrap-datagrid-required.html b/test/renders/component-bootstrap-datagrid-required.html index 243abad890..fd0637ec17 100644 --- a/test/renders/component-bootstrap-datagrid-required.html +++ b/test/renders/component-bootstrap-datagrid-required.html @@ -6,8 +6,8 @@ "> - - diff --git a/test/renders/component-bootstrap-datagrid.html b/test/renders/component-bootstrap-datagrid.html index 00181761a3..a2b710bc2f 100644 --- a/test/renders/component-bootstrap-datagrid.html +++ b/test/renders/component-bootstrap-datagrid.html @@ -6,8 +6,8 @@ "> - - diff --git a/test/renders/form-bootstrap-calculateValueWithManualOverride.html b/test/renders/form-bootstrap-calculateValueWithManualOverride.html index 424666d54a..28eb823002 100644 --- a/test/renders/form-bootstrap-calculateValueWithManualOverride.html +++ b/test/renders/form-bootstrap-calculateValueWithManualOverride.html @@ -65,8 +65,8 @@
- - diff --git a/test/renders/form-bootstrap-data.html b/test/renders/form-bootstrap-data.html index 18383e24ae..df809de7ab 100644 --- a/test/renders/form-bootstrap-data.html +++ b/test/renders/form-bootstrap-data.html @@ -199,8 +199,8 @@
- - @@ -253,8 +253,8 @@
- - diff --git a/test/renders/form-bootstrap-defaults.html b/test/renders/form-bootstrap-defaults.html index 23b9a47392..ea23f13b54 100644 --- a/test/renders/form-bootstrap-defaults.html +++ b/test/renders/form-bootstrap-defaults.html @@ -426,8 +426,8 @@
- - diff --git a/test/renders/form-bootstrap-formWithCustomFormatDate.html b/test/renders/form-bootstrap-formWithCustomFormatDate.html index 04261ece63..45651bb41c 100644 --- a/test/renders/form-bootstrap-formWithCustomFormatDate.html +++ b/test/renders/form-bootstrap-formWithCustomFormatDate.html @@ -64,8 +64,8 @@
- - diff --git a/test/renders/form-bootstrap-modalEditComponents.html b/test/renders/form-bootstrap-modalEditComponents.html index a6e307d0f6..f2c0a2dddd 100644 --- a/test/renders/form-bootstrap-modalEditComponents.html +++ b/test/renders/form-bootstrap-modalEditComponents.html @@ -7,15 +7,17 @@