Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the wording for the alert status check boxes #1706

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

en:
alert_status:
avoid_all_but_essential_travel_to_parts: The FCO advise against all but essential travel to parts of the country
avoid_all_travel_to_parts: The FCO advise against all travel to parts of the country
avoid_all_but_essential_travel_to_whole_country: The FCO advise against all but essential travel to the whole country
avoid_all_travel_to_whole_country: The FCO advise against all travel to the whole country
avoid_all_but_essential_travel_to_parts: FCO advises against all but essential travel to parts of the country
avoid_all_travel_to_parts: FCO advises against all travel to parts of the country
avoid_all_but_essential_travel_to_whole_country: FCO advises against all but essential travel to the whole country
avoid_all_travel_to_whole_country: FCO advises against all travel to the whole country
country_table:
filter:
label: Filter countries
Expand Down
40 changes: 20 additions & 20 deletions spec/features/edition_edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ def assert_details_does_not_contain(content_id, key)
end

within_section "the fieldset labelled General information" do
expect(page).to have_unchecked_field("The FCO advise against all travel to the whole country")
expect(page).to have_unchecked_field("The FCO advise against all travel to parts of the country")
expect(page).to have_unchecked_field("The FCO advise against all but essential travel to the whole country")
expect(page).to have_unchecked_field("The FCO advise against all but essential travel to parts of the country")
expect(page).to have_unchecked_field("FCO advises against all travel to the whole country")
expect(page).to have_unchecked_field("FCO advises against all travel to parts of the country")
expect(page).to have_unchecked_field("FCO advises against all but essential travel to the whole country")
expect(page).to have_unchecked_field("FCO advises against all but essential travel to parts of the country")
end

within_section "the fieldset labelled Parts (govspeak available)" do
Expand Down Expand Up @@ -340,13 +340,13 @@ def assert_details_does_not_contain(content_id, key)
@edition = create(:travel_advice_edition, country_slug: "australia", state: "draft")
visit "/admin/editions/#{@edition.to_param}/edit"

expect(page).to have_unchecked_field("The FCO advise against all but essential travel to parts of the country")
expect(page).to have_unchecked_field("The FCO advise against all travel to parts of the country")
expect(page).to have_unchecked_field("The FCO advise against all but essential travel to the whole country")
expect(page).to have_unchecked_field("The FCO advise against all travel to the whole country")
expect(page).to have_unchecked_field("FCO advises against all but essential travel to parts of the country")
expect(page).to have_unchecked_field("FCO advises against all travel to parts of the country")
expect(page).to have_unchecked_field("FCO advises against all but essential travel to the whole country")
expect(page).to have_unchecked_field("FCO advises against all travel to the whole country")

check "The FCO advise against all but essential travel to parts of the country"
check "The FCO advise against all travel to parts of the country"
check "FCO advises against all but essential travel to parts of the country"
check "FCO advises against all travel to parts of the country"

click_on "Save"

Expand All @@ -357,13 +357,13 @@ def assert_details_does_not_contain(content_id, key)
)

expect(@edition.reload.alert_status).to eq %w[avoid_all_travel_to_parts avoid_all_but_essential_travel_to_parts]
expect(page).to have_checked_field("The FCO advise against all but essential travel to parts of the country")
expect(page).to have_checked_field("The FCO advise against all travel to parts of the country")
expect(page).to have_unchecked_field("The FCO advise against all but essential travel to the whole country")
expect(page).to have_unchecked_field("The FCO advise against all travel to the whole country")
expect(page).to have_checked_field("FCO advises against all but essential travel to parts of the country")
expect(page).to have_checked_field("FCO advises against all travel to parts of the country")
expect(page).to have_unchecked_field("FCO advises against all but essential travel to the whole country")
expect(page).to have_unchecked_field("FCO advises against all travel to the whole country")

uncheck "The FCO advise against all but essential travel to parts of the country"
uncheck "The FCO advise against all travel to parts of the country"
uncheck "FCO advises against all but essential travel to parts of the country"
uncheck "FCO advises against all travel to parts of the country"

WebMock::RequestRegistry.instance.reset!

Expand All @@ -372,10 +372,10 @@ def assert_details_does_not_contain(content_id, key)
assert_details_contains("48baf826-7d71-4fea-a9c4-9730fd30eb9e", "alert_status", [])

expect(@edition.reload.alert_status).to eq []
expect(page).to have_unchecked_field("The FCO advise against all but essential travel to parts of the country")
expect(page).to have_unchecked_field("The FCO advise against all travel to parts of the country")
expect(page).to have_unchecked_field("The FCO advise against all but essential travel to the whole country")
expect(page).to have_unchecked_field("The FCO advise against all travel to the whole country")
expect(page).to have_unchecked_field("FCO advises against all but essential travel to parts of the country")
expect(page).to have_unchecked_field("FCO advises against all travel to parts of the country")
expect(page).to have_unchecked_field("FCO advises against all but essential travel to the whole country")
expect(page).to have_unchecked_field("FCO advises against all travel to the whole country")
end

scenario "managing images for an edition" do
Expand Down