mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 17:22:48 -05:00
add custom width support for dialogs (#10641)
* add custom width support for dialogs * comments * fix test
This commit is contained in:
@@ -73,7 +73,7 @@ suite('MainThreadModelViewDialog Tests', () => {
|
||||
mockDialogService.setup(x => x.showDialog(It.isAny(), undefined, It.isAny())).callback((dialog) => {
|
||||
openedDialog = dialog;
|
||||
});
|
||||
mockDialogService.setup(x => x.showWizard(It.isAny())).callback(wizard => {
|
||||
mockDialogService.setup(x => x.showWizard(It.isAny(), It.isAny())).callback(wizard => {
|
||||
openedWizard = wizard;
|
||||
// The actual service will set the page to 0 when it opens the wizard
|
||||
openedWizard.setCurrentPage(0);
|
||||
@@ -111,7 +111,7 @@ suite('MainThreadModelViewDialog Tests', () => {
|
||||
};
|
||||
dialogDetails = {
|
||||
title: 'dialog1',
|
||||
isWide: false,
|
||||
width: 'narrow',
|
||||
content: [tab1Handle, tab2Handle],
|
||||
okButton: okButtonHandle,
|
||||
cancelButton: cancelButtonHandle,
|
||||
@@ -160,7 +160,8 @@ suite('MainThreadModelViewDialog Tests', () => {
|
||||
customButtons: [],
|
||||
pages: [page1Handle, page2Handle],
|
||||
message: undefined,
|
||||
displayPageTitles: false
|
||||
displayPageTitles: false,
|
||||
width: 'wide'
|
||||
};
|
||||
|
||||
// Register the buttons, tabs, and dialog
|
||||
@@ -242,7 +243,7 @@ suite('MainThreadModelViewDialog Tests', () => {
|
||||
mainThreadModelViewDialog.$openWizard(wizardHandle);
|
||||
|
||||
// Then the opened wizard's content and buttons match what was set
|
||||
mockDialogService.verify(x => x.showWizard(It.isAny()), Times.once());
|
||||
mockDialogService.verify(x => x.showWizard(It.isAny(), It.isAny()), Times.once());
|
||||
assert.notEqual(openedWizard, undefined);
|
||||
assert.equal(openedWizard.title, wizardDetails.title);
|
||||
assert.equal(openedWizard.doneButton.label, okButtonDetails.label);
|
||||
|
||||
Reference in New Issue
Block a user