@@ -13,11 +13,11 @@ function hasSVGPlaceholder(el) {
13
13
} )
14
14
}
15
15
16
- function hasJPEGPlaceholder ( el ) {
16
+ function hasBase64Placeholder ( el ) {
17
17
el . children ( `img` )
18
18
. should ( `have.attr` , `src` )
19
19
. and ( src => {
20
- expect ( src ) . to . match ( / ^ d a t a : i m a g e \/ j p e g / )
20
+ expect ( src ) . to . match ( / ^ d a t a : i m a g e \/ [ a - z ] + ; b a s e 6 4 / )
21
21
} )
22
22
}
23
23
@@ -49,21 +49,21 @@ describe(`gatsby-image`, () => {
49
49
beforeEach ( ( ) => {
50
50
cy . visit ( "/gatsby-image" ) . waitForRouteChange ( )
51
51
} )
52
- it ( `fluid` , testConfig , ( ) => testGatsbyImage ( `fluid` , hasJPEGPlaceholder ) )
53
- it ( `fixed` , testConfig , ( ) => testGatsbyImage ( `fixed` , hasJPEGPlaceholder ) )
54
- it ( `webp` , testConfig , ( ) => testGatsbyImage ( `webp` , hasJPEGPlaceholder ) )
52
+ it ( `fluid` , testConfig , ( ) => testGatsbyImage ( `fluid` , hasBase64Placeholder ) )
53
+ it ( `fixed` , testConfig , ( ) => testGatsbyImage ( `fixed` , hasBase64Placeholder ) )
54
+ it ( `webp` , testConfig , ( ) => testGatsbyImage ( `webp` , hasBase64Placeholder ) )
55
55
it ( `traced` , testConfig , ( ) => testGatsbyImage ( `traced` , hasSVGPlaceholder ) )
56
56
it ( `sqip` , testConfig , ( ) => testGatsbyImage ( `sqip` , hasSVGPlaceholder ) )
57
57
58
58
it ( `english` , testConfig , ( ) => {
59
- testGatsbyImage ( `english` , hasJPEGPlaceholder )
59
+ testGatsbyImage ( `english` , hasBase64Placeholder )
60
60
cy . get ( `[data-cy="english"] p strong` ) . should (
61
61
"have.text" ,
62
62
"Locale - American English (png)"
63
63
)
64
64
} )
65
65
it ( `german` , testConfig , ( ) => {
66
- testGatsbyImage ( `german` , hasJPEGPlaceholder )
66
+ testGatsbyImage ( `german` , hasBase64Placeholder )
67
67
cy . get ( `[data-cy="german"] p strong` ) . should (
68
68
"have.text" ,
69
69
"Locale - German (png)"
0 commit comments