1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00

Fix tests

This commit is contained in:
Adria Navarro 2023-08-03 14:32:03 +03:00
parent 227ac9dd88
commit 464ba92b47
3 changed files with 9 additions and 8 deletions

View file

@ -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,
}
)

View file

@ -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

View file

@ -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[]