Skip to content

Commit 2f24cfc

Browse files
committed
Generalize leaflet-marker-icon selector
1 parent 5a9a82b commit 2f24cfc

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

test/system/account_home_test.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,41 @@ class AccountHomeTest < ApplicationSystemTestCase
66
sign_in_as(user)
77

88
visit root_path
9-
assert_no_selector "img.leaflet-marker-icon"
9+
assert_no_selector ".leaflet-marker-icon"
1010

1111
click_on "test user"
1212
click_on "Go to Home Location"
13-
all "img.leaflet-marker-icon", :count => 1 do |marker|
13+
all ".leaflet-marker-icon", :count => 1 do |marker|
1414
assert_equal "My home location", marker["title"]
1515
end
1616

1717
click_on "OpenStreetMap logo"
18-
assert_no_selector "img.leaflet-marker-icon"
18+
assert_no_selector ".leaflet-marker-icon"
1919
end
2020

2121
test "Go to Home Location works on non-map layout pages" do
2222
user = create(:user, :display_name => "test user", :home_lat => 60, :home_lon => 30)
2323
sign_in_as(user)
2424

2525
visit about_path
26-
assert_no_selector "img.leaflet-marker-icon"
26+
assert_no_selector ".leaflet-marker-icon"
2727

2828
click_on "test user"
2929
click_on "Go to Home Location"
30-
all "img.leaflet-marker-icon", :count => 1 do |marker|
30+
all ".leaflet-marker-icon", :count => 1 do |marker|
3131
assert_equal "My home location", marker["title"]
3232
end
3333

3434
click_on "OpenStreetMap logo"
35-
assert_no_selector "img.leaflet-marker-icon"
35+
assert_no_selector ".leaflet-marker-icon"
3636
end
3737

3838
test "Go to Home Location is not available for users without home location" do
3939
user = create(:user, :display_name => "test user")
4040
sign_in_as(user)
4141

4242
visit root_path
43-
assert_no_selector "img.leaflet-marker-icon"
43+
assert_no_selector ".leaflet-marker-icon"
4444

4545
click_on "test user"
4646
assert_no_link "Go to Home Location"
@@ -51,7 +51,7 @@ class AccountHomeTest < ApplicationSystemTestCase
5151
sign_in_as(user)
5252

5353
visit account_home_path
54-
assert_no_selector "img.leaflet-marker-icon"
54+
assert_no_selector ".leaflet-marker-icon"
5555
assert_text "Home location is not set"
5656
end
5757
end

test/system/dashboard_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class DashboardSystemTest < ApplicationSystemTestCase
6060
assert_no_text "Your location"
6161
assert_no_link "Fred Tester"
6262

63-
find("img.leaflet-marker-icon").click
63+
find(".leaflet-marker-icon").click
6464

6565
assert_text "Your location"
6666
assert_link "Fred Tester"

test/system/note_layer_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class NoteLayerTest < ApplicationSystemTestCase
88
end
99

1010
visit root_path(:anchor => "map=18/1.1/1.1&layers=N")
11-
all "img.leaflet-marker-icon", :count => 1 do |marker|
11+
all ".leaflet-marker-icon", :count => 1 do |marker|
1212
assert_equal "Note description", marker["title"]
1313
end
1414
end
@@ -21,7 +21,7 @@ class NoteLayerTest < ApplicationSystemTestCase
2121
end
2222

2323
visit root_path(:anchor => "map=18/1.1/1.1&layers=N")
24-
all "img.leaflet-marker-icon", :count => 1 do |marker|
24+
all ".leaflet-marker-icon", :count => 1 do |marker|
2525
assert_equal "", marker["title"]
2626
end
2727
end
@@ -33,7 +33,7 @@ class NoteLayerTest < ApplicationSystemTestCase
3333
end
3434

3535
visit root_path(:anchor => "map=18/1.1/1.1&layers=N")
36-
all "img.leaflet-marker-icon", :count => 1 do |marker|
36+
all ".leaflet-marker-icon", :count => 1 do |marker|
3737
assert_equal "", marker["title"]
3838
end
3939
end

0 commit comments

Comments
 (0)