mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
check for isDirty false explicitly (#14427)
* check for isDirty false explicitly * revert back test to not pass isDirty
This commit is contained in:
@@ -122,7 +122,7 @@ export class NotebookEditorModel extends EditorModel {
|
|||||||
this._isFirstKernelChange = false;
|
this._isFirstKernelChange = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!contentChange?.isDirty) {
|
if (!contentChange?.isDirty === false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._lastEditFullReplacement = false;
|
this._lastEditFullReplacement = false;
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -216,7 +215,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -228,7 +226,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
newCell.executionCount = 1;
|
newCell.executionCount = 1;
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellExecuted,
|
changeType: NotebookChangeType.CellExecuted,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -246,7 +243,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
newCell.executionCount = 10;
|
newCell.executionCount = 10;
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellExecuted,
|
changeType: NotebookChangeType.CellExecuted,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -258,7 +254,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
newCell.executionCount = 15;
|
newCell.executionCount = 15;
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellExecuted,
|
changeType: NotebookChangeType.CellExecuted,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -270,7 +265,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
newCell.executionCount = 105;
|
newCell.executionCount = 105;
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellExecuted,
|
changeType: NotebookChangeType.CellExecuted,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -289,7 +283,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -300,7 +293,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellOutputCleared,
|
changeType: NotebookChangeType.CellOutputCleared,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -325,7 +317,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -336,7 +327,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: {
|
modelContentChangedEvent: {
|
||||||
@@ -373,7 +363,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -384,7 +373,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: {
|
modelContentChangedEvent: {
|
||||||
@@ -419,7 +407,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -432,7 +419,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: undefined
|
modelContentChangedEvent: undefined
|
||||||
@@ -461,7 +447,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -474,7 +459,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: undefined
|
modelContentChangedEvent: undefined
|
||||||
@@ -504,7 +488,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -518,7 +501,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: {
|
modelContentChangedEvent: {
|
||||||
@@ -536,7 +518,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: {
|
modelContentChangedEvent: {
|
||||||
@@ -571,7 +552,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -581,7 +561,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: {
|
modelContentChangedEvent: {
|
||||||
@@ -606,7 +585,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: {
|
modelContentChangedEvent: {
|
||||||
@@ -646,7 +624,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [cell],
|
cells: [cell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -656,7 +633,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
modelContentChangedEvent: {
|
modelContentChangedEvent: {
|
||||||
changes: [{ range: new Range(1, 1, 1, 1), rangeLength: 0, rangeOffset: 0, text: 'This is a test' }],
|
changes: [{ range: new Range(1, 1, 1, 1), rangeLength: 0, rangeOffset: 0, text: 'This is a test' }],
|
||||||
@@ -695,7 +671,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -708,7 +683,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellOutputUpdated,
|
changeType: NotebookChangeType.CellOutputUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell]
|
cells: [newCell]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -734,7 +708,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -749,7 +722,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellOutputUpdated,
|
changeType: NotebookChangeType.CellOutputUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell]
|
cells: [newCell]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -772,7 +744,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellOutputUpdated,
|
changeType: NotebookChangeType.CellOutputUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell]
|
cells: [newCell]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -801,7 +772,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -816,7 +786,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
contentChange = {
|
contentChange = {
|
||||||
changeType: NotebookChangeType.CellOutputUpdated,
|
changeType: NotebookChangeType.CellOutputUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell]
|
cells: [newCell]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1017,7 +986,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
|
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellsModified,
|
changeType: NotebookChangeType.CellsModified,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0
|
cellIndex: 0
|
||||||
};
|
};
|
||||||
@@ -1031,7 +999,6 @@ suite('Notebook Editor Model', function (): void {
|
|||||||
function addTextToBeginningOfTextEditorModel(notebookEditorModel: NotebookEditorModel, newCell: ICellModel, textToAdd: string) {
|
function addTextToBeginningOfTextEditorModel(notebookEditorModel: NotebookEditorModel, newCell: ICellModel, textToAdd: string) {
|
||||||
let contentChange: NotebookContentChange = {
|
let contentChange: NotebookContentChange = {
|
||||||
changeType: NotebookChangeType.CellSourceUpdated,
|
changeType: NotebookChangeType.CellSourceUpdated,
|
||||||
isDirty: true,
|
|
||||||
cells: [newCell],
|
cells: [newCell],
|
||||||
cellIndex: 0,
|
cellIndex: 0,
|
||||||
modelContentChangedEvent: {
|
modelContentChangedEvent: {
|
||||||
|
|||||||
Reference in New Issue
Block a user