fix(textarea): merge data controllers from opts & autoresize

This commit is contained in:
Colin Darie 2024-06-19 21:50:38 +02:00
parent f2669fbca8
commit 666b51fa9c
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 2 additions and 4 deletions

View file

@ -98,9 +98,7 @@ module Dsfr
})
end
if autoresize?
@opts.deep_merge!(data: { controller: 'autoresize' })
end
@opts.deep_merge!(data: { controller: token_list(@opts.dig(:data, :controller), 'autoresize' => autoresize?) })
@opts
end

View file

@ -142,7 +142,7 @@ describe 'As an administrateur, I want to manage the procedures attestation',
}
fill_in "Contenu du pied de page", with: ["line1", "line2", "line3", "line4"].join("\n")
expect(page).to have_field("Contenu du pied de page", with: "line1\nline2\nline3\nline4")
expect(page).to have_field("Contenu du pied de page", with: "line1\nline2\nline3line4")
click_on "Publier"
expect(attestation.reload).to be_published