@@ -61,7 +61,7 @@ suite('Markdown Setting Renderer Test', () => {
61
61
preferencesService = < IPreferencesService > { } ;
62
62
contextMenuService = < IContextMenuService > { } ;
63
63
Registry . as < IConfigurationRegistry > ( Extensions . Configuration ) . registerConfiguration ( configuration ) ;
64
- settingRenderer = new SimpleSettingRenderer ( configurationService , contextMenuService , preferencesService , { publicLog2 : ( ) => { } } as any ) ;
64
+ settingRenderer = new SimpleSettingRenderer ( configurationService , contextMenuService , preferencesService , { publicLog2 : ( ) => { } } as any , { writeText : async ( ) => { } } as any ) ;
65
65
} ) ;
66
66
67
67
suiteTeardown ( ( ) => {
@@ -82,7 +82,7 @@ suite('Markdown Setting Renderer Test', () => {
82
82
test ( 'actions with no value' , ( ) => {
83
83
const uri = URI . parse ( settingRenderer . settingToUriString ( 'example.booleanSetting' ) ) ;
84
84
const actions = settingRenderer . getActions ( uri ) ;
85
- assert . strictEqual ( actions ?. length , 1 ) ;
85
+ assert . strictEqual ( actions ?. length , 2 ) ;
86
86
assert . strictEqual ( actions [ 0 ] . label , 'View "Example: Boolean Setting" in Settings' ) ;
87
87
} ) ;
88
88
@@ -91,7 +91,7 @@ suite('Markdown Setting Renderer Test', () => {
91
91
const uri = URI . parse ( settingRenderer . settingToUriString ( 'example.stringSetting' , 'three' ) ) ;
92
92
93
93
const verifyOriginalState = ( actions : IAction [ ] | undefined ) : actions is IAction [ ] => {
94
- assert . strictEqual ( actions ?. length , 2 ) ;
94
+ assert . strictEqual ( actions ?. length , 3 ) ;
95
95
assert . strictEqual ( actions [ 0 ] . label , 'Set "Example: String Setting" to "three"' ) ;
96
96
assert . strictEqual ( actions [ 1 ] . label , 'View in Settings' ) ;
97
97
assert . strictEqual ( configurationService . getValue ( 'example.stringSetting' ) , 'two' ) ;
@@ -104,9 +104,10 @@ suite('Markdown Setting Renderer Test', () => {
104
104
await actions [ 0 ] . run ( ) ;
105
105
assert . strictEqual ( configurationService . getValue ( 'example.stringSetting' ) , 'three' ) ;
106
106
const actionsUpdated = settingRenderer . getActions ( uri ) ;
107
- assert . strictEqual ( actionsUpdated ?. length , 2 ) ;
107
+ assert . strictEqual ( actionsUpdated ?. length , 3 ) ;
108
108
assert . strictEqual ( actionsUpdated [ 0 ] . label , 'Restore value of "Example: String Setting"' ) ;
109
109
assert . strictEqual ( actions [ 1 ] . label , 'View in Settings' ) ;
110
+ assert . strictEqual ( actions [ 2 ] . label , 'Copy Setting ID' ) ;
110
111
assert . strictEqual ( configurationService . getValue ( 'example.stringSetting' ) , 'three' ) ;
111
112
112
113
// Restore the value
0 commit comments