@@ -13,11 +13,11 @@ function hasSVGPlaceholder(el) {
1313 } )
1414}
1515
16- function hasJPEGPlaceholder ( el ) {
16+ function hasBase64Placeholder ( el ) {
1717 el . children ( `img` )
1818 . should ( `have.attr` , `src` )
1919 . 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 / )
2121 } )
2222}
2323
@@ -49,21 +49,21 @@ describe(`gatsby-image`, () => {
4949 beforeEach ( ( ) => {
5050 cy . visit ( "/gatsby-image" ) . waitForRouteChange ( )
5151 } )
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 ) )
5555 it ( `traced` , testConfig , ( ) => testGatsbyImage ( `traced` , hasSVGPlaceholder ) )
5656 it ( `sqip` , testConfig , ( ) => testGatsbyImage ( `sqip` , hasSVGPlaceholder ) )
5757
5858 it ( `english` , testConfig , ( ) => {
59- testGatsbyImage ( `english` , hasJPEGPlaceholder )
59+ testGatsbyImage ( `english` , hasBase64Placeholder )
6060 cy . get ( `[data-cy="english"] p strong` ) . should (
6161 "have.text" ,
6262 "Locale - American English (png)"
6363 )
6464 } )
6565 it ( `german` , testConfig , ( ) => {
66- testGatsbyImage ( `german` , hasJPEGPlaceholder )
66+ testGatsbyImage ( `german` , hasBase64Placeholder )
6767 cy . get ( `[data-cy="german"] p strong` ) . should (
6868 "have.text" ,
6969 "Locale - German (png)"
0 commit comments