X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/52591c55610b656cca3ef37269a8eef713368fc6..2e1f6428e7d03a109db57b0d0614ecd2c0e5d5c1:/test/system/index_test.rb?ds=inline diff --git a/test/system/index_test.rb b/test/system/index_test.rb index 1de18c9ed..2944b817e 100644 --- a/test/system/index_test.rb +++ b/test/system/index_test.rb @@ -1,6 +1,41 @@ require "application_system_test_case" class IndexTest < ApplicationSystemTestCase + test "should remove and add an overlay on share button click" do + node = create(:node) + visit node_path(node) + assert_selector "#content.overlay-right-sidebar" + find(".icon.share").click + assert_no_selector "#content.overlay-right-sidebar" + find(".icon.share").click + assert_selector "#content.overlay-right-sidebar" + end + + test "should add an overlay on close" do + node = create(:node) + visit node_path(node) + find(".icon.share").click + assert_no_selector "#content.overlay-right-sidebar" + find(".share-ui .btn-close").click + assert_selector "#content.overlay-right-sidebar" + end + + test "should not add overlay when not closing right menu popup" do + node = create(:node) + visit node_path(node) + find(".icon.share").click + + find(".icon.key").click + assert_no_selector "#content.overlay-right-sidebar" + find(".icon.layers").click + assert_no_selector "#content.overlay-right-sidebar" + find(".icon.key").click + assert_no_selector "#content.overlay-right-sidebar" + + find(".icon.key").click + assert_selector "#content.overlay-right-sidebar" + end + test "node included in edit link" do node = create(:node) visit node_path(node)