openstreetmap-website/test/system/view_communities_test.rb
Andy Allan 4ab134d869 Use fallbacks for OCI resource names
This uses the fallbacks for OCI translations. For example, if a
local chapter doesn't have an explicitly translated name, it will
use a template for osm-lc resources and fill in the appropriate
translated community name.

Fixes #3814
2022-12-14 14:54:01 +00:00

22 lines
776 B
Ruby

require "application_system_test_case"
class ViewCommunitiesTest < ApplicationSystemTestCase
def test_lc_links
# Check that all the parsing of the chapter information has worked
visit "/communities"
assert_link "OpenStreetMap US", :href => "https://www.openstreetmap.us/"
assert_link "OpenStreetMap Belgium Local Chapter", :href => "https://openstreetmap.be/"
end
def test_translated_links
sign_in_as(create(:user))
visit edit_preferences_path
fill_in "Preferred Languages", :with => "fr"
click_on "Update Preferences"
visit "/communities"
assert_link "OpenStreetMap États-Unis", :href => "https://www.openstreetmap.us/"
assert_link "Chapitre local OpenStreetMap Belgique", :href => "https://openstreetmap.be/"
end
end