From: Andy Allan Date: Wed, 27 Apr 2022 16:14:31 +0000 (+0100) Subject: Add system tests for communities page X-Git-Tag: live~1887^2~14 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/819e5ecf94b23004179cce2c53a1a32991324ec7 Add system tests for communities page --- diff --git a/test/system/view_communities_test.rb b/test/system/view_communities_test.rb new file mode 100644 index 000000000..f431ed64a --- /dev/null +++ b/test/system/view_communities_test.rb @@ -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