-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cts): add the remaining helpers tests
- Loading branch information
Showing
23 changed files
with
812 additions
and
594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
title: getTaskResponse | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
status: | ||
$ref: '../../../common/responses/common.yml#/taskStatus' | ||
required: | ||
- status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
method: | ||
get: | ||
x-helper: true | ||
tags: | ||
- Records | ||
operationId: browseObjects | ||
summary: Get all records from an index | ||
description: | | ||
You can use the browse method to get records from an index—for example, to export your index as a backup. To export all records, use an empty query. | ||
Use browse instead of search when exporting records from your index, when ranking, or analytics, isn't important. The Analytics API doesn't collect data when using browse. | ||
Don't use this method for building a search UI. Use search instead. | ||
parameters: | ||
- in: query | ||
name: indexName | ||
description: The name of the index on which the operation was performed. | ||
required: true | ||
schema: | ||
type: string | ||
- in: query | ||
name: browseParams | ||
description: Browse parameters. | ||
required: true | ||
schema: | ||
$ref: '../common/schemas/BrowseParams.yml#/browseParamsObject' | ||
responses: | ||
'204': | ||
description: No content. | ||
'400': | ||
$ref: '../../common/responses/IndexNotFound.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
method: | ||
get: | ||
x-helper: true | ||
operationId: waitForAppTask | ||
summary: Wait for application-level operation to complete | ||
description: Wait for a application-level task to complete. | ||
parameters: | ||
- in: query | ||
name: taskID | ||
description: The taskID returned by the operation. | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../common/schemas/GetTaskResponse.yml' | ||
'400': | ||
$ref: '../../common/responses/IndexNotFound.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
method: | ||
get: | ||
x-helper: true | ||
tags: | ||
- Records | ||
operationId: waitForTask | ||
summary: Wait for operation to complete | ||
description: | | ||
Wait for a task to complete to ensure synchronized index updates. | ||
All Algolia write operations are asynchronous. When you make a request for a write operation, for example, to add or update records in your index, Algolia creates a task on a queue and returns a taskID. The task itself runs separately, depending on the server load. | ||
parameters: | ||
- in: query | ||
name: indexName | ||
description: The name of the index on which the operation was performed. | ||
required: true | ||
schema: | ||
type: string | ||
- in: query | ||
name: taskID | ||
description: The taskID returned by the operation. | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../common/schemas/GetTaskResponse.yml' | ||
'400': | ||
$ref: '../../common/responses/IndexNotFound.yml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[ | ||
{ | ||
"autoCreateClient": false, | ||
"steps": [ | ||
{ | ||
"type": "createClient", | ||
"parameters": { | ||
"appId": "test-app-id", | ||
"apiKey": "test-api-key", | ||
"customHosts": [ | ||
{ | ||
"host": "${{localhost}}", | ||
"port": 6681 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "method", | ||
"method": "browseObjects", | ||
"parameters": { | ||
"indexName": "browse-objects-${{language}}", | ||
"browseParams": { | ||
"query": "batman", | ||
"facets": [ | ||
"year" | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[ | ||
{ | ||
"testName": "call deleteObjects without error", | ||
"autoCreateClient": false, | ||
"steps": [ | ||
{ | ||
"type": "createClient", | ||
"parameters": { | ||
"appId": "test-app-id", | ||
"apiKey": "test-api-key", | ||
"customHosts": [ | ||
{ | ||
"host": "${{localhost}}", | ||
"port": 6680 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "method", | ||
"method": "deleteObjects", | ||
"parameters": { | ||
"indexName": "cts_e2e_deleteObjects_${{language}}", | ||
"objectIDs": [ | ||
"1", | ||
"2" | ||
] | ||
}, | ||
"expected": { | ||
"type": "response", | ||
"match": [ | ||
{ | ||
"taskID": 666, | ||
"objectIDs": [ | ||
"1", | ||
"2" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] |
Oops, something went wrong.