diff --git a/qa-core/src/config/internal-api/TestConfiguration/rows.ts b/qa-core/src/config/internal-api/TestConfiguration/rows.ts index 435be85d56..3514dd1b35 100644 --- a/qa-core/src/config/internal-api/TestConfiguration/rows.ts +++ b/qa-core/src/config/internal-api/TestConfiguration/rows.ts @@ -37,16 +37,15 @@ export default class RowsApi { return [response, json] } - async searchSinglePage(tableId: string, body: any): Promise<[Response, Row[]]> { + async searchNoPagination(tableId: string, body: any): Promise<[Response, Row[]]> { const response = await this.api.post(`/${tableId}/search`, { body }) const json = await response.json() expect(response).toHaveStatusCode(200) - expect(json.rows.length).toBeLessThanOrEqual(9) expect(json.hasNextPage).toEqual(false) return [response, json.rows] } - async searchMultiPage(tableId: string, body: any): Promise<[Response, Row[]]> { + async searchWithPagination(tableId: string, body: any): Promise<[Response, Row[]]> { const response = await this.api.post(`/${tableId}/search`, { body }) const json = await response.json() expect(response).toHaveStatusCode(200) diff --git a/qa-core/src/tests/internal-api/tables/tables.spec.ts b/qa-core/src/tests/internal-api/tables/tables.spec.ts index f93ec0438b..c6dd4ebf3d 100644 --- a/qa-core/src/tests/internal-api/tables/tables.spec.ts +++ b/qa-core/src/tests/internal-api/tables/tables.spec.ts @@ -31,7 +31,7 @@ describe("Internal API - Table Operations", () => { }) } - it("Operations on Tables", async () => { + it("Create and delete table, columns and rows", async () => { // create the app const appName = generator.word() const app = await createAppFromTemplate() @@ -119,7 +119,7 @@ describe("Internal API - Table Operations", () => { await config.rows.add(addColumnData._id, newRow) //Search single row - await config.rows.searchSinglePage(createdTableData._id, searchBody(createdTableData.primaryDisplay)) + await config.rows.searchNoPagination(createdTableData._id, searchBody(createdTableData.primaryDisplay)) //Add 10 more rows for (let i = 0; i < 10; i++) { @@ -128,7 +128,7 @@ describe("Internal API - Table Operations", () => { } //Search rows with pagination - const [allRowsResponse, allRowsJson] = await config.rows.searchMultiPage(createdTableData._id, searchBody(createdTableData.primaryDisplay)) + const [allRowsResponse, allRowsJson] = await config.rows.searchWithPagination(createdTableData._id, searchBody(createdTableData.primaryDisplay)) //Delete Rows from table const rowToDelete = { @@ -140,7 +140,7 @@ describe("Internal API - Table Operations", () => { ) //Search single row - await config.rows.searchSinglePage(createdTableData._id, searchBody(createdTableData.primaryDisplay)) + await config.rows.searchWithPagination(createdTableData._id, searchBody(createdTableData.primaryDisplay)) }) })