@@ -205,6 +205,8 @@ async function captureScreenshotsForConfig(
205205 if ( discoveryErrors . browsers [ globalBrowser ] ) {
206206 discoveryErrors . browsers [ globalBrowser ] [ globalViewport ] ?. push ( data as any ) ;
207207 }
208+
209+ ctx . build . hasDiscoveryError = true ;
208210 }
209211
210212 // Continue the request with the fetched response
@@ -225,19 +227,23 @@ async function captureScreenshotsForConfig(
225227 globalViewport = first . viewportString ;
226228 globalBrowser = browserName ;
227229 if ( globalViewport . toLowerCase ( ) . includes ( "iphone" ) || globalViewport . toLowerCase ( ) . includes ( "ipad" ) ) {
228- globalBrowser = constants . SAFARI ;
230+ globalBrowser = constants . WEBKIT ;
229231 }
230232 }
231233
234+ if ( browserName == constants . SAFARI || ( globalViewport . toLowerCase ( ) . includes ( "iphone" ) || globalViewport . toLowerCase ( ) . includes ( "ipad" ) ) ) {
235+ globalBrowser = constants . WEBKIT ;
236+ }
237+
232238 await page ?. goto ( url . trim ( ) , pageOptions ) ;
233239 await executeDocumentScripts ( ctx , page , "afterNavigation" , afterNavigationScript )
234240
235241 for ( let { viewport, viewportString, fullPage } of renderViewports ) {
236242 globalViewport = viewportString ;
237243 globalBrowser = browserName
238244 ctx . log . debug ( `globalViewport : ${ globalViewport } ` ) ;
239- if ( globalViewport . toLowerCase ( ) . includes ( "iphone" ) || globalViewport . toLowerCase ( ) . includes ( "ipad" ) ) {
240- globalBrowser = constants . SAFARI ;
245+ if ( browserName == constants . SAFARI || ( globalViewport . toLowerCase ( ) . includes ( "iphone" ) || globalViewport . toLowerCase ( ) . includes ( "ipad" ) ) ) {
246+ globalBrowser = constants . WEBKIT ;
241247 }
242248 let ssPath = `screenshots/${ ssId } /${ `${ browserName } -${ viewport . width } x${ viewport . height } ` } -${ ssId } .png` ;
243249 await page ?. setViewportSize ( { width : viewport . width , height : viewport . height || constants . MIN_VIEWPORT_HEIGHT } ) ;
0 commit comments