mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Add aria-label to kube config input box (#15743)
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 {
|
describe('filePicker', function (): void {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const { modelBuilderMock } = createModelViewMock();
|
const { modelBuilderMock } = createModelViewMock();
|
||||||
filePicker = new FilePicker(modelBuilderMock.object, initialPath, (_disposable) => { });
|
filePicker = new FilePicker(modelBuilderMock.object, initialPath, (_disposable) => { }, '');
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@@ -18,12 +18,15 @@ export class FilePicker {
|
|||||||
public readonly filePickerButton: azdata.ButtonComponent;
|
public readonly filePickerButton: azdata.ButtonComponent;
|
||||||
constructor(
|
constructor(
|
||||||
modelBuilder: azdata.ModelBuilder,
|
modelBuilder: azdata.ModelBuilder,
|
||||||
initialPath: string, onNewDisposableCreated: (disposable: vscode.Disposable) => void
|
initialPath: string,
|
||||||
|
onNewDisposableCreated: (disposable: vscode.Disposable) => void,
|
||||||
|
ariaLabel: string
|
||||||
) {
|
) {
|
||||||
const buttonWidth = 80;
|
const buttonWidth = 80;
|
||||||
this.filePathInputBox = modelBuilder.inputBox()
|
this.filePathInputBox = modelBuilder.inputBox()
|
||||||
.withProperties<azdata.InputBoxProperties>({
|
.withProperties<azdata.InputBoxProperties>({
|
||||||
value: initialPath,
|
value: initialPath,
|
||||||
|
ariaLabel: ariaLabel,
|
||||||
width: 350
|
width: 350
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,8 @@ abstract class ControllerDialogBase extends InitializingComponent {
|
|||||||
this.kubeConfigInputBox = new FilePicker(
|
this.kubeConfigInputBox = new FilePicker(
|
||||||
this.modelBuilder,
|
this.modelBuilder,
|
||||||
controllerInfo?.kubeConfigFilePath || getDefaultKubeConfigPath(),
|
controllerInfo?.kubeConfigFilePath || getDefaultKubeConfigPath(),
|
||||||
(disposable) => this._toDispose.push(disposable)
|
(disposable) => this._toDispose.push(disposable),
|
||||||
|
loc.controllerKubeConfig
|
||||||
);
|
);
|
||||||
this.modelBuilder.inputBox()
|
this.modelBuilder.inputBox()
|
||||||
.withProps({
|
.withProps({
|
||||||
|
|||||||
Reference in New Issue
Block a user