@@ -24,6 +24,11 @@ import type {
2424 * Abstract page with base methods.
2525 */
2626export abstract class Page < PageParams = undefined > {
27+ /**
28+ * Default timeout for navigation to url (`navigateToPage`, `navigateToUrl` actions) in milliseconds.
29+ */
30+ static readonly navigationTimeout : number = 8_000 ;
31+
2732 /**
2833 * Type of page parameters.
2934 */
@@ -40,12 +45,6 @@ export abstract class Page<PageParams = undefined> {
4045 */
4146 readonly maxIntervalBetweenRequestsInMs : number ;
4247
43- /**
44- * Default timeout for navigation to url (`navigateToPage`, `navigateToUrl` actions) in milliseconds.
45- * The default value is taken from the corresponding field of the pack config.
46- */
47- readonly navigationTimeout : number ;
48-
4948 /**
5049 * Immutable page parameters.
5150 */
@@ -67,12 +66,10 @@ export abstract class Page<PageParams = undefined> {
6766 this . pageParams = pageParams as PageParams ;
6867
6968 const {
70- navigationTimeout,
7169 waitForAllRequestsComplete : { maxIntervalBetweenRequestsInMs} ,
7270 } = getFullPackConfig ( ) ;
7371
7472 this . maxIntervalBetweenRequestsInMs = maxIntervalBetweenRequestsInMs ;
75- this . navigationTimeout = navigationTimeout ;
7673 }
7774
7875 /**
@@ -132,7 +129,7 @@ export abstract class Page<PageParams = undefined> {
132129 ) : Promise < NavigationReturn > {
133130 const navigationReturn = await navigateToUrl ( url , {
134131 skipLogs : true ,
135- timeout : this . navigationTimeout ,
132+ timeout : ( this . constructor as typeof Page ) . navigationTimeout ,
136133 ...options ,
137134 } ) ;
138135 const { statusCode} = navigationReturn ;
0 commit comments