mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 17:52:34 -05:00
Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)
* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 * Fixes and cleanup * Distro * Fix hygiene yarn * delete no yarn lock changes file * Fix hygiene * Fix layer check * Fix CI * Skip lib checks * Remove tests deleted in vs code * Fix tests * Distro * Fix tests and add removed extension point * Skip failing notebook tests for now * Disable broken tests and cleanup build folder * Update yarn.lock and fix smoke tests * Bump sqlite * fix contributed actions and file spacing * Fix user data path * Update yarn.locks Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
@@ -55,52 +55,52 @@ suite('Editor - Range decorations', () => {
|
||||
});
|
||||
|
||||
test('highlight range for the resource if it is an active editor', function () {
|
||||
let range: IRange = { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 };
|
||||
const range: IRange = new Range(1, 1, 1, 1);
|
||||
testObject.highlightRange({ resource: model.uri, range });
|
||||
|
||||
let actuals = rangeHighlightDecorations(model);
|
||||
const actuals = rangeHighlightDecorations(model);
|
||||
|
||||
assert.deepEqual([range], actuals);
|
||||
assert.deepStrictEqual(actuals, [range]);
|
||||
});
|
||||
|
||||
test('remove highlight range', function () {
|
||||
testObject.highlightRange({ resource: model.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } });
|
||||
testObject.removeHighlightRange();
|
||||
|
||||
let actuals = rangeHighlightDecorations(model);
|
||||
const actuals = rangeHighlightDecorations(model);
|
||||
|
||||
assert.deepEqual([], actuals);
|
||||
assert.deepStrictEqual(actuals, []);
|
||||
});
|
||||
|
||||
test('highlight range for the resource removes previous highlight', function () {
|
||||
testObject.highlightRange({ resource: model.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } });
|
||||
let range: IRange = { startLineNumber: 2, startColumn: 2, endLineNumber: 4, endColumn: 3 };
|
||||
const range: IRange = new Range(2, 2, 4, 3);
|
||||
testObject.highlightRange({ resource: model.uri, range });
|
||||
|
||||
let actuals = rangeHighlightDecorations(model);
|
||||
const actuals = rangeHighlightDecorations(model);
|
||||
|
||||
assert.deepEqual([range], actuals);
|
||||
assert.deepStrictEqual(actuals, [range]);
|
||||
});
|
||||
|
||||
test('highlight range for a new resource removes highlight of previous resource', function () {
|
||||
testObject.highlightRange({ resource: model.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } });
|
||||
|
||||
let anotherModel = prepareActiveEditor('anotherModel');
|
||||
let range: IRange = { startLineNumber: 2, startColumn: 2, endLineNumber: 4, endColumn: 3 };
|
||||
const anotherModel = prepareActiveEditor('anotherModel');
|
||||
const range: IRange = new Range(2, 2, 4, 3);
|
||||
testObject.highlightRange({ resource: anotherModel.uri, range });
|
||||
|
||||
let actuals = rangeHighlightDecorations(model);
|
||||
assert.deepEqual([], actuals);
|
||||
assert.deepStrictEqual(actuals, []);
|
||||
actuals = rangeHighlightDecorations(anotherModel);
|
||||
assert.deepEqual([range], actuals);
|
||||
assert.deepStrictEqual(actuals, [range]);
|
||||
});
|
||||
|
||||
test('highlight is removed on model change', function () {
|
||||
testObject.highlightRange({ resource: model.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } });
|
||||
prepareActiveEditor('anotherModel');
|
||||
|
||||
let actuals = rangeHighlightDecorations(model);
|
||||
assert.deepEqual([], actuals);
|
||||
const actuals = rangeHighlightDecorations(model);
|
||||
assert.deepStrictEqual(actuals, []);
|
||||
});
|
||||
|
||||
test('highlight is removed on cursor position change', function () {
|
||||
@@ -109,27 +109,27 @@ suite('Editor - Range decorations', () => {
|
||||
position: new Position(2, 1)
|
||||
});
|
||||
|
||||
let actuals = rangeHighlightDecorations(model);
|
||||
assert.deepEqual([], actuals);
|
||||
const actuals = rangeHighlightDecorations(model);
|
||||
assert.deepStrictEqual(actuals, []);
|
||||
});
|
||||
|
||||
test('range is not highlight if not active editor', function () {
|
||||
let model = aModel(URI.file('some model'));
|
||||
const model = aModel(URI.file('some model'));
|
||||
testObject.highlightRange({ resource: model.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } });
|
||||
|
||||
let actuals = rangeHighlightDecorations(model);
|
||||
assert.deepEqual([], actuals);
|
||||
const actuals = rangeHighlightDecorations(model);
|
||||
assert.deepStrictEqual(actuals, []);
|
||||
});
|
||||
|
||||
test('previous highlight is not removed if not active editor', function () {
|
||||
let range: IRange = { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 };
|
||||
const range = new Range(1, 1, 1, 1);
|
||||
testObject.highlightRange({ resource: model.uri, range });
|
||||
|
||||
let model1 = aModel(URI.file('some model'));
|
||||
const model1 = aModel(URI.file('some model'));
|
||||
testObject.highlightRange({ resource: model1.uri, range: { startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 } });
|
||||
|
||||
let actuals = rangeHighlightDecorations(model);
|
||||
assert.deepEqual([range], actuals);
|
||||
const actuals = rangeHighlightDecorations(model);
|
||||
assert.deepStrictEqual(actuals, [range]);
|
||||
});
|
||||
|
||||
function prepareActiveEditor(resource: string): TextModel {
|
||||
|
||||
Reference in New Issue
Block a user