This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,23 @@ import { Spotlight } from "./Spotlight";
2424export class ElementAppPage {
2525 public constructor ( public readonly page : Page ) { }
2626
27- public settings = new Settings ( this . page ) ;
28- public client : Client = new Client ( this . page ) ;
29- public timeline : Timeline = new Timeline ( this . page ) ;
27+ // We create these lazily on first access to avoid calling setup code which might cause conflicts,
28+ // e.g. the network routing code in the client subfixture.
29+ private _settings ?: Settings ;
30+ public get settings ( ) : Settings {
31+ if ( ! this . _settings ) this . _settings = new Settings ( this . page ) ;
32+ return this . _settings ;
33+ }
34+ private _client ?: Client ;
35+ public get client ( ) : Client {
36+ if ( ! this . _client ) this . _client = new Client ( this . page ) ;
37+ return this . _client ;
38+ }
39+ private _timeline ?: Timeline ;
40+ public get timeline ( ) : Timeline {
41+ if ( ! this . _timeline ) this . _timeline = new Timeline ( this . page ) ;
42+ return this . _timeline ;
43+ }
3044
3145 /**
3246 * Open the top left user menu, returning a Locator to the resulting context menu.
You can’t perform that action at this time.
0 commit comments