mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -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;
|
||||
return;
|
||||
}
|
||||
if (!contentChange?.isDirty) {
|
||||
if (!contentChange?.isDirty === false) {
|
||||
return;
|
||||
}
|
||||
this._lastEditFullReplacement = false;
|
||||
|
||||
@@ -191,7 +191,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -216,7 +215,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -228,7 +226,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
newCell.executionCount = 1;
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellExecuted,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -246,7 +243,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
newCell.executionCount = 10;
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellExecuted,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -258,7 +254,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
newCell.executionCount = 15;
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellExecuted,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -270,7 +265,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
newCell.executionCount = 105;
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellExecuted,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -289,7 +283,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -300,7 +293,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellOutputCleared,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -325,7 +317,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -336,7 +327,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: {
|
||||
@@ -373,7 +363,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -384,7 +373,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: {
|
||||
@@ -419,7 +407,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -432,7 +419,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: undefined
|
||||
@@ -461,7 +447,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -474,7 +459,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: undefined
|
||||
@@ -504,7 +488,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -518,7 +501,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: {
|
||||
@@ -536,7 +518,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: {
|
||||
@@ -571,7 +552,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -581,7 +561,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: {
|
||||
@@ -606,7 +585,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: {
|
||||
@@ -646,7 +624,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [cell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -656,7 +633,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
modelContentChangedEvent: {
|
||||
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 = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -708,7 +683,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellOutputUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell]
|
||||
};
|
||||
|
||||
@@ -734,7 +708,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -749,7 +722,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellOutputUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell]
|
||||
};
|
||||
|
||||
@@ -772,7 +744,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellOutputUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell]
|
||||
};
|
||||
|
||||
@@ -801,7 +772,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -816,7 +786,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
contentChange = {
|
||||
changeType: NotebookChangeType.CellOutputUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell]
|
||||
};
|
||||
|
||||
@@ -1017,7 +986,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellsModified,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0
|
||||
};
|
||||
@@ -1031,7 +999,6 @@ suite('Notebook Editor Model', function (): void {
|
||||
function addTextToBeginningOfTextEditorModel(notebookEditorModel: NotebookEditorModel, newCell: ICellModel, textToAdd: string) {
|
||||
let contentChange: NotebookContentChange = {
|
||||
changeType: NotebookChangeType.CellSourceUpdated,
|
||||
isDirty: true,
|
||||
cells: [newCell],
|
||||
cellIndex: 0,
|
||||
modelContentChangedEvent: {
|
||||
|
||||
Reference in New Issue
Block a user