@@ -22,8 +22,8 @@ vi.mock("vscode", () => ({
2222// Mock i18n
2323vi . mock ( "../../../i18n" , ( ) => ( {
2424 t : vi . fn ( ( key : string , params ?: any ) => {
25- if ( key === "common:info.command_whitelisted " && params ?. pattern ) {
26- return `Command pattern "${ params . pattern } " has been whitelisted `
25+ if ( key === "common:info.command_allowed " && params ?. pattern ) {
26+ return `Command pattern "${ params . pattern } " has been allowed `
2727 }
2828 return key
2929 } ) ,
@@ -36,7 +36,7 @@ vi.mock("../../../shared/package", () => ({
3636 } ,
3737} ) )
3838
39- describe ( "webviewMessageHandler - whitelistCommand " , ( ) => {
39+ describe ( "webviewMessageHandler - allowCommand " , ( ) => {
4040 let mockProvider : any
4141 let mockContextProxy : any
4242 let mockConfigUpdate : any
@@ -74,7 +74,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
7474
7575 // Create message
7676 const message = {
77- type : "whitelistCommand " ,
77+ type : "allowCommand " ,
7878 pattern : "npm run build" ,
7979 }
8080
@@ -90,7 +90,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
9090
9191 // Verify user was notified
9292 expect ( vscode . window . showInformationMessage ) . toHaveBeenCalledWith (
93- 'Command pattern "npm run build" has been whitelisted ' ,
93+ 'Command pattern "npm run build" has been allowed ' ,
9494 )
9595
9696 // Verify state was posted to webview
@@ -103,7 +103,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
103103
104104 // Create message with duplicate pattern
105105 const message = {
106- type : "whitelistCommand " ,
106+ type : "allowCommand " ,
107107 pattern : "npm run build" ,
108108 }
109109
@@ -126,7 +126,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
126126
127127 // Create message
128128 const message = {
129- type : "whitelistCommand " ,
129+ type : "allowCommand " ,
130130 pattern : "echo 'Hello, World!'" ,
131131 }
132132
@@ -138,7 +138,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
138138
139139 // Verify user was notified
140140 expect ( vscode . window . showInformationMessage ) . toHaveBeenCalledWith (
141- `Command pattern "echo 'Hello, World!'" has been whitelisted ` ,
141+ `Command pattern "echo 'Hello, World!'" has been allowed ` ,
142142 )
143143 } )
144144
@@ -148,7 +148,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
148148
149149 // Create message
150150 const message = {
151- type : "whitelistCommand " ,
151+ type : "allowCommand " ,
152152 pattern : "npm run dev" ,
153153 }
154154
@@ -166,7 +166,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
166166 it ( "should handle missing pattern gracefully" , async ( ) => {
167167 // Create message without pattern
168168 const message = {
169- type : "whitelistCommand " ,
169+ type : "allowCommand " ,
170170 }
171171
172172 // Call handler
@@ -181,7 +181,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
181181 it ( "should handle non-string pattern gracefully" , async ( ) => {
182182 // Create message with non-string pattern
183183 const message = {
184- type : "whitelistCommand " ,
184+ type : "allowCommand " ,
185185 pattern : 123 , // Invalid type
186186 }
187187
@@ -200,7 +200,7 @@ describe("webviewMessageHandler - whitelistCommand", () => {
200200
201201 // Create message with complex pattern
202202 const message = {
203- type : "whitelistCommand " ,
203+ type : "allowCommand " ,
204204 pattern : 'echo "Hello, World!" && echo $HOME' ,
205205 }
206206
0 commit comments