File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ export {
6868 TMP_DIRECTORY_PATH ,
6969} from './paths' ;
7070/** @internal */
71- export { TARGET_CLOSED_ERROR_MESSAGE , TEST_ENDED_ERROR_MESSAGE } from './playwright' ;
71+ export {
72+ OBJECT_NOT_BOUND_ERROR_REGEXP ,
73+ TARGET_CLOSED_ERROR_MESSAGE ,
74+ TEST_ENDED_ERROR_MESSAGE ,
75+ } from './playwright' ;
7276/** @internal */
7377export { RESOLVED_PROMISE } from './promise' ;
7478/** @internal */
Original file line number Diff line number Diff line change 1+ /**
2+ * Playwright error message for some connection error.
3+ * The test fails after such an error, so it cannot be completely ignored (we write it in the warning).
4+ * @internal
5+ */
6+ export const OBJECT_NOT_BOUND_ERROR_REGEXP =
7+ / O b j e c t w i t h g u i d r e s p o n s e @ [ a - z A - Z 0 - 9 ] + w a s n o t b o u n d i n t h e c o n n e c t i o n / ;
8+
19/**
210 * Playwright error message for already closed target (`TargetClosedError`).
311 * @internal
Original file line number Diff line number Diff line change 1- import { TARGET_CLOSED_ERROR_MESSAGE , TEST_ENDED_ERROR_MESSAGE } from '../constants/internal' ;
1+ import {
2+ OBJECT_NOT_BOUND_ERROR_REGEXP ,
3+ TARGET_CLOSED_ERROR_MESSAGE ,
4+ TEST_ENDED_ERROR_MESSAGE ,
5+ } from '../constants/internal' ;
26
37import { E2edError } from './error' ;
48import { writeGlobalError , writeGlobalWarning } from './fs' ;
@@ -24,7 +28,7 @@ export const getGlobalErrorHandler =
2428 return ;
2529 }
2630
27- if ( type === 'TestUnhandledRejection' ) {
31+ if ( type === 'TestUnhandledRejection' || OBJECT_NOT_BOUND_ERROR_REGEXP . test ( errorString ) ) {
2832 void writeGlobalWarning ( errorString ) . catch ( ( ) => { } ) ;
2933 } else {
3034 void writeGlobalError ( errorString ) . catch ( ( ) => { } ) ;
You can’t perform that action at this time.
0 commit comments