]> git.openstreetmap.org Git - rails.git/blobdiff - test/system/site_test.rb
Fix zoom level related tooltips for layer checkboxes
[rails.git] / test / system / site_test.rb
index 2809feb93bc3a2f16d4566109ce4d7c713dbfcb9..f918b897aa529ff1d05b789446db2041db121087 100644 (file)
@@ -62,4 +62,18 @@ class SiteTest < ApplicationSystemTestCase
       assert_selector ".tooltip", :text => "Zoom in"
     end
   end
+
+  test "notes layer tooltip appears on zoom out" do
+    visit "/#map=9/40/-4" # depends on zoom levels where notes are allowed
+    find(".control-layers .control-button").click
+    li = find(".layers-ui .overlay-layers li:first-child")
+    li.not_matches_css? ".disabled"
+    li.hover # try to trigger disabled tooltip
+    zoomout = find(".control-button.zoomout")
+    zoomout.hover # un-hover the tooltip that's being tested
+    zoomout.click
+    li.matches_css? ".disabled"
+    li.hover
+    assert_selector ".tooltip", :text => "Zoom in"
+  end
 end