Skip to content

Commit

Permalink
fix(formula): fix formula paste
Browse files Browse the repository at this point in the history
  • Loading branch information
wpxp123456 authored and wpxp123456 committed Aug 30, 2024
1 parent ad7fea1 commit 1703396
Showing 1 changed file with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ describe('Test paste with formula', () => {
pasteType: PREDEFINED_HOOK_NAME.DEFAULT_PASTE,
};

const pasteFrom = {
unitId,
subUnitId,
range: {
rows: [0],
cols: [2, 3],
},
};

const result = {
undos: [
{
Expand All @@ -110,15 +119,6 @@ describe('Test paste with formula', () => {
subUnitId,
cellValue: {
12: {
2: {
custom: null,
s: null,
f: null,
si: null,
p: null,
v: null,
t: null,
},
3: {
custom: null,
s: null,
Expand All @@ -142,7 +142,6 @@ describe('Test paste with formula', () => {
subUnitId,
cellValue: {
12: {
2: {},
3: {
f: null,
si: '3e4r5t',
Expand All @@ -166,7 +165,7 @@ describe('Test paste with formula', () => {
lexerTreeBuilder,
formulaDataModel,
false,
null
pasteFrom
);

expect(redoUndoList).toStrictEqual(result);
Expand Down Expand Up @@ -332,6 +331,15 @@ describe('Test paste with formula', () => {
pasteType: PREDEFINED_HOOK_NAME.DEFAULT_PASTE,
};

const pasteFrom = {
unitId,
subUnitId,
range: {
rows: [0, 1, 2, 3],
cols: [5, 6, 7, 8],
},
};

const result = {
undos: [
{
Expand Down Expand Up @@ -624,7 +632,7 @@ describe('Test paste with formula', () => {
lexerTreeBuilder,
formulaDataModel,
false,
null
pasteFrom
);

// Randomly generated id, no comparison is made
Expand Down

0 comments on commit 1703396

Please sign in to comment.