From bf78b74d18f60ae4fb7c2bcbbb2254d384274f9f Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Mon, 9 Sep 2024 14:12:59 -0400 Subject: [PATCH 01/46] FOUR-13437: STORY Add clipboard section to control menu --- src/components/vue-form-builder.vue | 14 +++--- src/form-builder-controls.js | 57 +++++++++++++++--------- tests/e2e/specs/ClipboardControl.spec.js | 44 ++++++++++++++++++ 3 files changed, 87 insertions(+), 28 deletions(-) create mode 100644 tests/e2e/specs/ClipboardControl.spec.js diff --git a/src/components/vue-form-builder.vue b/src/components/vue-form-builder.vue index 19f127351..1b0f23028 100644 --- a/src/components/vue-form-builder.vue +++ b/src/components/vue-form-builder.vue @@ -527,12 +527,13 @@ const defaultConfig = [ ]; const defaultGroupOrder = { - "Input Fields" : 1.0, - "Content Fields" : 2.0, - "Dashboards" : 2.5, - "Navigation" : 3.0, - "Files" : 4.0, - "Advanced" : 5.0, + "Clipboard": 1.0, + "Input Fields" : 2.0, + "Content Fields" : 3.0, + "Dashboards" : 3.5, + "Navigation" : 4.0, + "Files" : 5.0, + "Advanced" : 6.0, }; const DEFAULT_GROUP = "Advanced"; @@ -700,7 +701,6 @@ export default { return orderA - orderB; }); }); - return grouped; }, showToolbar() { diff --git a/src/form-builder-controls.js b/src/form-builder-controls.js index 4addefafc..22e772018 100755 --- a/src/form-builder-controls.js +++ b/src/form-builder-controls.js @@ -54,7 +54,7 @@ export default [ rendererBinding: 'FormHtmlEditor', control: { popoverContent: "Use a Rich Text Editor to add HTML-formatted", - order: 1.0, + order: 2.0, group: 'Content Fields', label: 'Rich Text', component: 'FormHtmlViewer', @@ -96,7 +96,7 @@ export default [ rendererBinding: 'FormMaskedInput', control: { popoverContent: "Collect a string of text and format it as one of several data types", - order: 1.0, + order: 2.0, group: 'Input Fields', label: 'Line Input', component: 'FormInput', @@ -127,6 +127,7 @@ export default [ ], }, }, + { editorComponent: FormTextArea, editorBinding: 'FormTextArea', @@ -134,7 +135,7 @@ export default [ rendererBinding: 'FormTextArea', control: { popoverContent: "Collect a multi-line string of text, to allow for extensive, richly formatted responses", - order: 4.0, + order: 5.0, group: 'Input Fields', label: 'Textarea', component: 'FormTextArea', @@ -192,7 +193,7 @@ export default [ rendererBinding: 'FormSelectList', control: { popoverContent: "Collect options from a list, as radio butttons or dropdowns", - order: 2.0, + order: 3.0, group: 'Input Fields', label: 'Select List', component: 'FormSelectList', @@ -247,7 +248,7 @@ export default [ rendererBinding: 'FormCheckbox', control: { popoverContent: "Add a checkbox or toggle for true/false responses", - order: 6.0, + order: 7.0, group: 'Input Fields', label: 'Checkbox', component: 'FormCheckbox', @@ -289,7 +290,7 @@ export default [ rendererBinding: 'FormDatePicker', control: { popoverContent: "Collect a date or date/time", - order: 5.0, + order: 6.0, group: 'Input Fields', label: 'Date Picker', component: 'FormDatePicker', @@ -343,7 +344,7 @@ export default [ rendererBinding: 'FormButton', control: { popoverContent: "Add special buttons that link between subpages within this Form", - order: 1.0, + order: 2.0, group: 'Navigation', label: 'Page Navigation', component: 'FormButton', @@ -378,7 +379,7 @@ export default [ rendererBinding: 'FormMultiColumn', control: { popoverContent: "Organize and group your content in columns", - order: 2.0, + order: 3.0, group: 'Content Fields', label: 'Multicolumn / Table', component: 'FormMultiColumn', @@ -423,7 +424,7 @@ export default [ rendererBinding: 'FormLoop', control: { popoverContent: "Add a repeatable section of content", - order: 5.0, + order: 6.0, group: 'Content Fields', label: 'Loop', component: 'FormLoop', @@ -459,7 +460,7 @@ export default [ rendererBinding: 'FormRecordList', control: { popoverContent: "Format content in a table structure and allow for adding rows", - order: 4.0, + order: 5.0, group: 'Content Fields', label: 'Record List', component: 'FormRecordList', @@ -522,7 +523,7 @@ export default [ rendererBinding: 'FormImage', control: { popoverContent: "Upload an image to your screen", - order: 3.0, + order: 4.0, group: 'Content Fields', label: 'Image', component: 'FormImage', @@ -589,7 +590,7 @@ export default [ rendererBinding: 'FormAvatar', control: { popoverContent: "User avatar", - order: 3.0, + order: 4.0, group: 'Dashboards', label: 'User Avatar', component: 'FormAvatar', @@ -633,7 +634,7 @@ export default [ rendererBinding: 'FormButton', control: { popoverContent: "Add an action to submit your form or update a field", - order: 3.0, + order: 4.0, group: 'Input Fields', label: 'Submit Button', component: 'FormButton', @@ -694,7 +695,7 @@ export default [ rendererBinding: 'FormNestedScreen', control: { popoverContent: "Add and reuse another Form within this Form", - order: 6.0, + order: 7.0, group: 'Content Fields', label: 'Nested Screen', component: 'FormNestedScreen', @@ -729,7 +730,7 @@ export default [ control: { group: "Files", popoverContent: "Collect files uploaded into the Form", - order: 1.0, + order: 2.0, label: 'File Upload', component: 'FileUpload', 'editor-component': 'FileUpload', @@ -781,7 +782,7 @@ export default [ builderBinding: 'FileDownload', control: { popoverContent: "Offer a File download", - order: 2.0, + order: 3.0, group: "Files", label: 'File Download', component: 'FileDownload', @@ -817,7 +818,7 @@ export default [ builderBinding: 'BFormComponent', control: { popoverContent: "Add one of several Bootstrap Vue components", - order: 1.0, + order: 2.0, group: 'Advanced', label: 'Bootstrap Component', component: 'BFormComponent', @@ -871,7 +872,7 @@ export default [ builderBinding: 'BWrapperComponent', control: { popoverContent: "Wrap an existing subpage within this Form into a Bootstrap Vue component", - order: 2.0, + order: 3.0, group: 'Advanced', label: 'Bootstrap Wrapper', component: 'BWrapperComponent', @@ -970,7 +971,7 @@ export default [ rendererBinding: "FormAnalyticsChart", control: { popoverContent: "Add a chart from the Analytics Reports", - order: 6.0, + order: 7.0, group: 'Dashboards', label: "Analytics Chart", component: "FormAnalyticsChart", @@ -1001,7 +1002,7 @@ export default [ control: { popoverContent: "Add a URL where this link should redirect", group: 'Content Fields', - order: 6.0, + order: 7.0, label: "Link URL", component: "LinkButton", "editor-component": "LinkButton", @@ -1032,5 +1033,19 @@ export default [ buttonVariantStyleProperty ] } - } + }, + { + control: { + popoverContent: "Clipboard Control: Manage copied elements by dragging them to your desired location. Click to view and paste previously copied items.", + order: 1.0, + group: 'Clipboard', + label: 'Drag & Paste', + component: "Clipboard", + config: { + icon: 'fa fa-clipboard', + }, + inspector: [], + }, + }, + ]; diff --git a/tests/e2e/specs/ClipboardControl.spec.js b/tests/e2e/specs/ClipboardControl.spec.js new file mode 100644 index 000000000..c47d1d2da --- /dev/null +++ b/tests/e2e/specs/ClipboardControl.spec.js @@ -0,0 +1,44 @@ +describe("Add Clipboard Section to Control Menu", () => { + + /** + * Test to verify that the Clipboard section is present in the control menu. + */ + it('should display the "Clipboard" section in the control menu', () => { + // Navigate to the homepage + cy.visit("/"); + + // Verify that the Clipboard section is visible in the control menu + cy.contains("Clipboard").should("be.visible"); + }); + + /** + * Test to verify that the Clipboard accordion expands and shows the "Drag to Paste" control. + */ + it('should expand the Clipboard accordion and display the "Drag to Paste" control', () => { + // Navigate to the homepage + cy.visit("/"); + + // Open all accordions in the control menu + cy.openAllAcordeon(); + + // Verify that the Clipboard accordion exists and is visible + cy.get('[data-cy="controls-Clipboard"]').should("exist").should("be.visible"); + }); + + /** + * Test to verify the visibility of the popover when hovering over the "Drag to Paste" control. + */ + it('should display the popover when hovering over the "Drag to Paste" control', () => { + // Navigate to the homepage + cy.visit("/"); + + // Open all accordions in the control menu + cy.openAllAcordeon(); + + // Click to open the Clipboard accordion + cy.get('[data-cy="controls-Clipboard"]').click(); + + // Verify that the popover associated with the "Drag to Paste" control is visible + cy.get('.custom-popover').should("be.visible"); + }); +}); From d6a3a7e7d85e8e27ab58484208cfac545a9edaa9 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Mon, 9 Sep 2024 14:22:09 -0400 Subject: [PATCH 02/46] add steps labels --- tests/e2e/specs/ClipboardControl.spec.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/e2e/specs/ClipboardControl.spec.js b/tests/e2e/specs/ClipboardControl.spec.js index c47d1d2da..1da9ea783 100644 --- a/tests/e2e/specs/ClipboardControl.spec.js +++ b/tests/e2e/specs/ClipboardControl.spec.js @@ -4,10 +4,10 @@ describe("Add Clipboard Section to Control Menu", () => { * Test to verify that the Clipboard section is present in the control menu. */ it('should display the "Clipboard" section in the control menu', () => { - // Navigate to the homepage + // Step 1: Navigate to the homepage cy.visit("/"); - // Verify that the Clipboard section is visible in the control menu + // Step 2: Verify that the Clipboard section is visible in the control menu cy.contains("Clipboard").should("be.visible"); }); @@ -15,13 +15,13 @@ describe("Add Clipboard Section to Control Menu", () => { * Test to verify that the Clipboard accordion expands and shows the "Drag to Paste" control. */ it('should expand the Clipboard accordion and display the "Drag to Paste" control', () => { - // Navigate to the homepage + // Step 1: Navigate to the homepage cy.visit("/"); - // Open all accordions in the control menu + // Step 2: Open all accordions in the control menu cy.openAllAcordeon(); - // Verify that the Clipboard accordion exists and is visible + // Step 3: Verify that the Clipboard accordion exists and is visible cy.get('[data-cy="controls-Clipboard"]').should("exist").should("be.visible"); }); @@ -29,16 +29,16 @@ describe("Add Clipboard Section to Control Menu", () => { * Test to verify the visibility of the popover when hovering over the "Drag to Paste" control. */ it('should display the popover when hovering over the "Drag to Paste" control', () => { - // Navigate to the homepage + // Step 1: Navigate to the homepage cy.visit("/"); - // Open all accordions in the control menu + // Step 2: Open all accordions in the control menu cy.openAllAcordeon(); - // Click to open the Clipboard accordion + // Step 3: Click to open the Clipboard accordion cy.get('[data-cy="controls-Clipboard"]').click(); - // Verify that the popover associated with the "Drag to Paste" control is visible + // Step 4: Verify that the popover associated with the "Drag to Paste" control is visible cy.get('.custom-popover').should("be.visible"); }); }); From f17cfec8140cb78da0224c311db24885c70217a1 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Mon, 9 Sep 2024 14:56:04 -0400 Subject: [PATCH 03/46] update popover message --- src/form-builder-controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/form-builder-controls.js b/src/form-builder-controls.js index 22e772018..5abf69285 100755 --- a/src/form-builder-controls.js +++ b/src/form-builder-controls.js @@ -1036,7 +1036,7 @@ export default [ }, { control: { - popoverContent: "Clipboard Control: Manage copied elements by dragging them to your desired location. Click to view and paste previously copied items.", + popoverContent: "Drag and paste copied elements to your desired location.", order: 1.0, group: 'Clipboard', label: 'Drag & Paste', From b42df7172629ddc741ce636a173f659af1d48557 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Tue, 10 Sep 2024 09:25:30 -0400 Subject: [PATCH 04/46] update control openAcordeon index for cypress tests --- tests/e2e/specs/ComputedFields.spec.js | 8 ++-- .../e2e/specs/ComputedFieldsReadOnly.spec.js | 10 ++--- tests/e2e/specs/CustomCss.spec.js | 12 +++--- tests/e2e/specs/DatePicker.spec.js | 2 +- tests/e2e/specs/DatePickerTimezone.spec.js | 2 +- tests/e2e/specs/DefaultValues.spec.js | 14 +++---- .../specs/DeviceVisivilityInspector.spec.js | 38 +++++++++---------- tests/e2e/specs/FileUpload.spec.js | 4 +- tests/e2e/specs/FormImage.spec.js | 4 +- tests/e2e/specs/FormInput.spec.js | 2 +- tests/e2e/specs/FormSelectList.spec.js | 2 +- tests/e2e/specs/FormTextArea.spec.js | 22 +++++------ tests/e2e/specs/Loop.spec.js | 20 +++++----- tests/e2e/specs/MediaQuery.spec.js | 2 +- tests/e2e/specs/MultiColumn.spec.js | 6 +-- tests/e2e/specs/NestedScreen.spec.js | 2 +- tests/e2e/specs/Pagination.spec.js | 2 +- tests/e2e/specs/ResponsivePreview.spec.js | 2 +- tests/e2e/specs/RichText.spec.js | 4 +- tests/e2e/specs/ScreenWarnings.spec.js | 2 +- .../SelectListDependentCollection.spec.js | 2 +- tests/e2e/specs/UndoRedo.spec.js | 4 +- tests/e2e/specs/VariableNames.js | 6 +-- tests/e2e/specs/VisibilityRule.spec.js | 6 +-- tests/e2e/specs/Watchers.spec.js | 20 +++++----- tests/e2e/specs/WatchersBypass.spec.js | 2 +- tests/e2e/specs/WrongConfigurationErrors.js | 4 +- tests/e2e/support/commands.js | 2 +- 28 files changed, 103 insertions(+), 103 deletions(-) diff --git a/tests/e2e/specs/ComputedFields.spec.js b/tests/e2e/specs/ComputedFields.spec.js index 4746f8aac..8a24f1ef0 100644 --- a/tests/e2e/specs/ComputedFields.spec.js +++ b/tests/e2e/specs/ComputedFields.spec.js @@ -18,10 +18,10 @@ describe("Computed fields", () => { cy.visit("/"); cy.loadFromJson("FOUR-5139.json", 0); - // Enter preview mode + // Step 1: Enter preview mode cy.get("[data-cy=mode-preview]").click(); - // Add three inputs input in loop + // Step : Add three inputs input in loop cy.get("[data-cy=loop-loop_1-add]").click(); cy.get("[data-cy=loop-loop_1-add]").click(); cy.get("[data-cy=loop-loop_1-add]").click(); @@ -138,7 +138,7 @@ describe("Computed fields", () => { }); it("Create a javascript computed field", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" @@ -184,7 +184,7 @@ describe("Computed fields", () => { it("Create a computed field with formula", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" diff --git a/tests/e2e/specs/ComputedFieldsReadOnly.spec.js b/tests/e2e/specs/ComputedFieldsReadOnly.spec.js index 72821ed72..5a19b7e0f 100644 --- a/tests/e2e/specs/ComputedFieldsReadOnly.spec.js +++ b/tests/e2e/specs/ComputedFieldsReadOnly.spec.js @@ -3,7 +3,7 @@ import { waitUntilElementIsVisible } from "../support/utils"; describe("Computed fields", () => { it("The user should not be able to change a FormInput assigned to a computed property", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" @@ -144,7 +144,7 @@ describe("Computed fields", () => { it("The user should not be able to change a FormTextArea assigned to a computed property", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", @@ -181,7 +181,7 @@ describe("Computed fields", () => { it("The user should not be able to change a FormDatePicker assigned to a computed property", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormDatePicker]").drag( "[data-cy=screen-drop-zone]", @@ -220,7 +220,7 @@ describe("Computed fields", () => { it("The user should not be able to change a FormSelectList assigned to a computed property", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormSelectList]").drag( "[data-cy=screen-drop-zone]", @@ -275,7 +275,7 @@ describe("Computed fields", () => { it("The user should not be able to change an input assigned to a sub property of a computed property", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { diff --git a/tests/e2e/specs/CustomCss.spec.js b/tests/e2e/specs/CustomCss.spec.js index 6d9121ef0..701644e68 100644 --- a/tests/e2e/specs/CustomCss.spec.js +++ b/tests/e2e/specs/CustomCss.spec.js @@ -1,7 +1,7 @@ describe("Custom CSS", () => { it("Shows Modal", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -14,7 +14,7 @@ describe("Custom CSS", () => { it("Closes Modal", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -30,7 +30,7 @@ describe("Custom CSS", () => { it("Does Not Save Custom CSS", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -51,7 +51,7 @@ describe("Custom CSS", () => { it("Saves Custom CSS", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -76,7 +76,7 @@ describe("Custom CSS", () => { it("Does not add styling to element in design mode", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -100,7 +100,7 @@ describe("Custom CSS", () => { it("Adds styling to element in preview mode", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/specs/DatePicker.spec.js b/tests/e2e/specs/DatePicker.spec.js index 2392dc045..f2227f377 100644 --- a/tests/e2e/specs/DatePicker.spec.js +++ b/tests/e2e/specs/DatePicker.spec.js @@ -5,7 +5,7 @@ moment.tz.setDefault("UTC"); describe("Date Picker", () => { beforeEach(() => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.window().then((win) => { win.ProcessMaker.user.timezone = "UTC"; }); diff --git a/tests/e2e/specs/DatePickerTimezone.spec.js b/tests/e2e/specs/DatePickerTimezone.spec.js index db0e5cc83..ab9153fdc 100644 --- a/tests/e2e/specs/DatePickerTimezone.spec.js +++ b/tests/e2e/specs/DatePickerTimezone.spec.js @@ -6,7 +6,7 @@ describe("Date Picker", () => { // The timezone is UTC. We set it to UTC in package.json `TZ=UTC` cy.clock(new Date(2024, 0, 0, 0, 0, 0), ['Date']); cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Set the User's timezone to Los Angeles. This is what DatePicker will use cy.window().then((win) => { diff --git a/tests/e2e/specs/DefaultValues.spec.js b/tests/e2e/specs/DefaultValues.spec.js index 4fdff56c7..db94f8b0a 100644 --- a/tests/e2e/specs/DefaultValues.spec.js +++ b/tests/e2e/specs/DefaultValues.spec.js @@ -1,7 +1,7 @@ describe("Default values", () => { it("Basic default value", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -22,7 +22,7 @@ describe("Default values", () => { it('Text Input Default value if the variable has the next format "people.firstName"', () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -46,7 +46,7 @@ describe("Default values", () => { it('Select List- Default if the variable has the next format "numbers.int"', () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormSelectList]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -83,7 +83,7 @@ describe("Default values", () => { it("Javascript default value", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.setPreviewDataInput({ name: "world" }); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" @@ -107,7 +107,7 @@ describe("Default values", () => { }); it("Initially checked checkbox", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormCheckbox]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -125,7 +125,7 @@ describe("Default values", () => { }); it("Dynamic Basic default value", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" @@ -158,7 +158,7 @@ describe("Default values", () => { }); it("Dynamic Javascript default value", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add an input field cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" diff --git a/tests/e2e/specs/DeviceVisivilityInspector.spec.js b/tests/e2e/specs/DeviceVisivilityInspector.spec.js index 7950a50c1..5b6ed760c 100644 --- a/tests/e2e/specs/DeviceVisivilityInspector.spec.js +++ b/tests/e2e/specs/DeviceVisivilityInspector.spec.js @@ -11,7 +11,7 @@ import { nodeControls } from "../support/constants.js"; describe("Device Visiblility Inspector", () => { it("Verify if an input has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -29,7 +29,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a checkbox has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormCheckbox]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -48,7 +48,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a datePicker has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormDatePicker]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -67,7 +67,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FileDownload has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-5"); + cy.openAcordeon("collapse-6"); cy.get("[data-cy=controls-FileDownload]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -86,7 +86,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FileUpload has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-5"); + cy.openAcordeon("collapse-6"); cy.get("[data-cy=controls-FileUpload]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -104,7 +104,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormImage has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormImage]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -122,7 +122,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormLoop has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormLoop]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -140,7 +140,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormMultiColumn has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormMultiColumn]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -159,7 +159,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormNestedScreen has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormNestedScreen]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -178,7 +178,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormButton has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormButton]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -196,7 +196,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormRecordList has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormRecordList]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -215,7 +215,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormHtmlViewer has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormHtmlViewer]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -234,7 +234,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormSelectList has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormSelectList]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -253,7 +253,7 @@ describe("Device Visiblility Inspector", () => { }); it("Verify if a FormTextArea has device visiblility settings", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -272,7 +272,7 @@ describe("Device Visiblility Inspector", () => { }); it("Enabled device visiblility", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -305,7 +305,7 @@ describe("Device Visiblility Inspector", () => { }); it("Disabled device visiblility", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -350,7 +350,7 @@ describe("Device Visiblility Inspector", () => { cy.visit("/"); // Step 1: Add Loop addControl("Loop"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Step 2: Add Line input inside the loop addControlInsideLoop(1, nodeControls.formInput); @@ -414,8 +414,8 @@ describe("Device Visiblility Inspector", () => { it("Verify Device Visibility of controls inside a table", () => { cy.visit("/"); + cy.openAcordeon("collapse-3"); cy.openAcordeon("collapse-2"); - cy.openAcordeon("collapse-1"); // Step 1: Add Loop addControl("Multicolumn / Table"); @@ -447,8 +447,8 @@ describe("Device Visiblility Inspector", () => { it("Verify Device Visibility of controls inside a table mobile", () => { cy.visit("/"); + cy.openAcordeon("collapse-3"); cy.openAcordeon("collapse-2"); - cy.openAcordeon("collapse-1"); // Step 1: Add Table addControl("Multicolumn / Table"); diff --git a/tests/e2e/specs/FileUpload.spec.js b/tests/e2e/specs/FileUpload.spec.js index caa23f49e..7b328549a 100644 --- a/tests/e2e/specs/FileUpload.spec.js +++ b/tests/e2e/specs/FileUpload.spec.js @@ -1,7 +1,7 @@ describe("File Upload", () => { it("Automatically sets a variable name", () => { cy.visit("/"); - cy.openAcordeon("collapse-5"); + cy.openAcordeon("collapse-6"); cy.get("[data-cy=controls-FileUpload]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -18,7 +18,7 @@ describe("File Upload", () => { it("Disables when task is self service", () => { cy.visit("/"); - cy.openAcordeon("collapse-5"); + cy.openAcordeon("collapse-6"); cy.window().then((win) => { win.ProcessMaker.isSelfService = true; }); diff --git a/tests/e2e/specs/FormImage.spec.js b/tests/e2e/specs/FormImage.spec.js index 396944ad9..4cfcea067 100644 --- a/tests/e2e/specs/FormImage.spec.js +++ b/tests/e2e/specs/FormImage.spec.js @@ -1,7 +1,7 @@ describe("Form Image", () => { it("Upload image to show", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormImage]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -22,7 +22,7 @@ describe("Form Image", () => { it("Image by variable", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormImage]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/specs/FormInput.spec.js b/tests/e2e/specs/FormInput.spec.js index 27221e4b5..3c24aa606 100644 --- a/tests/e2e/specs/FormInput.spec.js +++ b/tests/e2e/specs/FormInput.spec.js @@ -1,7 +1,7 @@ describe("Form Input", () => { const visitAndOpenAcordeon = () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); }; const dragFormInput = () => { diff --git a/tests/e2e/specs/FormSelectList.spec.js b/tests/e2e/specs/FormSelectList.spec.js index 0da8a8dfe..e54e44ca2 100644 --- a/tests/e2e/specs/FormSelectList.spec.js +++ b/tests/e2e/specs/FormSelectList.spec.js @@ -1,7 +1,7 @@ describe("Form Select List", () => { beforeEach(() => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); // Add loop control cy.get("[data-cy=controls-FormSelectList]").drag( "[data-cy=screen-drop-zone]", diff --git a/tests/e2e/specs/FormTextArea.spec.js b/tests/e2e/specs/FormTextArea.spec.js index 6f443e5fa..d8dd1a0ad 100644 --- a/tests/e2e/specs/FormTextArea.spec.js +++ b/tests/e2e/specs/FormTextArea.spec.js @@ -1,7 +1,7 @@ describe("Form Text Area Field", () => { it("Default properties", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -17,7 +17,7 @@ describe("Form Text Area Field", () => { }); it("Variable properties", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -37,7 +37,7 @@ describe("Form Text Area Field", () => { }); it("Read Only", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -58,7 +58,7 @@ describe("Form Text Area Field", () => { // Configuration it("Placeholder", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -75,7 +75,7 @@ describe("Form Text Area Field", () => { }); it("Helper Text", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -91,7 +91,7 @@ describe("Form Text Area Field", () => { }); it("Rich Text", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -107,7 +107,7 @@ describe("Form Text Area Field", () => { }); it("Rows", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -124,7 +124,7 @@ describe("Form Text Area Field", () => { }); it("Default Value", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -141,7 +141,7 @@ describe("Form Text Area Field", () => { }); it("CSS Selector Name", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -159,7 +159,7 @@ describe("Form Text Area Field", () => { }); it("Aria Label", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -176,7 +176,7 @@ describe("Form Text Area Field", () => { }); it("Tab Order", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormTextArea]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } diff --git a/tests/e2e/specs/Loop.spec.js b/tests/e2e/specs/Loop.spec.js index 11a54de3f..018e9ee12 100644 --- a/tests/e2e/specs/Loop.spec.js +++ b/tests/e2e/specs/Loop.spec.js @@ -1,7 +1,7 @@ describe("Loop control", () => { it("Input inside loop", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); // Add loop control cy.get("[data-cy=controls-FormLoop]").drag("[data-cy=screen-drop-zone]", { position: "bottom" @@ -12,7 +12,7 @@ describe("Loop control", () => { cy.get("[data-cy=inspector-add]").click(); // Add input to loop - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag( "[data-cy=screen-element-container] .column-draggable div", { position: "bottom" } @@ -75,7 +75,7 @@ describe("Loop control", () => { it("Verify validation on visible fields", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); // Add loop control cy.get("[data-cy=controls-FormLoop]").drag("[data-cy=screen-drop-zone]", { position: "bottom" @@ -85,7 +85,7 @@ describe("Loop control", () => { cy.get("[data-cy=inspector-source]").select("existing"); // Add input to loop - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag( "[data-cy=screen-element-container] .column-draggable div", { position: "bottom" } @@ -161,7 +161,7 @@ describe("Loop control", () => { cy.on("window:alert", (msg) => (alert = msg)); // Add loop control - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormLoop]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -181,7 +181,7 @@ describe("Loop control", () => { cy.get("[data-cy=inspector-conditionalHide]").clear().type('name != "foo"'); // Add input to multicolumn - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag( ".mb-1 > :nth-child(1) > .row > :nth-child(1)", { position: "bottom" } @@ -231,7 +231,7 @@ describe("Loop control", () => { cy.on("window:alert", (msg) => (alert = msg)); // Add loop contro - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormLoop]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -252,7 +252,7 @@ describe("Loop control", () => { cy.get("[data-cy=inspector-conditionalHide]").clear().type('name != "foo"'); // Add input to nested loop - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag( ".m-2 > .column-draggable > div", { position: "bottom" } @@ -345,7 +345,7 @@ describe("Loop control", () => { cy.showValidationOnLoad(); let alert = false; cy.on("window:alert", (msg) => (alert = msg)); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); // Add loop control cy.get("[data-cy=controls-FormLoop]").drag("[data-cy=screen-drop-zone]", { @@ -371,7 +371,7 @@ describe("Loop control", () => { cy.get("[data-cy=inspector-conditionalHide]").clear().type('name != "foo"'); // Add submit button - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormButton]") .contains("Submit Button") .drag("[data-cy=screen-element-container]", { position: "bottom" }); diff --git a/tests/e2e/specs/MediaQuery.spec.js b/tests/e2e/specs/MediaQuery.spec.js index c22e1943c..d4ed1fe2f 100644 --- a/tests/e2e/specs/MediaQuery.spec.js +++ b/tests/e2e/specs/MediaQuery.spec.js @@ -9,7 +9,7 @@ describe("Media Query CSS", () => { before(() => { // run these tests as if in a desktop cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/specs/MultiColumn.spec.js b/tests/e2e/specs/MultiColumn.spec.js index 378387748..654975b89 100644 --- a/tests/e2e/specs/MultiColumn.spec.js +++ b/tests/e2e/specs/MultiColumn.spec.js @@ -1,8 +1,8 @@ describe("MultiColumns", () => { it("Configure using JSON", () => { cy.visit("/"); + cy.openAcordeon("collapse-3"); cy.openAcordeon("collapse-2"); - cy.openAcordeon("collapse-1"); cy.get("[data-cy=controls-FormMultiColumn]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -55,7 +55,7 @@ describe("MultiColumns", () => { it("Configure using columns configuration", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormMultiColumn]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -93,7 +93,7 @@ describe("MultiColumns", () => { ); cy.get("[data-cy=inspector-add-column-width]").clear().type("8"); cy.get("[data-cy=inspector-add-column-modal] button.btn-primary").click(); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag( "[data-cy=screen-element-container] .column-draggable:empty" ); diff --git a/tests/e2e/specs/NestedScreen.spec.js b/tests/e2e/specs/NestedScreen.spec.js index 96c91524f..b5eee604a 100644 --- a/tests/e2e/specs/NestedScreen.spec.js +++ b/tests/e2e/specs/NestedScreen.spec.js @@ -80,7 +80,7 @@ describe("Nested screen", () => { it("Without a variable defined", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormNestedScreen]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } diff --git a/tests/e2e/specs/Pagination.spec.js b/tests/e2e/specs/Pagination.spec.js index 00f285903..d982f7b4e 100644 --- a/tests/e2e/specs/Pagination.spec.js +++ b/tests/e2e/specs/Pagination.spec.js @@ -56,8 +56,8 @@ const data = { beforeEach(() => { cy.visit("/"); + cy.openAcordeon("collapse-3"); cy.openAcordeon("collapse-2"); - cy.openAcordeon("collapse-1"); cy.wait(200); cy.get("[data-cy=controls-FormRecordList]").drag( "[data-cy=screen-drop-zone]", diff --git a/tests/e2e/specs/ResponsivePreview.spec.js b/tests/e2e/specs/ResponsivePreview.spec.js index 01573e5fc..6cf1980b8 100644 --- a/tests/e2e/specs/ResponsivePreview.spec.js +++ b/tests/e2e/specs/ResponsivePreview.spec.js @@ -10,7 +10,7 @@ describe("Responsive Preview test", () => { beforeEach(() => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get(controlInputSelector).drag(screenDropZoneSelector, { position: "bottom" }); diff --git a/tests/e2e/specs/RichText.spec.js b/tests/e2e/specs/RichText.spec.js index 46c701651..19fafecc4 100644 --- a/tests/e2e/specs/RichText.spec.js +++ b/tests/e2e/specs/RichText.spec.js @@ -1,7 +1,7 @@ describe("Rich Text control", () => { it("Rich text with mustache", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormHtmlViewer]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -21,7 +21,7 @@ describe("Rich Text control", () => { it("Rich text render HTML from a Variable", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormHtmlViewer]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } diff --git a/tests/e2e/specs/ScreenWarnings.spec.js b/tests/e2e/specs/ScreenWarnings.spec.js index 57851014c..43e71d2a2 100644 --- a/tests/e2e/specs/ScreenWarnings.spec.js +++ b/tests/e2e/specs/ScreenWarnings.spec.js @@ -18,7 +18,7 @@ describe("Screen Warnings", () => { }); it("Use script warning", () => { - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/specs/SelectListDependentCollection.spec.js b/tests/e2e/specs/SelectListDependentCollection.spec.js index 9bd71508d..b4b0a1683 100644 --- a/tests/e2e/specs/SelectListDependentCollection.spec.js +++ b/tests/e2e/specs/SelectListDependentCollection.spec.js @@ -79,7 +79,7 @@ describe("select list dependent collection", () => { }); it("Configure collection select list", () => { - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormSelectList]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } diff --git a/tests/e2e/specs/UndoRedo.spec.js b/tests/e2e/specs/UndoRedo.spec.js index 803bd13ca..604a78b60 100644 --- a/tests/e2e/specs/UndoRedo.spec.js +++ b/tests/e2e/specs/UndoRedo.spec.js @@ -1,7 +1,7 @@ describe("Undo and Redo", () => { it("Can Undo", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -14,7 +14,7 @@ describe("Undo and Redo", () => { it("Can Redo", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/specs/VariableNames.js b/tests/e2e/specs/VariableNames.js index 7834bce9c..0505431f9 100644 --- a/tests/e2e/specs/VariableNames.js +++ b/tests/e2e/specs/VariableNames.js @@ -1,7 +1,7 @@ describe("Default values", () => { it("Variable names with dots 2 levels", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -16,7 +16,7 @@ describe("Default values", () => { }); it("Variable names with dots 3 levels", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -36,7 +36,7 @@ describe("Default values", () => { }); it("Variable names with dots and one attribute same as the name", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/specs/VisibilityRule.spec.js b/tests/e2e/specs/VisibilityRule.spec.js index b02b05975..76254f7b6 100644 --- a/tests/e2e/specs/VisibilityRule.spec.js +++ b/tests/e2e/specs/VisibilityRule.spec.js @@ -2,7 +2,7 @@ describe("Default values", () => { it("Check visible", () => { cy.visit("/"); cy.setPreviewDataInput({ name: "world" }); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -17,7 +17,7 @@ describe("Default values", () => { it("Check hidden", () => { cy.visit("/"); cy.setPreviewDataInput({ name: "" }); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -32,7 +32,7 @@ describe("Default values", () => { it("Check dynamic visibility rule", () => { cy.visit("/"); cy.setPreviewDataInput({ name: "" }); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/specs/Watchers.spec.js b/tests/e2e/specs/Watchers.spec.js index d7a064ba2..b64d295ea 100644 --- a/tests/e2e/specs/Watchers.spec.js +++ b/tests/e2e/specs/Watchers.spec.js @@ -64,7 +64,7 @@ describe("Watchers", () => { it.skip("CRUD of watchers", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -144,7 +144,7 @@ describe("Watchers", () => { }); it("Test cancel", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -161,13 +161,13 @@ describe("Watchers", () => { }); it("Test variables in multi columns", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormMultiColumn]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } ); cy.get("[data-cy=screen-element-container]").click(); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag( "[data-cy=screen-element-container] .column-draggable", { position: "bottom" } @@ -181,7 +181,7 @@ describe("Watchers", () => { it("Test variables in nested screens", () => { cy.visit("/"); - cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-3"); cy.get("[data-cy=controls-FormNestedScreen]").drag( "[data-cy=screen-drop-zone]", { position: "bottom" } @@ -202,7 +202,7 @@ describe("Watchers", () => { it("Create duplicated properties", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -265,7 +265,7 @@ describe("Watchers", () => { ); cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -349,7 +349,7 @@ describe("Watchers", () => { ); cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -408,7 +408,7 @@ describe("Watchers", () => { }); cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -557,7 +557,7 @@ describe("Watchers", () => { }); it("Focuses the first field that has an error", () => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/specs/WatchersBypass.spec.js b/tests/e2e/specs/WatchersBypass.spec.js index 4cf91e60c..77913d3f5 100644 --- a/tests/e2e/specs/WatchersBypass.spec.js +++ b/tests/e2e/specs/WatchersBypass.spec.js @@ -74,7 +74,7 @@ describe("Watchers", () => { Cypress.Commands.add('setupFormInput', (inputName) => { cy.visit("/"); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-element-container]", { position: "top" }); cy.get("[data-cy=screen-element-container]").last().click(); diff --git a/tests/e2e/specs/WrongConfigurationErrors.js b/tests/e2e/specs/WrongConfigurationErrors.js index aa0e9d032..56f3a1f7f 100644 --- a/tests/e2e/specs/WrongConfigurationErrors.js +++ b/tests/e2e/specs/WrongConfigurationErrors.js @@ -6,7 +6,7 @@ describe.skip("Wrong Configuration Errors", () => { cy.stub(win.console, "error").as("consoleError"); } }); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); @@ -27,7 +27,7 @@ describe.skip("Wrong Configuration Errors", () => { cy.stub(win.console, "error").as("consoleError"); } }); - cy.openAcordeon("collapse-1"); + cy.openAcordeon("collapse-2"); cy.get("[data-cy=controls-FormInput]").drag("[data-cy=screen-drop-zone]", { position: "bottom" }); diff --git a/tests/e2e/support/commands.js b/tests/e2e/support/commands.js index 8e833dc02..cf63181a8 100644 --- a/tests/e2e/support/commands.js +++ b/tests/e2e/support/commands.js @@ -288,9 +288,9 @@ Cypress.Commands.add("openAcordeon", (name) => { }); Cypress.Commands.add("openAllAcordeon", () => { + cy.openAcordeon("collapse-6"); cy.openAcordeon("collapse-5"); cy.openAcordeon("collapse-4"); cy.openAcordeon("collapse-3"); cy.openAcordeon("collapse-2"); - cy.openAcordeon("collapse-1"); }); From bf67ef46563f6d825325de3050cbadfab3639eeb Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Tue, 10 Sep 2024 09:30:51 -0400 Subject: [PATCH 05/46] update open acordeon clipboard --- tests/e2e/specs/ClipboardControl.spec.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/e2e/specs/ClipboardControl.spec.js b/tests/e2e/specs/ClipboardControl.spec.js index 1da9ea783..9d4ca31de 100644 --- a/tests/e2e/specs/ClipboardControl.spec.js +++ b/tests/e2e/specs/ClipboardControl.spec.js @@ -7,7 +7,10 @@ describe("Add Clipboard Section to Control Menu", () => { // Step 1: Navigate to the homepage cy.visit("/"); - // Step 2: Verify that the Clipboard section is visible in the control menu + // Step 2: Open the clipboard acordeon + cy.openAcordeon("collapse-1"); + + // Step 3: Verify that the Clipboard section is visible in the control menu cy.contains("Clipboard").should("be.visible"); }); @@ -18,8 +21,8 @@ describe("Add Clipboard Section to Control Menu", () => { // Step 1: Navigate to the homepage cy.visit("/"); - // Step 2: Open all accordions in the control menu - cy.openAllAcordeon(); + // Step 2: Open the clipboard acordeon + cy.openAcordeon("collapse-1"); // Step 3: Verify that the Clipboard accordion exists and is visible cy.get('[data-cy="controls-Clipboard"]').should("exist").should("be.visible"); @@ -32,8 +35,8 @@ describe("Add Clipboard Section to Control Menu", () => { // Step 1: Navigate to the homepage cy.visit("/"); - // Step 2: Open all accordions in the control menu - cy.openAllAcordeon(); + // Step 2: Open the clipboard acordeon + cy.openAcordeon("collapse-1"); // Step 3: Click to open the Clipboard accordion cy.get('[data-cy="controls-Clipboard"]').click(); From c07a205ec14576bb2523d7313f554ec90dfae587 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Tue, 10 Sep 2024 09:32:47 -0400 Subject: [PATCH 06/46] update openAllAcordeon cypress comman and add the clipboard acordeon --- tests/e2e/support/commands.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/support/commands.js b/tests/e2e/support/commands.js index cf63181a8..81ddadc07 100644 --- a/tests/e2e/support/commands.js +++ b/tests/e2e/support/commands.js @@ -293,4 +293,5 @@ Cypress.Commands.add("openAllAcordeon", () => { cy.openAcordeon("collapse-4"); cy.openAcordeon("collapse-3"); cy.openAcordeon("collapse-2"); + cy.openAcordeon("collapse-1"); }); From fc790d5cba41b8fc3084fdcdcccf7752b6a9babe Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Tue, 10 Sep 2024 09:50:57 -0400 Subject: [PATCH 07/46] fix WatchersDragAndDrop.spec and update acordeon index --- tests/e2e/specs/WatchersDragAndDrop.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/WatchersDragAndDrop.spec.js b/tests/e2e/specs/WatchersDragAndDrop.spec.js index 628ffc28b..f8d881802 100644 --- a/tests/e2e/specs/WatchersDragAndDrop.spec.js +++ b/tests/e2e/specs/WatchersDragAndDrop.spec.js @@ -143,7 +143,7 @@ describe('Watchers list Drag&Drop', () => { }, }); - cy.openAcordeon('collapse-1'); + cy.openAcordeon('collapse-2'); cy.get('[data-cy=controls-FormInput]').drag('[data-cy=screen-drop-zone]', { position: 'bottom', }); From bb94a382587fd7a7958a94f7adb671a02ca9c3e4 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelca Date: Tue, 10 Sep 2024 10:03:37 -0400 Subject: [PATCH 08/46] feature/FOUR-13438: STORY Copy icon now adds to clipboard --- src/components/ClipboardButton.vue | 65 +++++++++++++++++++++++++++++ src/components/vue-form-builder.vue | 46 ++++++++++++++++++-- 2 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 src/components/ClipboardButton.vue diff --git a/src/components/ClipboardButton.vue b/src/components/ClipboardButton.vue new file mode 100644 index 000000000..b16fa6ead --- /dev/null +++ b/src/components/ClipboardButton.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/src/components/vue-form-builder.vue b/src/components/vue-form-builder.vue index 19f127351..7ef965a9e 100644 --- a/src/components/vue-form-builder.vue +++ b/src/components/vue-form-builder.vue @@ -244,6 +244,27 @@ /> {{ element.config.name || $t("Variable Name") }}
+ + + diff --git a/src/components/index.js b/src/components/index.js index ac4064f65..bc76eb0d8 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -29,6 +29,7 @@ import { LRUCache } from "lru-cache"; import Vuex from "vuex"; import globalErrorsModule from "../store/modules/globalErrorsModule"; import undoRedoModule from "../store/modules/undoRedoModule"; +import clipboardModule from "../store/modules/clipboardModule"; import BasicSearch from "./basic-search.vue"; import ComputedProperties from "./computed-properties.vue"; import CustomCSS from "./custom-css.vue"; @@ -167,7 +168,8 @@ export default { modules: { globalErrorsModule, // @todo Improve how to load this module, it is used only in the form builder, not used in the form renderer. - undoRedoModule + undoRedoModule, + clipboardModule } }); Vue.mixin({ store }); diff --git a/src/components/vue-form-builder.vue b/src/components/vue-form-builder.vue index 7ef965a9e..16d4a293c 100644 --- a/src/components/vue-form-builder.vue +++ b/src/components/vue-form-builder.vue @@ -247,24 +247,9 @@ - -