use parseFloat to read opacity style values in tests
This commit is contained in:
@@ -373,7 +373,7 @@
|
|||||||
tile.onImageLoad();
|
tile.onImageLoad();
|
||||||
t.eq(tile.imgDiv.style.visibility, 'inherit',
|
t.eq(tile.imgDiv.style.visibility, 'inherit',
|
||||||
'[a] onImageLoad makes the image visible');
|
'[a] onImageLoad makes the image visible');
|
||||||
t.eq(tile.imgDiv.style.opacity, '0.5',
|
t.eq(parseFloat(tile.imgDiv.style.opacity), 0.5,
|
||||||
'[a] onImageLoad sets the expected opacity for the image');
|
'[a] onImageLoad sets the expected opacity for the image');
|
||||||
t.eq(log, 0,
|
t.eq(log, 0,
|
||||||
'[a] onImageLoad does not trigger loadend');
|
'[a] onImageLoad does not trigger loadend');
|
||||||
@@ -387,7 +387,7 @@
|
|||||||
tile.onImageLoad();
|
tile.onImageLoad();
|
||||||
t.eq(tile.imgDiv.style.visibility, 'inherit',
|
t.eq(tile.imgDiv.style.visibility, 'inherit',
|
||||||
'[b] onImageLoad makes the image visible');
|
'[b] onImageLoad makes the image visible');
|
||||||
t.eq(tile.imgDiv.style.opacity, '0.5',
|
t.eq(parseFloat(tile.imgDiv.style.opacity), 0.5,
|
||||||
'[b] onImageLoad sets the expected opacity for the image');
|
'[b] onImageLoad sets the expected opacity for the image');
|
||||||
t.eq(log, 1,
|
t.eq(log, 1,
|
||||||
'[b] onImageLoad does trigger loadend');
|
'[b] onImageLoad does trigger loadend');
|
||||||
@@ -401,7 +401,7 @@
|
|||||||
tile.onImageLoad();
|
tile.onImageLoad();
|
||||||
t.eq(tile.imgDiv.style.visibility, 'inherit',
|
t.eq(tile.imgDiv.style.visibility, 'inherit',
|
||||||
'[c] onImageLoad makes the image visible');
|
'[c] onImageLoad makes the image visible');
|
||||||
t.eq(tile.imgDiv.style.opacity, '0.5',
|
t.eq(parseFloat(tile.imgDiv.style.opacity), 0.5,
|
||||||
'[c] onImageLoad sets the expected opacity for the image');
|
'[c] onImageLoad sets the expected opacity for the image');
|
||||||
t.eq(log, 1,
|
t.eq(log, 1,
|
||||||
'[c] onImageLoad does trigger loadend');
|
'[c] onImageLoad does trigger loadend');
|
||||||
|
|||||||
Reference in New Issue
Block a user