You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying strategy of Output channel is changed to let extension host process use Spdlog and write the Output channel content instead of sending the data to the renderer. This introduces some delay from the time extension appends data to the time the data appears in the output channel UI. Extension author can bypass this delay by using the force-flag while creating the channel.
Purpose of this test plan item is to make sure existing Output channel functionalities are retained without regressions. Following set up will help you in testing it:
Set Up
Create a sample extension that can do following
Create an Output Channel
Append content to output channel
Clear content in output channel
Show/Hide the output channel
You can use and build on top of following sample
import*asvscodefrom'vscode';exportfunctionactivate(context: vscode.ExtensionContext){letchannel,timer,counter=1;constgetChannel=(): vscode.OutputChannel=>{if(!channel){channel=vscode.window.createOutputChannel('Test Channel');}returnchannel;};vscode.commands.registerCommand('testExtension.clearChannel',()=>getChannel().clear());vscode.commands.registerCommand('testExtension.showChannel',()=>getChannel().show());vscode.commands.registerCommand('testExtension.hideChannel',()=>getChannel().hide());vscode.commands.registerCommand('testExtension.startAppending',()=>{if(!timer){timer=setInterval(()=>getChannel().appendLine(`${counter++} // Cancellation that controls whether or not we can cancel in the middle of type checking. In general cancelling is *not* safe for the type checker. We might be in the middle of computing something, and we will leave our internals in an inconsistent state. Callers who set the cancellation token should catch if a cancellation exception occurs, and should throw away and create a new TypeChecker.`),1000);}});vscode.commands.registerCommand('testExtension.stopAppending',()=>{if(timer){clearInterval(timer);timer=null;}});}
Test
Append content:
-- Make sure that channel content is shown after appending. There will be a delay by default. If you created the channel by passing force flag to true then the content is shown immediately.
Clear content: Currently shown content is cleared in the channel.
-- Verify this by using the available clear action in the Output panel and also by API.
Show Channel: Should show the selected channel (Verify from Dropdown and API)
Hide Channel: Should hide the Output panel (API).
No content loss:
-- Make sure that channel content is not lost when you switch between channels or toggle the panel or while performing any other action.
-- Make sure that channel content is not lost while the content is being appended but the channel is hidden.
-- Random: Run commands from the above sample and also available Output actions in the UI randomly and test the results are as expected.
The text was updated successfully, but these errors were encountered:
Ref #57618
Complexity: 4
The underlying strategy of Output channel is changed to let extension host process use Spdlog and write the Output channel content instead of sending the data to the renderer. This introduces some delay from the time extension appends data to the time the data appears in the output channel UI. Extension author can bypass this delay by using the force-flag while creating the channel.
Purpose of this test plan item is to make sure existing Output channel functionalities are retained without regressions. Following set up will help you in testing it:
Set Up
Create a sample extension that can do following
You can use and build on top of following sample
Test
Append content:
-- Make sure that channel content is shown after appending. There will be a delay by default. If you created the channel by passing
force
flag to true then the content is shown immediately.Clear content: Currently shown content is cleared in the channel.
-- Verify this by using the available
clear
action in the Output panel and also by API.Show Channel: Should show the selected channel (Verify from Dropdown and API)
Hide Channel: Should hide the Output panel (API).
No content loss:
-- Make sure that channel content is not lost when you switch between channels or toggle the panel or while performing any other action.
-- Make sure that channel content is not lost while the content is being appended but the channel is hidden.
-- Random: Run commands from the above sample and also available Output actions in the UI randomly and test the results are as expected.
The text was updated successfully, but these errors were encountered: