fix: Implement get_or_create_default_folder for user folder management (#6090)
* feat: implement get_or_create_default_folder function to ensure default folder exists for users
* refactor: replace create_default_folder_if_it_doesnt_exist with get_or_create_default_folder for user folder creation
* test: add unit tests for get_or_create_default_folder function
* ✨ (generalBugs-shard-10.spec.ts): refactor test script to improve readability and maintainability by chaining actions on page elements instead of using separate lines for each action
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
parent
ea5806f30e
commit
bdda781461
7 changed files with 118 additions and 36 deletions
|
|
@ -34,21 +34,15 @@ test(
|
|||
|
||||
//connection 1
|
||||
|
||||
const elementPrompt = await page
|
||||
await page
|
||||
.getByTestId("handle-prompt-shownode-prompt message-right")
|
||||
.first();
|
||||
await elementPrompt.hover();
|
||||
await page.mouse.down();
|
||||
.first()
|
||||
.click();
|
||||
|
||||
await page.locator('//*[@id="react-flow-id"]').hover();
|
||||
|
||||
const elementChatOutput = await page
|
||||
await page
|
||||
.getByTestId("handle-chatoutput-shownode-text-left")
|
||||
.first();
|
||||
await elementChatOutput.hover();
|
||||
await page.mouse.up();
|
||||
|
||||
await page.locator('//*[@id="react-flow-id"]').hover();
|
||||
.first()
|
||||
.click();
|
||||
|
||||
await page.getByTestId("button_open_prompt_modal").click();
|
||||
|
||||
|
|
@ -70,7 +64,7 @@ test(
|
|||
|
||||
await page.getByText("Close").last().click();
|
||||
|
||||
await page.getByText("Prompt", { exact: true }).click();
|
||||
await page.getByText("Prompt", { exact: true }).last().click();
|
||||
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
|
||||
|
|
@ -80,8 +74,6 @@ test(
|
|||
|
||||
expect(page.locator(".border-ring-frozen")).toHaveCount(1);
|
||||
|
||||
await page.locator('//*[@id="react-flow-id"]').click();
|
||||
|
||||
await page.getByTestId("button_open_prompt_modal").click();
|
||||
|
||||
await page.getByTestId("edit-prompt-sanitized").first().click();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue