Fix tests
This commit is contained in:
parent
227ac9dd88
commit
464ba92b47
|
@ -1212,11 +1212,9 @@ describe("/rows", () => {
|
|||
const response = await config.api.viewV2.search(
|
||||
createViewResponse.id,
|
||||
{
|
||||
sort: {
|
||||
column: sortParams.field,
|
||||
order: sortParams.order,
|
||||
type: sortParams.type,
|
||||
},
|
||||
sort: sortParams.field,
|
||||
sortOrder: sortParams.order,
|
||||
sortType: sortParams.type,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
PatchRowResponse,
|
||||
Row,
|
||||
ViewV2,
|
||||
SearchRequest,
|
||||
SearchViewRowRequest,
|
||||
} from "@budibase/types"
|
||||
import TestConfiguration from "../TestConfiguration"
|
||||
import { TestAPI } from "./base"
|
||||
|
@ -80,7 +80,7 @@ export class ViewV2API extends TestAPI {
|
|||
|
||||
search = async (
|
||||
viewId: string,
|
||||
params?: SearchRequest,
|
||||
params?: SearchViewRowRequest,
|
||||
{ expectStatus } = { expectStatus: 200 }
|
||||
) => {
|
||||
return this.request
|
||||
|
|
|
@ -9,7 +9,10 @@ export interface PatchRowRequest extends Row {
|
|||
|
||||
export interface PatchRowResponse extends Row {}
|
||||
|
||||
export interface SearchRowRequest extends SearchParams {}
|
||||
export interface SearchRowRequest extends Omit<SearchParams, "tableId"> {}
|
||||
|
||||
export interface SearchViewRowRequest
|
||||
extends Pick<SearchRowRequest, "sort" | "sortOrder" | "sortType"> {}
|
||||
|
||||
export interface SearchRowResponse {
|
||||
rows: any[]
|
||||
|
|
Loading…
Reference in New Issue