Loading src/common/code_suggestions/code_suggestions_gutter_icon.test.ts +4 −4 Original line number Diff line number Diff line Loading @@ -71,8 +71,8 @@ describe('CodeSuggestionsGutterIcon', () => { it.each` state | iconPath ${VisibleCodeSuggestionsState.LOADING} | ${'/test/abs/assets/icons/gitlab-code-suggestions-loading.svg'} ${VisibleCodeSuggestionsState.ERROR} | ${'/test/abs/assets/icons/gitlab-code-suggestions-error.svg'} ${VisibleCodeSuggestionsState.LOADING} | ${'https://localhost/assets/icons/gitlab-code-suggestions-loading.svg'} ${VisibleCodeSuggestionsState.ERROR} | ${'https://localhost/assets/icons/gitlab-code-suggestions-error.svg'} `( 'when manager state changes to $state, updates decorations to $iconPath', ({ state, iconPath }) => { Loading Loading @@ -105,7 +105,7 @@ describe('CodeSuggestionsGutterIcon', () => { mockStateChangeEmitter.fire(VisibleCodeSuggestionsState.READY); const loadingDecoration = textEditorDecorationTypeMap.get( '/test/abs/assets/icons/gitlab-code-suggestions-loading.svg', 'https://localhost/assets/icons/gitlab-code-suggestions-loading.svg', ); expect(setDecorationsSpy).toHaveBeenCalledTimes(1); Loading @@ -122,7 +122,7 @@ describe('CodeSuggestionsGutterIcon', () => { ); const loadingDecoration = textEditorDecorationTypeMap.get( '/test/abs/assets/icons/gitlab-code-suggestions-loading.svg', 'https://localhost/assets/icons/gitlab-code-suggestions-loading.svg', ); expect(setDecorationsSpy).toHaveBeenCalledTimes(2); Loading src/common/code_suggestions/code_suggestions_gutter_icon.ts +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ const createGutterIconDecorations = (context: vscode.ExtensionContext): GutterIc status => status && vscode.window.createTextEditorDecorationType({ gutterIconPath: context.asAbsolutePath(status.path), gutterIconPath: vscode.Uri.joinPath(context.extensionUri, status.path), }), ); Loading src/common/test_utils/entities.ts +1 −0 Original line number Diff line number Diff line Loading @@ -52,5 +52,6 @@ export const createExtensionContext = (): vscode.ExtensionContext => secrets: new SecretStorage(), extensionPath: '', subscriptions: [], extensionUri: vscode.Uri.parse('https://localhost'), asAbsolutePath: relativePath => `/test/abs/${relativePath}`, }); Loading
src/common/code_suggestions/code_suggestions_gutter_icon.test.ts +4 −4 Original line number Diff line number Diff line Loading @@ -71,8 +71,8 @@ describe('CodeSuggestionsGutterIcon', () => { it.each` state | iconPath ${VisibleCodeSuggestionsState.LOADING} | ${'/test/abs/assets/icons/gitlab-code-suggestions-loading.svg'} ${VisibleCodeSuggestionsState.ERROR} | ${'/test/abs/assets/icons/gitlab-code-suggestions-error.svg'} ${VisibleCodeSuggestionsState.LOADING} | ${'https://localhost/assets/icons/gitlab-code-suggestions-loading.svg'} ${VisibleCodeSuggestionsState.ERROR} | ${'https://localhost/assets/icons/gitlab-code-suggestions-error.svg'} `( 'when manager state changes to $state, updates decorations to $iconPath', ({ state, iconPath }) => { Loading Loading @@ -105,7 +105,7 @@ describe('CodeSuggestionsGutterIcon', () => { mockStateChangeEmitter.fire(VisibleCodeSuggestionsState.READY); const loadingDecoration = textEditorDecorationTypeMap.get( '/test/abs/assets/icons/gitlab-code-suggestions-loading.svg', 'https://localhost/assets/icons/gitlab-code-suggestions-loading.svg', ); expect(setDecorationsSpy).toHaveBeenCalledTimes(1); Loading @@ -122,7 +122,7 @@ describe('CodeSuggestionsGutterIcon', () => { ); const loadingDecoration = textEditorDecorationTypeMap.get( '/test/abs/assets/icons/gitlab-code-suggestions-loading.svg', 'https://localhost/assets/icons/gitlab-code-suggestions-loading.svg', ); expect(setDecorationsSpy).toHaveBeenCalledTimes(2); Loading
src/common/code_suggestions/code_suggestions_gutter_icon.ts +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ const createGutterIconDecorations = (context: vscode.ExtensionContext): GutterIc status => status && vscode.window.createTextEditorDecorationType({ gutterIconPath: context.asAbsolutePath(status.path), gutterIconPath: vscode.Uri.joinPath(context.extensionUri, status.path), }), ); Loading
src/common/test_utils/entities.ts +1 −0 Original line number Diff line number Diff line Loading @@ -52,5 +52,6 @@ export const createExtensionContext = (): vscode.ExtensionContext => secrets: new SecretStorage(), extensionPath: '', subscriptions: [], extensionUri: vscode.Uri.parse('https://localhost'), asAbsolutePath: relativePath => `/test/abs/${relativePath}`, });