import { Cell, ChildModelOf, Column, ColumnModel, Filter, InitModelOf, MenuModel, ModelAdapter, ObjectOrChildModel, ObjectOrModel, ObjectType, ObjectWithType, Primitive, RemoteEvent, Session, SomeRequired, Table, TableModel, TableRow, TableRowModel, TableTextUserFilter, TextColumnUserFilter } from '../../index'; import { MenuSpecHelper, SpecTable, SpecTableAdapter } from '../index'; export declare class TableSpecHelper { session: Session; menuHelper: MenuSpecHelper; constructor(session: Session); createModel(columns: ObjectOrChildModel>[], rows: ObjectOrModel[]): SpecTableModel; createModelRow(id?: string, cells?: (Primitive | object | Cell)[], parentRow?: TableRow | string): TableRowModel; /** * * @param texts array of texts for the cells in the new row or a string if only one cell should be created. * @param withoutCells true if only text instead of cells should be created (server only sends text without a cell object if no other properties are set) */ createModelRowByTexts(id: string, texts: string[] | string, withoutCells?: boolean): TableRowModel; /** * * @param values array of values for the cells in the new row or a number if only one cell should be created. */ createModelRowByValues(id: string, values: any | any[]): TableRowModel; createModelColumn(text: string, type?: ObjectType>): ChildModelOf> & { uiSortPossible: boolean; }; createModelCell(text?: string, value?: any): Cell; createMenuModel(text?: string): MenuModel; createMenuModelWithSingleAndHeader(text: string): MenuModel; createModelColumns(count: number, columnType?: ObjectType): ChildModelOf>[]; /** * Creates cells with values. * * If the column is of type NumberColumn a numeric value is set. * Otherwise, the value is similar to 'cell0_0' if rowId is given, or 'cell0' if no rowId is given. */ createModelCells(columns: ColumnModel[] | number, rowId?: string): Cell[]; /** * Creates #rowCount rows where columns are either the column count or the column objects. * Passing the column objects allows to consider the column type for cell creation. */ createModelRows(columns: number | ColumnModel[], rowCount: number, parentRow?: TableRow | string): SpecTableRowModel[]; createModelSingleColumnByTexts(texts: string[]): SpecTableModel; createModelSingleColumnByValues(values: any[], columnType: ObjectType): SpecTableModel; createModelFixture(colCount: number, rowCount?: number): SpecTableModel; createTableWithOneColumn(): Table; createModelSingleConfiguredCheckableColumn(rowCount: number): SpecTableModel; createTable(model: TableModel): SpecTable; createTableAdapter(model: InitModelOf | SpecTableModel): SpecTableAdapter; createColumnFilter(model: InitModelOf): TextColumnUserFilter; createAndRegisterColumnFilter(model: InitModelOf): TextColumnUserFilter; createTableTextFilter(table: Table, text: string): TableTextUserFilter; createTextColumnFilter(table: Table, column: Column, text: string): TextColumnUserFilter; createColumnStructureChangedEvent(model: { id: string; }, columns: ColumnModel[]): RemoteEvent; createRowsInsertedEvent(model: { id: string; }, rows: TableRowModel[]): RemoteEvent; createAllRowsDeletedEvent(model: { id: string; }): RemoteEvent; createFiltersChangedEvent(model: { id: string; }, filters: Filter[]): RemoteEvent; /** * Applies display style on rows and cells so that cells are positioned correctly in a row.
* Necessary because the stylesheet is not applied when running the specs. */ applyDisplayStyle(table: Table): void; getRowIds(rows: ObjectOrModel[]): string[]; selectRowsAndAssert(table: Table, rows: TableRow[]): void; assertSelection(table: Table, rows: TableRow[]): void; /** * Asserts that the rows contain the given texts at column specified by colIndex * @param texts array with same length as rows. */ assertTextsInCells(rows: TableRow[], colIndex: number, texts: string[]): void; assertValuesInCells(rows: TableRow[], colIndex: number, values: any[]): void; assertDatesInCells(rows: TableRow[], colIndex: number, dates: Date[]): void; assertSelectionEvent(id: string, rowIds: string[]): void; assertAriaRowIndexAndCount(table: Table, start: number, size: number): void; assertNotAriaRowIndexAndCount(table: Table): void; assertAriaPosInSetAndSize(rows: TableRow[], start: number, size: number): void; getDisplayingContextMenu(table: Table): JQuery; /** * Since scout.comparators.TEXT is a static object and only installed once, * we must reset the object - otherwise we could not test cases with client * and server side sorting. */ resetIntlCollator(): void; /** * Stops the current animation and jumps to the end state. * * This is sometimes even necessary if `$.fx.off` is set to `true`. */ finishRowAnimation(table: Table): void; } export type SpecTableRowModel = TableRowModel & { cells: Cell[]; }; export type SpecTableModel = SomeRequired & ObjectWithType; //# sourceMappingURL=TableSpecHelper.d.ts.map