@@ -104,30 +104,13 @@ describe("Control UI build admission over WebSocket", () => {
104104 {
105105 name : "legacy same-origin document" ,
106106 clientBuildId : undefined ,
107- clientCaps : [ ] ,
108- errorMessage : "protocol mismatch: Control UI updated; reload this page to continue" ,
109- errorDetails : { code : ConnectErrorDetailCodes . PROTOCOL_MISMATCH } ,
110107 } ,
111108 {
112- name : "pre-capability stale same-origin document" ,
113- clientBuildId : "pre-capability-build" ,
114- clientCaps : [ ] ,
115- errorMessage : "protocol mismatch: Control UI updated; reload this page to continue" ,
116- errorDetails : { code : ConnectErrorDetailCodes . PROTOCOL_MISMATCH } ,
117- } ,
118- {
119- name : "capable stale same-origin document" ,
109+ name : "explicit stale same-origin document" ,
120110 clientBuildId : "stale-build" ,
121- clientCaps : [ "control-ui-build-mismatch" ] ,
122- errorMessage : "Control UI updated; reload this page to continue" ,
123- errorDetails : {
124- code : ConnectErrorDetailCodes . CONTROL_UI_BUILD_MISMATCH ,
125- gatewayBuildId : "gateway-build" ,
126- reloadRequired : true ,
127- } ,
128111 } ,
129112 ] ) ( "rejects a $name before registration or RPC dispatch" , async ( testCase ) => {
130- const { clientBuildId, clientCaps , errorMessage , errorDetails } = testCase ;
113+ const { clientBuildId } = testCase ;
131114 const wss = new WebSocketServer ( { host : "127.0.0.1" , port : 0 } ) ;
132115 await withDeadline (
133116 new Promise < void > ( ( resolve ) => {
@@ -230,7 +213,7 @@ describe("Control UI build admission over WebSocket", () => {
230213 ...( clientBuildId ? { buildId : clientBuildId } : { } ) ,
231214 } ,
232215 role : "operator" ,
233- caps : clientCaps ,
216+ caps : [ ] ,
234217 auth : { token : "test-token" } ,
235218 } ,
236219 } ) ,
@@ -241,9 +224,9 @@ describe("Control UI build admission over WebSocket", () => {
241224 ok : false ,
242225 error : {
243226 code : ErrorCodes . UNAVAILABLE ,
244- message : errorMessage ,
227+ message : "protocol mismatch: Control UI updated; reload this page to continue" ,
245228 retryable : false ,
246- details : errorDetails ,
229+ details : { code : ConnectErrorDetailCodes . PROTOCOL_MISMATCH } ,
247230 } ,
248231 } ) ;
249232 ws . send (
0 commit comments