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): subtotal count #2452

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Prev Previous commit
Next Next commit
fix(formula): clipboard test params
  • Loading branch information
Dushusir committed Jun 17, 2024
commit dc45c2a40ba36a625201f02bd4acd37e1beb04f5
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import type { ICellData, Nullable, Univer } from '@univerjs/core';
import { ICommandService, IUniverInstanceService, ObjectMatrix } from '@univerjs/core';
import { LexerTreeBuilder } from '@univerjs/engine-formula';
import { FormulaDataModel, LexerTreeBuilder } from '@univerjs/engine-formula';
import { type ISetRangeValuesMutationParams, SetRangeValuesMutation } from '@univerjs/sheets';
import type { ICellDataWithSpanInfo } from '@univerjs/sheets-ui';
import { COPY_TYPE, ISelectionRenderService, PREDEFINED_HOOK_NAME, SelectionRenderService } from '@univerjs/sheets-ui';
Expand All @@ -31,6 +31,7 @@ describe('Test paste with formula', () => {
let get: Injector['get'];
let commandService: ICommandService;
let lexerTreeBuilder: LexerTreeBuilder;
let formulaDataModel: FormulaDataModel;
let getValues: (
startRow: number,
startColumn: number,
Expand All @@ -46,6 +47,7 @@ describe('Test paste with formula', () => {
get = testBed.get;
commandService = get(ICommandService);
lexerTreeBuilder = get(LexerTreeBuilder);
formulaDataModel = get(FormulaDataModel);

getValues = (
startRow: number,
Expand Down Expand Up @@ -160,7 +162,10 @@ describe('Test paste with formula', () => {
matrix,
accessor,
copyInfo,
lexerTreeBuilder
lexerTreeBuilder,
formulaDataModel,
false,
null
);

expect(redoUndoList).toStrictEqual(result);
Expand Down Expand Up @@ -614,7 +619,10 @@ describe('Test paste with formula', () => {
matrix,
accessor,
copyInfo,
lexerTreeBuilder
lexerTreeBuilder,
formulaDataModel,
false,
null
);

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