mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 01:25:37 -05:00
Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8 (#14883)
* Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8 * Bump distro * Upgrade GCC to 4.9 due to yarn install errors * Update build image * Fix bootstrap base url * Bump distro * Fix build errors * Update source map file * Disable checkbox for blocking migration issues (#15131) * disable checkbox for blocking issues * wip * disable checkbox fixes * fix strings * Remove duplicate tsec command * Default to off for tab color if settings not present * re-skip failing tests * Fix mocha error * Bump sqlite version & fix notebooks search view * Turn off esbuild warnings * Update esbuild log level * Fix overflowactionbar tests * Fix ts-ignore in dropdown tests * cleanup/fixes * Fix hygiene * Bundle in entire zone.js module * Remove extra constructor param * bump distro for web compile break * bump distro for web compile break v2 * Undo log level change * New distro * Fix integration test scripts * remove the "no yarn.lock changes" workflow * fix scripts v2 * Update unit test scripts * Ensure ads-kerberos2 updates in .vscodeignore * Try fix unit tests * Upload crash reports * remove nogpu * always upload crashes * Use bash script * Consolidate data/ext dir names * Create in tmp directory Co-authored-by: chlafreniere <hichise@gmail.com> Co-authored-by: Christopher Suh <chsuh@microsoft.com> Co-authored-by: chgagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -159,7 +159,7 @@ export class HeaderFilter<T extends Slick.SlickData> {
|
||||
private createButtonMenuItem(title: string, command: HeaderFilterCommands, iconClass: string): Button {
|
||||
const buttonContainer = append(this.menu, $(''));
|
||||
const button = new Button(buttonContainer);
|
||||
button.icon = { classNames: `slick-header-menuicon ${iconClass}` };
|
||||
button.icon = { id: `slick-header-menuicon ${iconClass}` };
|
||||
button.label = title;
|
||||
button.onDidClick(async () => {
|
||||
await this.handleMenuItemClick(command, this.columnDef);
|
||||
|
||||
@@ -17,62 +17,59 @@ suite('Overflow Actionbar tests', () => {
|
||||
});
|
||||
|
||||
test('Verify moving actions from toolbar to overflow', () => {
|
||||
assert(overflowActionbar.actionsList.children.length === 0);
|
||||
assert(overflowActionbar.items.length === 0);
|
||||
assert(overflowActionbar.overflow.childElementCount === 0);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 0);
|
||||
assert.strictEqual(overflowActionbar.items.length, 0);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 0);
|
||||
|
||||
let a1 = new Action('a1');
|
||||
let a2 = new Action('a1');
|
||||
let a3 = new Action('a3');
|
||||
overflowActionbar.pushAction([a1, a2, a3]);
|
||||
|
||||
assert(overflowActionbar.actionsList.children.length === 3);
|
||||
assert(overflowActionbar.items.length === 3);
|
||||
assert(overflowActionbar.overflow.childElementCount === 0);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 0);
|
||||
|
||||
// more item element '...' is added when actions are moved to the overflow
|
||||
// and a placeholder undefined element is added to the items array for calculating focus
|
||||
overflowActionbar.createMoreItemElement();
|
||||
assert(overflowActionbar.actionsList.children.length === 4);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(overflowActionbar.overflow.childElementCount === 0);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 4);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 0);
|
||||
|
||||
// move a3 to overflow
|
||||
overflowActionbar.collapseItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 3);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 2);
|
||||
assert(overflowActionbar.overflow.childElementCount === 1);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 3);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 2);
|
||||
verifyOverflowFocusedIndex(overflowActionbar, 3);
|
||||
|
||||
// move a2 to overflow
|
||||
overflowActionbar.collapseItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 2);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 1);
|
||||
assert(overflowActionbar.overflow.childElementCount === 2);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 2);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 1);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 2);
|
||||
verifyOverflowFocusedIndex(overflowActionbar, 2);
|
||||
|
||||
// move a2 to back to toolbar
|
||||
overflowActionbar.restoreItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 3);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 2);
|
||||
assert(overflowActionbar.overflow.childElementCount === 1);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 3);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 2);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 1);
|
||||
verifyOverflowFocusedIndex(overflowActionbar, 3);
|
||||
|
||||
// move a3 to back to toolbar
|
||||
overflowActionbar.restoreItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 4);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 3);
|
||||
assert(overflowActionbar.overflow.childElementCount === 0);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 4);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 3);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 0);
|
||||
});
|
||||
|
||||
test('Verify moving actions and separators from toolbar to overflow', () => {
|
||||
assert(overflowActionbar.actionsList.children.length === 0);
|
||||
assert(overflowActionbar.items.length === 0);
|
||||
assert(overflowActionbar.overflow.childElementCount === 0);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 0);
|
||||
assert.strictEqual(overflowActionbar.items.length, 0);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 0);
|
||||
|
||||
let a1 = new Action('a1');
|
||||
let a2 = new Action('a1');
|
||||
@@ -82,70 +79,70 @@ suite('Overflow Actionbar tests', () => {
|
||||
overflowActionbar.pushElement(separator);
|
||||
overflowActionbar.pushAction([a3]);
|
||||
|
||||
assert(overflowActionbar.actionsList.children.length === 4);
|
||||
assert(overflowActionbar.items.length === 3); // items only has focusable elements
|
||||
assert(overflowActionbar.overflow.childElementCount === 0);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 4);
|
||||
assert.strictEqual(overflowActionbar.items.length, 3); // items only has focusable elements
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 0);
|
||||
|
||||
// more item element '...' is added when actions are moved to the overflow
|
||||
// and a placeholder undefined element is added to the items array for calculating focus
|
||||
overflowActionbar.createMoreItemElement();
|
||||
assert(overflowActionbar.actionsList.children.length === 5);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(overflowActionbar.overflow.childElementCount === 0);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 5);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 0);
|
||||
|
||||
// move a3 to overflow
|
||||
overflowActionbar.collapseItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 4);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 2);
|
||||
assert(overflowActionbar.overflow.childElementCount === 1);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 4);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 2);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 1);
|
||||
verifyOverflowFocusedIndex(overflowActionbar, 3);
|
||||
|
||||
// move separator to overflow
|
||||
overflowActionbar.collapseItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 3);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 2);
|
||||
assert(overflowActionbar.overflow.childElementCount === 2);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 3);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 2);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 2);
|
||||
verifyOverflowFocusedIndex(overflowActionbar, 3);
|
||||
|
||||
// move a2 to overflow
|
||||
overflowActionbar.collapseItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 2);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 1);
|
||||
assert(overflowActionbar.overflow.childElementCount === 3);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 2);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 1);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 3);
|
||||
verifyOverflowFocusedIndex(overflowActionbar, 2);
|
||||
|
||||
// move a2 to back to toolbar
|
||||
overflowActionbar.restoreItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 3);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 2);
|
||||
assert(overflowActionbar.overflow.childElementCount === 2);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 3);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 2);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 2);
|
||||
verifyOverflowFocusedIndex(overflowActionbar, 3);
|
||||
|
||||
// move separator to back to toolbar
|
||||
overflowActionbar.restoreItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 4);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 2);
|
||||
assert(overflowActionbar.overflow.childElementCount === 1);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 4);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 2);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 1);
|
||||
verifyOverflowFocusedIndex(overflowActionbar, 3);
|
||||
|
||||
// move a3 to back to toolbar
|
||||
overflowActionbar.restoreItem();
|
||||
assert(overflowActionbar.actionsList.children.length === 5);
|
||||
assert(overflowActionbar.items.length === 4);
|
||||
assert(getMoreItemPlaceholderIndex(overflowActionbar.items) === 3);
|
||||
assert(overflowActionbar.overflow.childElementCount === 0);
|
||||
assert.strictEqual(overflowActionbar.actionsList.children.length, 5);
|
||||
assert.strictEqual(overflowActionbar.items.length, 4);
|
||||
assert.strictEqual(getMoreItemPlaceholderIndex(overflowActionbar.items), 3);
|
||||
assert.strictEqual(overflowActionbar.overflow.childElementCount, 0);
|
||||
});
|
||||
});
|
||||
|
||||
function verifyOverflowFocusedIndex(overflowToolbar: OverflowActionBar, expectedIndex: number) {
|
||||
// click more item element to show overflow and set focus to first element
|
||||
overflowToolbar.moreElementOnClick(new MouseEvent('click'));
|
||||
assert(overflowToolbar.focusedItem === expectedIndex);
|
||||
assert.strictEqual(overflowToolbar.focusedItem, expectedIndex);
|
||||
// click to hide overflow
|
||||
overflowToolbar.moreElementOnClick(new MouseEvent('click'));
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ suite('Editable dropdown tests', () => {
|
||||
|
||||
test('default value for editable dropdown is empty', () => {
|
||||
const dropdown = new Dropdown(container, undefined, options);
|
||||
assert(dropdown.value === '');
|
||||
assert.strictEqual(dropdown.value, '');
|
||||
});
|
||||
|
||||
test('changing value through code fires onValueChange event', () => {
|
||||
@@ -37,11 +37,11 @@ suite('Editable dropdown tests', () => {
|
||||
});
|
||||
dropdown.value = options.values[0];
|
||||
|
||||
assert(count === 1, 'onValueChange event was not fired');
|
||||
assert.strictEqual(count, 1, 'onValueChange event was not fired');
|
||||
dropdown.value = options.values[0];
|
||||
assert(count === 1, 'onValueChange event should not be fired for setting the same value again');
|
||||
assert.strictEqual(count, 1, 'onValueChange event should not be fired for setting the same value again');
|
||||
dropdown.value = options.values[1];
|
||||
assert(count === 2, 'onValueChange event was not fired for setting a new value of the dropdown');
|
||||
assert.strictEqual(count, 2, 'onValueChange event was not fired for setting a new value of the dropdown');
|
||||
});
|
||||
|
||||
test('changing value through input text fires onValue Change event', () => {
|
||||
@@ -54,18 +54,18 @@ suite('Editable dropdown tests', () => {
|
||||
dropdown.fireOnTextChange = true;
|
||||
dropdown.setDropdownVisibility(true);
|
||||
dropdown.input.value = options.values[0];
|
||||
assert(count === 1, 'onValueChange event was not fired for an option from the dropdown list');
|
||||
assert.strictEqual(count, 1, 'onValueChange event was not fired for an option from the dropdown list');
|
||||
dropdown.input.value = 'foo';
|
||||
assert(count === 2, 'onValueChange event was not fired for a value not in dropdown list');
|
||||
assert(dropdown.selectList.length === 4, 'list does not have all the values that are matching the input box text');
|
||||
assert(dropdown.value = 'foo');
|
||||
assert.strictEqual(count, 2, 'onValueChange event was not fired for a value not in dropdown list');
|
||||
assert.strictEqual(dropdown.selectList.length, 4, 'list does not have all the values that are matching the input box text');
|
||||
assert.strictEqual(dropdown.value, 'foo');
|
||||
dropdown.input.value = 'foobar';
|
||||
assert(count === 3, 'onValueChange event was not fired for a value not in dropdown list');
|
||||
assert(dropdown.selectList.length === 2, 'list does not have all the values that are matching the input box text');
|
||||
assert(dropdown.value = 'foobar');
|
||||
assert.strictEqual(count, 3, 'onValueChange event was not fired for a value not in dropdown list');
|
||||
assert.strictEqual(dropdown.selectList.length, 2, 'list does not have all the values that are matching the input box text');
|
||||
assert.strictEqual(dropdown.value, 'foobar');
|
||||
|
||||
dropdown.fireOnTextChange = false;
|
||||
dropdown.input.value = options.values[0];
|
||||
assert(count === 3, 'onValueChange event was fired with input box value change even after setting the fireOnTextChange to false');
|
||||
assert.strictEqual(count, 3, 'onValueChange event was fired with input box value change even after setting the fireOnTextChange to false');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user