Add system tests for communities page

This commit is contained in:
Andy Allan 2022-04-27 17:14:31 +01:00
parent d17d13c806
commit 819e5ecf94

View file

@ -0,0 +1,22 @@
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 US", :href => "https://www.openstreetmap.us/"
assert_link "Chapitre local OpenStreetMap Belgique", :href => "https://openstreetmap.be/"
end
end