refactor: Update Blank Flow Name (#9089)

* refactor: Standardize import statements and improve code formatting in reactflowUtils.ts

* [autofix.ci] apply automated fixes

* refactor: Standardize string quotes and improve test readability across multiple test files

- Updated string quotes from double to single in various test files for consistency.
- Enhanced test readability by replacing specific text selectors with test IDs.
- Adjusted wait conditions and element interactions to align with updated selectors.
- Ensured all tests maintain functionality while improving code clarity.

* [autofix.ci] apply automated fixes

* test: Add comprehensive Jest tests for createNewFlow function

- Introduced a new test file for the createNewFlow function to validate its behavior.
- Covered various scenarios including default value handling, flow parameter processing, edge cases, and special property handling.
- Ensured immutability of input parameters and consistency of output for the same inputs.
- Mocked dependencies to isolate the function's logic and improve test reliability.

* [autofix.ci] apply automated fixes

* test: Standardize string quotes and improve readability in auto-save and MCP server tests

- Updated string quotes from double to single for consistency across test files.
- Enhanced test readability by utilizing test IDs for element selection.
- Adjusted wait conditions and interactions to align with updated selectors while maintaining test functionality.

* [autofix.ci] apply automated fixes

* chore: update ESLint configuration and improve test selectors in auto-save-off.spec.ts

- Simplified ESLint configuration by removing unnecessary plugins and options.
- Enhanced test selectors in auto-save-off.spec.ts to use test IDs for better reliability and clarity.

* chore: enhance ESLint configuration with Prettier integration and improved rules

- Added Prettier as a plugin to the ESLint configuration for better code formatting.
- Updated parser options and extended rules for improved code quality and consistency.
- Ensured compatibility with TypeScript and React environments.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Deon Sanchez 2025-07-28 10:13:40 -06:00 committed by GitHub
commit 51715ea0c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 513 additions and 18 deletions

View file

@ -70,7 +70,11 @@ test(
console.error("Warning text not visible, skipping dialog confirmation");
}
await page.getByText("Untitled document").first().click();
const newFlowDiv = await page
.getByTestId("flow-name-div")
.filter({ hasText: "New Flow" })
.first();
await newFlowDiv.click();
await page.waitForSelector('[data-testid="icon-ChevronLeft"]', {
timeout: 5000,
@ -114,7 +118,11 @@ test(
await page.getByText("Save And Exit", { exact: true }).click();
await page.getByText("Untitled document").first().click();
const newFlow = await page
.getByTestId("flow-name-div")
.filter({ hasText: "New Flow" })
.first();
await newFlow.click();
await page.waitForSelector("text=loading", {
state: "hidden",
@ -162,7 +170,11 @@ test(
await page.getByText("Save And Exit", { exact: true }).last().click();
}
await page.getByText("Untitled document").first().click();
const newFlow2 = await page
.getByTestId("flow-name-div")
.filter({ hasText: "New Flow" })
.first();
await newFlow2.click();
await page.waitForSelector('[data-testid="icon-ChevronLeft"]', {
timeout: 5000,

View file

@ -13,7 +13,7 @@ test.describe(
await awaitBootstrapTest(page, {
skipModal: true,
});
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
},
);
@ -24,24 +24,24 @@ test.describe(
await awaitBootstrapTest(page, {
skipModal: true,
});
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
await page.waitForSelector('[data-testid="modal-title"]', {
timeout: 5000,
});
await page.goto("/login");
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
await page.waitForSelector('[data-testid="modal-title"]', {
timeout: 5000,
});
await page.goto("/admin");
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
await page.waitForSelector('[data-testid="modal-title"]', {
timeout: 5000,
});
await page.goto("/admin/login");
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
await page.waitForSelector('[data-testid="modal-title"]', {
timeout: 5000,
});

View file

@ -20,7 +20,7 @@ test(
await page.getByTestId("icon-ChevronLeft").first().click();
await page.getByText("Projects").first().isVisible();
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Document Q&A" }).click();
await page.waitForSelector('[data-testid="icon-ChevronLeft"]', {
@ -29,7 +29,7 @@ test(
await page.getByTestId("icon-ChevronLeft").first().click();
await page.getByText("Projects").first().isVisible();
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Basic Prompting" }).click();
await page.waitForSelector('[data-testid="icon-ChevronLeft"]', {

View file

@ -184,7 +184,11 @@ test(
});
await awaitBootstrapTest(page, { skipModal: true });
await page.getByText("Untitled document").first().click();
const newFlowDiv = await page
.getByTestId("flow-name-div")
.filter({ hasText: "New Flow" })
.first();
await newFlowDiv.click();
await page.waitForTimeout(1000);

View file

@ -34,7 +34,7 @@ test(
).isVisible(),
);
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Basic Prompting" }).click();

View file

@ -47,7 +47,7 @@ test(
timeout: 3000,
});
await page.getByText("New Flow", { exact: true }).click();
await page.getByTestId("new-project-btn").click();
await page.getByTestId("side_nav_options_all-templates").click();
await page.getByRole("heading", { name: "Basic Prompting" }).click();