File tree Expand file tree Collapse file tree
examples/chat/angular/e2e Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,13 +21,19 @@ export function attachBrowserHygiene(page: Page): {
2121 page . on ( 'requestfailed' , ( request ) => {
2222 const failure = request . failure ( ) ?. errorText ?? '' ;
2323 const url = request . url ( ) ;
24- if ( / r u n s \/ s t r e a m / . test ( url ) && / a b o r t | E R R _ A B O R T E D / i . test ( failure ) ) return ;
24+ if ( isBenignAbortedRequest ( url , failure ) ) return ;
2525 failedRequests . push ( `${ request . method ( ) } ${ url } ${ failure } ` . trim ( ) ) ;
2626 } ) ;
2727
2828 return { consoleErrors, failedRequests } ;
2929}
3030
31+ function isBenignAbortedRequest ( url : string , failure : string ) : boolean {
32+ if ( ! / a b o r t | E R R _ A B O R T E D / i. test ( failure ) ) return false ;
33+ if ( / r u n s \/ s t r e a m / . test ( url ) ) return true ;
34+ return / f o n t s \. g s t a t i c \. c o m \/ s \/ m a t e r i a l s y m b o l s o u t l i n e d \/ .+ \. w o f f 2 / . test ( url ) ;
35+ }
36+
3137export async function openDemo ( page : Page , path = '/embed' ) : Promise < void > {
3238 await page . goto ( path ) ;
3339 await page . evaluate ( ( ) => {
You can’t perform that action at this time.
0 commit comments