Skip to content

Commit

Permalink
Merge branch 'next' into FOUR-12447
Browse files Browse the repository at this point in the history
  • Loading branch information
josechirivella authored Jan 3, 2024
2 parents 81fc240 + fc33577 commit 922f1c4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
14 changes: 11 additions & 3 deletions src/components/vue-form-builder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
<!-- Accordion Bootstrap -->
<template v-for="(group, index) in controlGroups">
<b-button
v-if="filteredControlsGrouped[group.key].length > 0"
v-if="
!!filteredControlsGrouped &&
filteredControlsGrouped[group.key].length > 0
"
v-b-toggle="`collapse-${index}`"
class="w-100 rounded-0 text-left"
style="
Expand Down Expand Up @@ -84,7 +87,10 @@
/>
{{ $t(element.label) }}
</b-list-group-item>
<li v-if="!filteredControls.length" class="list-group-item">
<li
v-if="!!filteredControls && filteredControls.length > 0"
class="list-group-item"
>
<slot />
</li>
</draggable>
Expand Down Expand Up @@ -684,6 +690,7 @@ export default {
{ key: "Files", label: "Files" },
{ key: "Advanced", label: "Advanced" }
],
filteredControlsGrouped: {},

isCollapsed: new Array(6).fill(true)
};
Expand Down Expand Up @@ -813,7 +820,8 @@ export default {
handler(newVal) {
this.groupFilteredControls(newVal);
},
deep: true
deep: true,
immediate: true
}
},
created() {
Expand Down
7 changes: 3 additions & 4 deletions tests/e2e/specs/FileUpload.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ describe("File Upload", () => {
it("Automatically sets a variable name", () => {
cy.visit("/");
cy.openAcordeon("collapse-4");
// cy.openAcordeon("collapse-1");
cy.get("[data-cy=controls-FileUpload]").drag("[data-cy=screen-drop-zone]", {
position: "bottom"
});
Expand All @@ -22,11 +21,11 @@ describe("File Upload", () => {
cy.window().then((win) => {
win.ProcessMaker.isSelfService = true;
});

cy.openAcordeon("collapse-4");
cy.get("[data-cy=controls-FileUpload]").drag("[data-cy=screen-drop-zone]", {
position: "bottom"
});
cy.get("[data-cy=mode-preview]").click();
cy.get("[data-cy=file-upload-button]").should("have.attr", "disabled");
cy.get('[data-cy=mode-preview]').click();
cy.get('[data-cy=file-upload-button]').should('have.attr', 'disabled');
});
});
6 changes: 5 additions & 1 deletion tests/e2e/specs/MultiInstanceLoopContext.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ describe("FOUR-3375 FileUpload inside MultiInstance Task", () => {
})
).as("uploadMainFile");
cy.openAcordeon("collapse-4");
cy.uploadFile("[data-cy='screen-field-rootUpload'] input[type=file]", "avatar.jpeg", "image/jpg");
cy.uploadFile(
"[data-cy='screen-field-rootUpload'] input[type=file]",
"avatar.jpeg",
"image/jpg"
);
cy.wait("@uploadMainFile");

// Upload file 1
Expand Down

0 comments on commit 922f1c4

Please sign in to comment.