refactor: api keys API (#2652)
* feat: create useDeleteApiKey hook to handle api keys delete * refactor: use mutation to handle delete api key * [autofix.ci] apply automated fixes * feat: create useGetApiKeys hook * refactor: use useGetApiKeysQuery hook to get api keys data * [autofix.ci] apply automated fixes * refactor: change interface name * refactor: remove unnused loading state and use react state instead of react ref to ensure component render * fix: multiple refreshs when auto_login=false --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
cffed2c9be
commit
6fa3c7b17d
7 changed files with 140 additions and 107 deletions
|
|
@ -110,9 +110,8 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
value =
|
||||
(await page
|
||||
.locator('//*[@id="textarea_str_edit_prompt1"]')
|
||||
.inputValue()) ?? "";
|
||||
(await page.locator('//*[@id="textarea_str_edit_prompt1"]').inputValue()) ??
|
||||
"";
|
||||
|
||||
if (value != "prompt_name_test_123123!@#!@#") {
|
||||
expect(false).toBeTruthy();
|
||||
|
|
@ -126,14 +125,14 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.getByTestId('textarea_str_edit_prompt1-ExternalLink').click();
|
||||
await page.getByTestId("textarea_str_edit_prompt1-ExternalLink").click();
|
||||
await page
|
||||
.getByTestId("text-area-modal")
|
||||
.fill("prompt_edit_test_12312312321!@#$");
|
||||
|
||||
await page.getByText("Finish Editing", { exact: true }).click();
|
||||
|
||||
await page.getByTestId('textarea_str_edit_prompt-ExternalLink').click();
|
||||
await page.getByTestId("textarea_str_edit_prompt-ExternalLink").click();
|
||||
await page
|
||||
.getByTestId("text-area-modal")
|
||||
.fill("prompt_edit_test_44444444444!@#$");
|
||||
|
|
@ -194,9 +193,8 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
value =
|
||||
(await page
|
||||
.locator('//*[@id="textarea_str_edit_prompt1"]')
|
||||
.inputValue()) ?? "";
|
||||
(await page.locator('//*[@id="textarea_str_edit_prompt1"]').inputValue()) ??
|
||||
"";
|
||||
|
||||
if (value != "prompt_edit_test_12312312321!@#$") {
|
||||
expect(false).toBeTruthy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue