Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(formula): fix formula paste #3257

Merged
merged 6 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading
Loading