Skip to content

Commit 09bd131

Browse files
author
Carlos Hernández
committed
Adjust Dropzone tests, templates, and controller to align with updated UI logic for preview visibility and structure.
# Conflicts: # src/Dropzone/assets/test/unit/controller.test.ts # src/Dropzone/templates/form_theme.html.twig
1 parent 3a0fa9e commit 09bd131

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Dropzone/assets/test/unit/controller.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ describe('DropzoneController', () => {
104104

105105
button.click();
106106

107-
await waitFor(() => expect(getByTestId(container, 'input')).toHaveStyle({ display: 'block' }));
108-
await waitFor(() => expect(getByTestId(container, 'placeholder')).toHaveStyle({ display: 'block' }));
107+
await waitFor(() => expect(getByTestId(container, 'input')).toHaveStyle({ display: 'none' }));
108+
await waitFor(() => expect(getByTestId(container, 'placeholder')).toHaveStyle({ display: 'none' }));
109109
await waitFor(() => expect(getByTestId(container, 'preview')).toHaveStyle({ display: 'block' }));
110110

111111
// The event should have been dispatched

src/Dropzone/templates/form_theme.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
{{- translation_domain is same as(false) ? attr.placeholder : attr.placeholder|trans({}, translation_domain) -}}
1111
{%- endif -%}
1212
</div>
13-
1413
<div class="dropzone-preview-container" data-symfony--ux-dropzone--dropzone-target="previewContainer">
1514
<div class="dropzone-preview" data-symfony--ux-dropzone--dropzone-target="preview" style="display: none">
1615
<div class="dropzone-preview-image" style="display: none"
@@ -20,8 +19,9 @@
2019
data-symfony--ux-dropzone--dropzone-target="previewClearButton"
2120
data-symfony--ux-dropzone--dropzone-filename-param="0"
2221
data-action="symfony--ux-dropzone--dropzone#clear"
23-
></button>
22+
></button>
2423
</div>
2524
</div>
25+
2626
</div>
2727
{%- endblock %}

0 commit comments

Comments
 (0)