1 require "application_system_test_case"
3 class SiteTest < ApplicationSystemTestCase
4 test "visiting the index" do
7 assert_selector "h1", :text => "OpenStreetMap"
10 test "tooltip shows for Layers button" do
13 assert_no_selector ".tooltip"
14 button = find ".control-layers .control-button"
16 assert_selector ".tooltip", :text => "Layers"
19 test "tooltip shows for Map Key button on Standard layer" do
22 assert_no_selector ".tooltip"
23 button = find ".control-key .control-button"
25 tooltip = find ".tooltip"
26 tooltip.assert_text "Map Key"
27 tooltip.assert_no_text "not available"
30 test "tooltip shows for Map Key button on a layer without a key provided" do
31 visit "/#layers=Y" # assumes that CyclOSM layer has no map key
33 assert_no_selector ".tooltip"
34 button = find ".control-key .control-button"
36 tooltip = find ".tooltip"
37 tooltip.assert_text "Map Key"
38 tooltip.assert_text "not available"