DEV: fix form template flaky (#32360)

This commit is contained in:
Renato Atilio
2025-04-17 19:54:38 -03:00
committed by GitHub
parent bdca369288
commit 4c26679b2d
@@ -87,7 +87,7 @@ RSpec.describe FormTemplatesController do
tag_group: "tag_group1" # Replace with actual value if needed
validations:
required: false
- type: tag-chooser
id: 2
attributes:
@@ -116,13 +116,13 @@ RSpec.describe FormTemplatesController do
expect(parsed_template[1]["attributes"]["tag_group"]).to eq(tag_group2.name)
expect(parsed_template[0]["attributes"]["tag_choices"]).to eq(
{ "tag1" => "Tag 1 custom Translation" },
{ tag1.name => tag1.description },
)
expect(parsed_template[1]["attributes"]["tag_choices"]).to eq(
{ "tag2" => "Tag 2 custom Translation" },
{ tag2.name => tag2.description },
)
expect(parsed_template[0]["choices"]).to eq(%w[tag1 tag3])
expect(parsed_template[1]["choices"]).to eq(%w[tag2 tag4])
expect(parsed_template[0]["choices"]).to eq([tag1.name, tag3.name])
expect(parsed_template[1]["choices"]).to eq([tag2.name, tag4.name])
end
end
end