@@ -12,8 +12,8 @@ def response
12
12
13
13
map name : 'newmap' do
14
14
area shape : 'rect' , coords : [ 0 , 0 , 100 , 100 ] , href : 'first.htm' , alt : 'First'
15
- area shape : 'rect' , coords : [ 0 , 0 , 100 , 100 ] , href : 'second.htm' , alt : 'Second'
16
- area shape : 'rect' , coords : [ 0 , 0 , 100 , 100 ] , href : 'third.htm' , alt : 'Third'
15
+ area shape : 'rect' , coords : [ 100 , 100 , 200 , 200 ] , href : 'second.htm' , alt : 'Second'
16
+ area shape : 'rect' , coords : [ 200 , 200 , 300 , 300 ] , href : 'third.htm' , alt : 'Third'
17
17
end
18
18
}
19
19
end
@@ -24,15 +24,14 @@ def response
24
24
static_output = page . html
25
25
26
26
expected_static_output = <<~HTML
27
- < img src ="matestack-logo.png " alt ="otherlogo " width ="500 " height ="300 " usemap ="#newmap ">
28
-
29
27
< map name ="newmap ">
30
- < area shape =" rect " coords ="0,0,100,100 " href ="first.htm " alt =" First ">
31
- < area shape =" rect " coords ="100,100,200,200 " href ="second.htm " alt =" Second ">
32
- < area shape =" rect " coords ="200,200,300,300 " href ="third.htm " alt =" Third ">
28
+ < area alt =" First " coords ="0,0,100,100 " href ="first.htm " shape =" rect ">
29
+ < area alt =" Second " coords ="100,100,200,200 " href ="second.htm " shape =" rect ">
30
+ < area alt =" Third " coords ="200,200,300,300 " href ="third.htm " shape =" rect ">
33
31
</ map >
34
32
HTML
35
33
36
34
expect ( stripped ( static_output ) ) . to include ( stripped ( expected_static_output ) )
35
+ expect ( page ) . to have_xpath ( "//img[contains(@src,'matestack-logo') and @alt='otherlogo' and @width='500' and @height='300' and @usemap='\# newmap']" )
37
36
end
38
37
end
0 commit comments