From 819e5ecf94b23004179cce2c53a1a32991324ec7 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 27 Apr 2022 17:14:31 +0100 Subject: [PATCH] Add system tests for communities page --- test/system/view_communities_test.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/system/view_communities_test.rb 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 -- 2.39.5