@@ -63,79 +63,75 @@ const CONFIG_JSON: Partial<IConfigOptions> = {
63
63
} ,
64
64
} ;
65
65
66
- export type TestOptions = { } ;
67
-
68
66
interface CredentialsWithDisplayName extends Credentials {
69
67
displayName : string ;
70
68
}
71
69
72
- export const test = base . extend <
73
- TestOptions & {
74
- axe : AxeBuilder ;
75
- checkA11y : ( ) => Promise < void > ;
76
-
77
- /**
78
- * The contents of the config.json to send when the client requests it.
79
- */
80
- config : typeof CONFIG_JSON ;
81
-
82
- /**
83
- * The options with which to run the {@link #homeserver} fixture.
84
- */
85
- startHomeserverOpts : StartHomeserverOpts | string ;
86
-
87
- homeserver : HomeserverInstance ;
88
- oAuthServer : { port : number } ;
89
-
90
- /**
91
- * The displayname to use for the user registered in {@link #credentials}.
92
- *
93
- * To set it, call `test.use({ displayName: "myDisplayName" })` in the test file or `describe` block.
94
- * See {@link https://playwright.dev/docs/api/class-test#test-use}.
95
- */
96
- displayName ?: string ;
97
-
98
- /**
99
- * A test fixture which registers a test user on the {@link #homeserver} and supplies the details
100
- * of the registered user.
101
- */
102
- credentials : CredentialsWithDisplayName ;
103
-
104
- /**
105
- * The same as {@link https://playwright.dev/docs/api/class-fixtures#fixtures-page|`page`},
106
- * but adds an initScript which will populate localStorage with the user's details from
107
- * {@link #credentials} and {@link #homeserver}.
108
- *
109
- * Similar to {@link #user}, but doesn't load the app.
110
- */
111
- pageWithCredentials : Page ;
112
-
113
- /**
114
- * A (rather poorly-named) test fixture which registers a user per {@link #credentials}, stores
115
- * the credentials into localStorage per {@link #homeserver}, and then loads the front page of the
116
- * app.
117
- */
118
- user : CredentialsWithDisplayName ;
119
-
120
- /**
121
- * The same as {@link https://playwright.dev/docs/api/class-fixtures#fixtures-page|`page`},
122
- * but wraps the returned `Page` in a class of utilities for interacting with the Element-Web UI,
123
- * {@link ElementAppPage}.
124
- */
125
- app : ElementAppPage ;
126
-
127
- mailhog : { api : mailhog . API ; instance : Instance } ;
128
- crypto : Crypto ;
129
- room ?: { roomId : string } ;
130
- toasts : Toasts ;
131
- uut ?: Locator ; // Unit Under Test, useful place to refer a prepared locator
132
- botCreateOpts : CreateBotOpts ;
133
- bot : Bot ;
134
- slidingSyncProxy : ProxyInstance ;
135
- labsFlags : string [ ] ;
136
- webserver : Webserver ;
137
- }
138
- > ( {
70
+ export const test = base . extend < {
71
+ axe : AxeBuilder ;
72
+ checkA11y : ( ) => Promise < void > ;
73
+
74
+ /**
75
+ * The contents of the config.json to send when the client requests it.
76
+ */
77
+ config : typeof CONFIG_JSON ;
78
+
79
+ /**
80
+ * The options with which to run the {@link #homeserver} fixture.
81
+ */
82
+ startHomeserverOpts : StartHomeserverOpts | string ;
83
+
84
+ homeserver : HomeserverInstance ;
85
+ oAuthServer : { port : number } ;
86
+
87
+ /**
88
+ * The displayname to use for the user registered in {@link #credentials}.
89
+ *
90
+ * To set it, call `test.use({ displayName: "myDisplayName" })` in the test file or `describe` block.
91
+ * See {@link https://playwright.dev/docs/api/class-test#test-use}.
92
+ */
93
+ displayName ?: string ;
94
+
95
+ /**
96
+ * A test fixture which registers a test user on the {@link #homeserver} and supplies the details
97
+ * of the registered user.
98
+ */
99
+ credentials : CredentialsWithDisplayName ;
100
+
101
+ /**
102
+ * The same as {@link https://playwright.dev/docs/api/class-fixtures#fixtures-page|`page`},
103
+ * but adds an initScript which will populate localStorage with the user's details from
104
+ * {@link #credentials} and {@link #homeserver}.
105
+ *
106
+ * Similar to {@link #user}, but doesn't load the app.
107
+ */
108
+ pageWithCredentials : Page ;
109
+
110
+ /**
111
+ * A (rather poorly-named) test fixture which registers a user per {@link #credentials}, stores
112
+ * the credentials into localStorage per {@link #homeserver}, and then loads the front page of the
113
+ * app.
114
+ */
115
+ user : CredentialsWithDisplayName ;
116
+
117
+ /**
118
+ * The same as {@link https://playwright.dev/docs/api/class-fixtures#fixtures-page|`page`},
119
+ * but wraps the returned `Page` in a class of utilities for interacting with the Element-Web UI,
120
+ * {@link ElementAppPage}.
121
+ */
122
+ app : ElementAppPage ;
123
+
124
+ mailhog : { api : mailhog . API ; instance : Instance } ;
125
+ crypto : Crypto ;
126
+ room ?: { roomId : string } ;
127
+ toasts : Toasts ;
128
+ uut ?: Locator ; // Unit Under Test, useful place to refer a prepared locator
129
+ botCreateOpts : CreateBotOpts ;
130
+ bot : Bot ;
131
+ slidingSyncProxy : ProxyInstance ;
132
+ labsFlags : string [ ] ;
133
+ webserver : Webserver ;
134
+ } > ( {
139
135
config : CONFIG_JSON ,
140
136
page : async ( { context, page, config, labsFlags } , use ) => {
141
137
await context . route ( `http://localhost:8080/config.json*` , async ( route ) => {
0 commit comments