Skip to content

Commit

Permalink
Drop down other label set to 'Enter another option' instead of 'Other'
Browse files Browse the repository at this point in the history
  • Loading branch information
maatinito committed Apr 20, 2024
1 parent 9561768 commit ee48827
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/i18n-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ ignore_unused:

## Ignore these keys completely:
ignore:
- 'shared.champs.drop_down_list{,.other}' # pluralization "other" false positive
- 'shared.champs.drop_down_list{,.other,.other_label}' # pluralization "other" false positive

## Sometimes, it isn't possible for i18n-tasks to match the key correctly,
## e.g. in case of a relative key defined in a helper method.
Expand Down
2 changes: 1 addition & 1 deletion spec/models/logic/champ_value_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
let(:champ) { create(:champ_drop_down_list, value: 'val1', other: true) }

it { is_expected.to eq('val1') }
it { expect(champ_value(champ.stable_id).options([champ.type_de_champ])).to match_array([["val1", "val1"], ["val2", "val2"], ["val3", "val3"], ["Autre", "__other__"]]) }
it { expect(champ_value(champ.stable_id).options([champ.type_de_champ])).to match_array([["val1", "val1"], ["val2", "val2"], ["val3", "val3"], [I18n.t('shared.champs.drop_down_list.other'), "__other__"]]) }
end

context 'with other filled' do
Expand Down
6 changes: 3 additions & 3 deletions spec/system/users/dropdown_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
scenario "Getting back from other save the new option", js: true do
fill_individual

choose "Autre"
fill_in("Veuillez saisir votre autre choix", with: "My choice")
choose I18n.t('shared.champs.drop_down_list.other')
fill_in(I18n.t('shared.champs.drop_down_list.other_label'), with: "My choice")

wait_until { user_dossier.champs_public.first.value == "My choice" }
expect(user_dossier.champs_public.first.value).to eq("My choice")
Expand Down Expand Up @@ -60,7 +60,7 @@
fill_individual

expect(page).not_to have_selector(".drop_down_other input")
select("Autre")
select(I18n.t('shared.champs.drop_down_list.other'))
find(".drop_down_other input", visible: true)

select("Secondary 1.2")
Expand Down

0 comments on commit ee48827

Please sign in to comment.