mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Correctly announce loading state for arc cluster context loading (#15747)
* Correctly announce loading state for arc cluster context loading * localize * Fix compile * Fix test
This commit is contained in:
@@ -18,7 +18,7 @@ const newFileUri = vscode.Uri.file(path.join('path', 'to', 'new', '.kube', 'conf
|
||||
describe('filePicker', function (): void {
|
||||
beforeEach(async () => {
|
||||
const { modelBuilderMock } = createModelViewMock();
|
||||
filePicker = new FilePicker(modelBuilderMock.object, initialPath, (_disposable) => { }, '');
|
||||
filePicker = new FilePicker(modelBuilderMock.object, initialPath, (_disposable) => { }, '', '');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import * as should from 'should';
|
||||
import { getErrorMessage } from '../../../common/utils';
|
||||
import { RadioOptionsGroup, RadioOptionsInfo } from '../../../ui/components/radioOptionsGroup';
|
||||
import { createModelViewMock } from '@microsoft/azdata-test/out/mocks/modelView/modelViewMock';
|
||||
import { StubRadioButton } from '@microsoft/azdata-test/out/stubs/modelView/stubRadioButton';
|
||||
import * as loc from '../../../localizedConstants';
|
||||
|
||||
|
||||
const loadingError = new Error('Error loading options');
|
||||
@@ -25,7 +25,7 @@ let radioOptionsGroup: RadioOptionsGroup;
|
||||
describe('radioOptionsGroup', function (): void {
|
||||
beforeEach(async () => {
|
||||
const { modelBuilderMock } = createModelViewMock();
|
||||
radioOptionsGroup = new RadioOptionsGroup(modelBuilderMock.object, (_disposable) => { });
|
||||
radioOptionsGroup = new RadioOptionsGroup(modelBuilderMock.object, (_disposable) => { }, undefined, '', () => '');
|
||||
await radioOptionsGroup.load(async () => radioOptionsInfo);
|
||||
});
|
||||
|
||||
@@ -51,7 +51,7 @@ describe('radioOptionsGroup', function (): void {
|
||||
radioOptionsGroup.items.length.should.equal(1, 'There is should be only one element in the divContainer when loading error happens');
|
||||
const label = radioOptionsGroup.items[0] as azdata.TextComponent;
|
||||
should(label.value).not.be.undefined();
|
||||
label.value!.should.deepEqual(getErrorMessage(loadingError));
|
||||
label.value!.should.deepEqual(loc.loadingClusterContextsError(loadingError));
|
||||
should(label.CSSStyles).not.be.undefined();
|
||||
should(label.CSSStyles!.color).not.be.undefined();
|
||||
label.CSSStyles!.color.should.equal('Red');
|
||||
|
||||
Reference in New Issue
Block a user