From c731d3584d205ebad6b6db191c67b89452d5c6b5 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 21 Oct 2024 10:28:02 -0400 Subject: [PATCH 1/6] Replicate issue using clipboard with screen of previous version --- tests/e2e/fixtures/UUID_compatibility.json | 1 + .../specs/ClipboardBwCompatibility.spec.js | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/e2e/fixtures/UUID_compatibility.json create mode 100644 tests/e2e/specs/ClipboardBwCompatibility.spec.js diff --git a/tests/e2e/fixtures/UUID_compatibility.json b/tests/e2e/fixtures/UUID_compatibility.json new file mode 100644 index 000000000..390571abd --- /dev/null +++ b/tests/e2e/fixtures/UUID_compatibility.json @@ -0,0 +1 @@ +{"type":"screen_package","version":"2","screens":[{"id":60,"uuid":"9d30f389-cf0e-4fe1-89be-627fe5f4047d","screen_category_id":"1","title":"screen1_carlos","description":"test","type":"FORM","config":[{"name":"screen1_carlos","items":[{"label":"Line Input","config":{"icon":"far fa-square","name":"form_input_1","type":"text","label":"New Input","helper":null,"dataFormat":"string","validation":null,"placeholder":null},"component":"FormInput","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormInput","editor-component":"FormInput"},{"label":"Submit Button","config":{"icon":"fas fa-share-square","name":null,"event":"submit","label":"New Submit","loading":false,"tooltip":[],"variant":"primary","fieldValue":null,"loadingLabel":"Loading...","defaultSubmit":true},"component":"FormButton","inspector":[{"type":"FormInput","field":"label","config":{"label":"Label","helper":"The label describes the button's text"}},{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormSubmit","editor-component":"FormButton"}],"order":1}],"computed":[],"custom_css":null,"created_at":"2024-10-07T21:14:58+00:00","updated_at":"2024-10-08T00:51:38+00:00","status":"ACTIVE","key":null,"watchers":[],"translations":null,"is_template":0,"asset_type":null,"projects":"[]","categories":[{"id":1,"uuid":"9d31170d-320c-4272-8d17-5bc582f3379d","name":"Uncategorized","status":"ACTIVE","is_system":0,"created_at":"2024-10-07T22:54:16+00:00","updated_at":"2024-10-07T22:54:16+00:00","pivot":{"category_type":"ProcessMaker\\Models\\ScreenCategory","assignable_id":60,"category_id":1}}]},{"id":63,"uuid":"9d4c7fbe-be67-438e-8ad3-d96c7f6ef434","screen_category_id":"1","title":"UUID compatibility","description":"UUID compatibility","type":"FORM","config":[{"name":"UUID compatibility","items":[{"label":"Rich Text","config":{"icon":"fas fa-pencil-ruler","label":null,"content":"

Simple controls<\/p>","interactive":true,"renderVarHtml":false},"component":"FormHtmlViewer","inspector":[{"type":"FormTextArea","field":"content","config":{"rows":5,"label":"Content","value":null,"helper":"The HTML text to display"}},{"type":"FormCheckbox","field":"renderVarHtml","config":{"label":"Render HTML from a Variable","value":null,"helper":null}},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormHtmlEditor","editor-component":"FormHtmlEditor"},{"label":"Line Input","config":{"icon":"far fa-square","name":"form_input_1","type":"text","label":"New Input","helper":null,"dataFormat":"string","validation":null,"placeholder":null},"component":"FormInput","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormInput","editor-component":"FormInput"},{"label":"Select List","config":{"icon":"fas fa-angle-double-down","name":"form_select_list_1","label":"New Select List","helper":null,"options":{"key":"value","value":"content","dataName":"response","jsonData":"[{\"content\":\"one\",\"value\":\"one\"},{\"content\":\"two\",\"value\":\"two\"}]","renderAs":"dropdown","editIndex":null,"pmqlQuery":null,"dataSource":"provideData","optionsList":[{"value":"one","content":"one"},{"value":"two","content":"two"}],"removeIndex":null,"showRenderAs":true,"showJsonEditor":false,"showOptionCard":false,"selectedOptions":[],"allowMultiSelect":false,"showRemoveWarning":false,"valueTypeReturned":"single"},"readonly":false,"validation":[],"placeholder":null,"rootElement":"response","dataSourceUrl":null,"dataSourceEndpoint":null},"component":"FormSelectList","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormSelectList","editor-component":"FormSelectList"},{"label":"Rich Text","config":{"icon":"fas fa-pencil-ruler","label":null,"content":"

Multi column container<\/p>","interactive":true,"renderVarHtml":false},"component":"FormHtmlViewer","inspector":[{"type":"FormTextArea","field":"content","config":{"rows":5,"label":"Content","value":null,"helper":"The HTML text to display"}},{"type":"FormCheckbox","field":"renderVarHtml","config":{"label":"Render HTML from a Variable","value":null,"helper":null}},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormHtmlEditor","editor-component":"FormHtmlEditor"},{"items":[[{"label":"Line Input","config":{"icon":"far fa-square","name":"form_input_2","type":"text","label":"New Input","helper":null,"dataFormat":"string","validation":null,"placeholder":null},"component":"FormInput","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormInput","editor-component":"FormInput"},{"label":"Textarea","config":{"icon":"fas fa-paragraph","name":"form_text_area_1","rows":2,"label":"New Textarea","helper":null,"currency":{"code":"USD","name":"US Dollar","format":"#,###.##","symbol":"$"},"richtext":false,"placeholder":null},"component":"FormTextArea","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormTextArea","editor-component":"FormTextArea"}],[{"label":"Select List","config":{"icon":"fas fa-angle-double-down","name":"form_select_list_2","label":"New Select List","helper":null,"options":{"key":"value","value":"content","dataName":"response","jsonData":"[{\"content\":\"one\",\"value\":\"one\"},{\"content\":\"two\",\"value\":\"two\"}]","renderAs":"dropdown","editIndex":null,"pmqlQuery":null,"dataSource":"provideData","optionsList":[{"value":"one","content":"one"},{"value":"two","content":"two"}],"removeIndex":null,"showRenderAs":true,"showJsonEditor":false,"showOptionCard":false,"selectedOptions":[],"allowMultiSelect":false,"showRemoveWarning":false,"valueTypeReturned":"single"},"readonly":false,"validation":[],"placeholder":null,"rootElement":"response","dataSourceUrl":null,"dataSourceEndpoint":null},"component":"FormSelectList","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormSelectList","editor-component":"FormSelectList"},{"label":"Submit Button","config":{"icon":"fas fa-share-square","name":null,"event":"script","label":"New Submit","loading":false,"tooltip":[],"variant":"primary","fieldValue":null,"loadingLabel":"Loading...","defaultSubmit":true},"component":"FormButton","inspector":[{"type":"FormInput","field":"label","config":{"label":"Label","helper":"The label describes the button's text"}},{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormSubmit","editor-component":"FormButton"}]],"label":"Multicolumn \/ Table","config":{"icon":"fas fa-table","label":null,"options":[{"value":"1","content":"6"},{"value":"2","content":"6"}]},"component":"FormMultiColumn","container":true,"inspector":[{"type":"ContainerColumns","field":"options","config":{"label":"Column Width","validation":"columns-adds-to-12"}},{"type":"ColorSelect","field":"color","config":{"label":"Text Color","helper":"Set the element's text color","options":[{"value":"text-primary","content":"primary"},{"value":"text-secondary","content":"secondary"},{"value":"text-success","content":"success"},{"value":"text-danger","content":"danger"},{"value":"text-warning","content":"warning"},{"value":"text-info","content":"info"},{"value":"text-light","content":"light"},{"value":"text-dark","content":"dark"}]}},{"type":"ColorSelect","field":"bgcolor","config":{"label":"Background Color","helper":"Set the element's background color","options":[{"value":"alert alert-primary","content":"primary"},{"value":"alert alert-secondary","content":"secondary"},{"value":"alert alert-success","content":"success"},{"value":"alert alert-danger","content":"danger"},{"value":"alert alert-warning","content":"warning"},{"value":"alert alert-info","content":"info"},{"value":"alert alert-light","content":"light"},{"value":"alert alert-dark","content":"dark"}]}},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"MultiColumn","editor-component":"MultiColumn"},{"label":"Rich Text","config":{"icon":"fas fa-pencil-ruler","label":null,"content":"

Loop<\/p>","interactive":true,"renderVarHtml":false},"component":"FormHtmlViewer","inspector":[{"type":"FormTextArea","field":"content","config":{"rows":5,"label":"Content","value":null,"helper":"The HTML text to display"}},{"type":"FormCheckbox","field":"renderVarHtml","config":{"label":"Render HTML from a Variable","value":null,"helper":null}},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormHtmlEditor","editor-component":"FormHtmlEditor"},{"items":[{"label":"Date Picker","config":{"icon":"far fa-calendar-alt","name":"form_date_picker_1","type":"datetime","label":"New Date Picker","maxDate":null,"minDate":null,"disabled":false,"dataFormat":"date","validation":[],"placeholder":null},"component":"FormDatePicker","inspector":[{"type":"FormInput","field":"minDate","config":{"name":"Minimum Date","label":"Minimum Date","helper":null,"validation":"date_or_mustache"}},{"type":"FormInput","field":"maxDate","config":{"name":"Maximum Date","label":"Maximum Date","helper":null,"validation":"after_min_date|date_or_mustache"}},{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormDatePicker","editor-component":"FormDatePicker"}],"label":"Loop","config":{"icon":"fas fa-redo","name":"loop_2","label":null,"settings":{"add":false,"type":"new","times":"3","varname":"loop_2"}},"component":"FormLoop","container":true,"inspector":[{"type":"LoopInspector","field":"settings","config":[]},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"Loop","editor-component":"Loop"},{"label":"Rich Text","config":{"icon":"fas fa-pencil-ruler","label":null,"content":"

Record List<\/p>","interactive":true,"renderVarHtml":false},"component":"FormHtmlViewer","inspector":[{"type":"FormTextArea","field":"content","config":{"rows":5,"label":"Content","value":null,"helper":"The HTML text to display"}},{"type":"FormCheckbox","field":"renderVarHtml","config":{"label":"Render HTML from a Variable","value":null,"helper":null}},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormHtmlEditor","editor-component":"FormHtmlEditor"},{"label":"Record List","config":{"form":"1","icon":"fas fa-th-list","name":"form_record_list_1","label":"New Record List","fields":{"jsonData":"[]","editIndex":null,"dataSource":"provideData","optionsList":[],"removeIndex":null,"showJsonEditor":false,"showOptionCard":false,"showRemoveWarning":false},"editable":true},"component":"FormRecordList","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormRecordList","editor-component":"FormText"},{"label":"Rich Text","config":{"icon":"fas fa-pencil-ruler","label":null,"content":"

Nested screen<\/p>","interactive":true,"renderVarHtml":false},"component":"FormHtmlViewer","inspector":[{"type":"FormTextArea","field":"content","config":{"rows":5,"label":"Content","value":null,"helper":"The HTML text to display"}},{"type":"FormCheckbox","field":"renderVarHtml","config":{"label":"Render HTML from a Variable","value":null,"helper":null}},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormHtmlEditor","editor-component":"FormHtmlEditor"},{"label":"Nested Screen","config":{"icon":"fas fa-file-invoice","name":"Nested Screen","label":"Nested Screen","value":null,"screen":60,"variant":"primary"},"component":"FormNestedScreen","inspector":[{"type":"ScreenSelector","field":"screen","config":{"name":"SelectScreen","label":"Screen","helper":"Select a screen","validate-nested":false}},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormNestedScreen","editor-component":"FormNestedScreen"},{"label":"Submit Button","config":{"icon":"fas fa-share-square","name":null,"event":"submit","label":"Final Submit","loading":false,"tooltip":[],"variant":"primary","fieldValue":null,"loadingLabel":"Loading...","defaultSubmit":true},"component":"FormButton","inspector":[{"type":"FormInput","field":"label","config":{"label":"Label","helper":"The label describes the button's text"}},{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormSubmit","editor-component":"FormButton"}],"order":1},{"name":"popup","items":[{"label":"Line Input","config":{"icon":"far fa-square","name":"form_input_3","type":"text","label":"New Input","helper":null,"readonly":false,"dataFormat":"string","validation":[],"placeholder":null},"component":"FormInput","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormInput","editor-component":"FormInput"},{"items":[{"label":"Line Input","config":{"icon":"far fa-square","name":"form_input_4","type":"text","label":"New Input","helper":null,"dataFormat":"string","validation":null,"placeholder":null},"component":"FormInput","inspector":[{"type":"FormInput","field":"name","config":{"name":"Variable Name","label":"Variable Name","helper":"A variable name is a symbolic name to reference information.","validation":"regex:\/^([a-zA-Z]([a-zA-Z0-9_]?)+\\.?)+(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"FormInput","editor-component":"FormInput"}],"label":"Loop","config":{"icon":"fas fa-redo","name":"loop_1","label":null,"settings":{"add":false,"type":"new","times":"3","varname":"loop_1"}},"component":"FormLoop","container":true,"inspector":[{"type":"LoopInspector","field":"settings","config":[]},{"type":"FormInput","field":"conditionalHide","config":{"label":"Visibility Rule","helper":"This control is hidden until this expression is true"}},{"type":"DeviceVisibility","field":"deviceVisibility","config":{"label":"Device Visibility","helper":"This control is hidden until this expression is true"}},{"type":"FormInput","field":"customFormatter","config":{"label":"Custom Format String","helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####","validation":null}},{"type":"FormInput","field":"customCssSelector","config":{"label":"CSS Selector Name","helper":"Use this in your custom css rules","validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]"}},{"type":"FormInput","field":"ariaLabel","config":{"label":"Aria Label","helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label"}},{"type":"FormInput","field":"tabindex","config":{"label":"Tab Order","helper":"Order in which a user will move focus from one control to another by pressing the Tab key","validation":"regex: [0-9]*"}}],"editor-control":"Loop","editor-component":"Loop"}],"order":2}],"computed":[],"custom_css":null,"created_at":"2024-10-21T13:54:22+00:00","updated_at":"2024-10-21T14:00:30+00:00","status":"ACTIVE","key":null,"watchers":[],"translations":null,"is_template":0,"asset_type":null,"projects":"[]","categories":[{"id":1,"uuid":"9d31170d-320c-4272-8d17-5bc582f3379d","name":"Uncategorized","status":"ACTIVE","is_system":0,"created_at":"2024-10-07T22:54:16+00:00","updated_at":"2024-10-07T22:54:16+00:00","pivot":{"category_type":"ProcessMaker\\Models\\ScreenCategory","assignable_id":63,"category_id":1}}]}],"screen_categories":[],"scripts":[]} \ No newline at end of file diff --git a/tests/e2e/specs/ClipboardBwCompatibility.spec.js b/tests/e2e/specs/ClipboardBwCompatibility.spec.js new file mode 100644 index 000000000..9ac0980ce --- /dev/null +++ b/tests/e2e/specs/ClipboardBwCompatibility.spec.js @@ -0,0 +1,23 @@ +import ClipboardManager from "../../../src/store/modules/ClipboardManager"; + +describe("Clipboard backward compatibility", () => { + beforeEach(() => { + cy.visit("/"); + }); + + it("FOUR-19630: Check clipboard with a screen from a previous version", () => { + ClipboardManager.saveToLocalStorage([]); + cy.loadFromJson("UUID_compatibility.json", 1); + + // for each control, check if it can be added to the clipboard + cy.get('.control-item').each(($el, index) => { + cy.wrap($el).click({ force: true }); + cy.get('[data-cy="addToClipboard"]').click({ force: true }); + cy.get('[data-cy="addToClipboard"]').should("not.exist").then(() => { + // Verify it was added to the clipboard storage + const content = ClipboardManager.loadFromLocalStorage(); + expect(content.length).to.equal(index + 1); + }); + }); + }); +}); From 4e35564a17781f6899c31381ce628800156c6513 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 21 Oct 2024 11:30:15 -0400 Subject: [PATCH 2/6] Test add to clipboard from page 2 --- tests/e2e/specs/ClipboardBwCompatibility.spec.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/e2e/specs/ClipboardBwCompatibility.spec.js b/tests/e2e/specs/ClipboardBwCompatibility.spec.js index 9ac0980ce..48addec35 100644 --- a/tests/e2e/specs/ClipboardBwCompatibility.spec.js +++ b/tests/e2e/specs/ClipboardBwCompatibility.spec.js @@ -19,5 +19,21 @@ describe("Clipboard backward compatibility", () => { expect(content.length).to.equal(index + 1); }); }); + + // Go to second page + cy.get('[data-test="page-dropdown"]').click({force: true}); + cy.get('[data-test="page-popup"]').click({force: true}); + const elementsAddedFromMainPage = 17; + + // check if each control in the second page can be added to the clipboard + cy.get('.control-item').each(($el, index) => { + cy.wrap($el).click({ force: true }); + cy.get('[data-cy="addToClipboard"]').click({ force: true }); + cy.get('[data-cy="addToClipboard"]').should("not.exist").then(() => { + // Verify it was added to the clipboard storage + const content = ClipboardManager.loadFromLocalStorage(); + expect(content.length).to.equal(elementsAddedFromMainPage + index + 1); + }); + }); }); }); From 44be136e385a9e90c64ee237b5823c7722f5661f Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 21 Oct 2024 11:30:24 -0400 Subject: [PATCH 3/6] Fix code to add UUIDs to elements in multi-column container --- src/mixins/Clipboard.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/mixins/Clipboard.js b/src/mixins/Clipboard.js index ef9478e19..077729ff2 100644 --- a/src/mixins/Clipboard.js +++ b/src/mixins/Clipboard.js @@ -58,11 +58,17 @@ export default { addUuidToElements(screenConfig) { const replaceInPage = (page) => { page.items.forEach((item, index) => { - if (!item.uuid) { - item.uuid = this.generateUUID(); - } - if (item.items) { - replaceInPage(item); + if (item instanceof Array) { + // multi-column each item in the column + replaceInPage({ items: item }); + } else { + // loop through children + if (!item.uuid) { + item.uuid = this.generateUUID(); + } + if (item.items) { + replaceInPage(item); + } } }); } From 2250e61fe95858fd093c28b640daec8dfdc63ec1 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 21 Oct 2024 11:42:11 -0400 Subject: [PATCH 4/6] Remove debug code --- tests/e2e/specs/ScreenTemplateSection.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/ScreenTemplateSection.spec.js b/tests/e2e/specs/ScreenTemplateSection.spec.js index 7eff4e347..65cb7f5ee 100644 --- a/tests/e2e/specs/ScreenTemplateSection.spec.js +++ b/tests/e2e/specs/ScreenTemplateSection.spec.js @@ -109,7 +109,7 @@ it("Displays Shared Templates when Shared Templates button is clicked", () => { }); }); -it.only("Is hidden when an Inspector Panel should open", () => { +it("Is hidden when an Inspector Panel should open", () => { cy.visit("/"); cy.get("[data-cy=screen-templates]").click(); From 4237ec3b6187f24a51bb3074c963b62e52a17831 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 21 Oct 2024 16:48:53 -0400 Subject: [PATCH 5/6] Improve selector --- tests/e2e/specs/ClipboardBwCompatibility.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/ClipboardBwCompatibility.spec.js b/tests/e2e/specs/ClipboardBwCompatibility.spec.js index 48addec35..fc979b781 100644 --- a/tests/e2e/specs/ClipboardBwCompatibility.spec.js +++ b/tests/e2e/specs/ClipboardBwCompatibility.spec.js @@ -21,7 +21,7 @@ describe("Clipboard backward compatibility", () => { }); // Go to second page - cy.get('[data-test="page-dropdown"]').click({force: true}); + cy.get('[data-test="page-dropdown"] button').click({force: true}); cy.get('[data-test="page-popup"]').click({force: true}); const elementsAddedFromMainPage = 17; From f23ab363dd6af5ceb1e1bb6abc7c9a879ddc20b9 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 21 Oct 2024 17:00:36 -0400 Subject: [PATCH 6/6] Wait the popup page to be loaded --- tests/e2e/specs/ClipboardBwCompatibility.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/specs/ClipboardBwCompatibility.spec.js b/tests/e2e/specs/ClipboardBwCompatibility.spec.js index fc979b781..d28d60cd7 100644 --- a/tests/e2e/specs/ClipboardBwCompatibility.spec.js +++ b/tests/e2e/specs/ClipboardBwCompatibility.spec.js @@ -23,6 +23,7 @@ describe("Clipboard backward compatibility", () => { // Go to second page cy.get('[data-test="page-dropdown"] button').click({force: true}); cy.get('[data-test="page-popup"]').click({force: true}); + cy.wait(1000); const elementsAddedFromMainPage = 17; // check if each control in the second page can be added to the clipboard