Skip to content

Commit a8d1763

Browse files
committed
test(e2e): fix search bot project
Signed-off-by: JobaDiniz <[email protected]>
1 parent 35303cf commit a8d1763

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Joba.IBM.RPA.Cli/Client/RpaClient.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -330,23 +330,23 @@ public async Task CreateOrUpdateAsync(CreateBotRequest bot, CancellationToken ca
330330

331331
private async Task<BotSearchResponse> UpdateAsync(Guid id, CreateBotRequest bot, CancellationToken cancellation)
332332
{
333-
var url = $"{CultureInfo.CurrentCulture.Name}/project/bot/{id}";
333+
var url = $"{CultureInfo.CurrentCulture.Name}/project/{bot.ProjectId}/bot/{id}";
334334
var response = await client.PutAsJsonAsync(url, bot, SerializerOptions, cancellation);
335335
await response.ThrowWhenUnsuccessfulAsync(cancellation);
336336
return await response.Content.ReadFromJsonAsync<BotSearchResponse>(SerializerOptions, cancellation) ?? throw new Exception("Could not convert the response");
337337
}
338338

339339
private async Task<BotSearchResponse> CreateAsync(CreateBotRequest bot, CancellationToken cancellation)
340340
{
341-
var url = $"{CultureInfo.CurrentCulture.Name}/project/bot";
341+
var url = $"{CultureInfo.CurrentCulture.Name}/project/{bot.ProjectId}/bot";
342342
var response = await client.PostAsJsonAsync(url, bot, SerializerOptions, cancellation);
343343
await response.ThrowWhenUnsuccessfulAsync(cancellation);
344344
return await response.Content.ReadFromJsonAsync<BotSearchResponse>(SerializerOptions, cancellation) ?? throw new Exception("Could not convert the response");
345345
}
346346

347347
private async Task<IEnumerable<BotSearchResponse>> SearchAsync(Guid projectId, string name, int limit, CancellationToken cancellation)
348348
{
349-
var url = $"{CultureInfo.CurrentCulture.Name}/project/{projectId}/bot?include=ScriptVersion&offset=0&limit={limit}&search={name}&orderBy=name&asc=true";
349+
var url = $"{CultureInfo.CurrentCulture.Name}/project/{projectId}/bot?offset=0&limit={limit}&search={name}&orderBy=name&asc=true";
350350
var response = await client.GetFromJsonAsync<PagedResponse<BotSearchResponse>>(url, SerializerOptions, cancellation);
351351
return response.Results;
352352
}

0 commit comments

Comments
 (0)