feat: Move to Biome for linting and formatting (#8997)
* init biome * lint * format * unused vars * more unused vars * error fixes * import ordering * test precommit hook * add precommit hook * [autofix.ci] apply automated fixes * remove prettier and eslint and update gh actions * pre-commit update * ✨ (Makefile): add new targets 'biome' and 'biome_check' to run biome check and format on frontend code. * 🔧 (Makefile): rename 'biome' target to 'format_frontend' for clarity and consistency 🔧 (Makefile): rename 'biome_check' target to 'format_frontend_check' for clarity and consistency * 📝 (biome.json): Update a11y rule in biome.json to turn off 'noStaticElementInteractions' warning 🔧 (apiModal/code-tabs.tsx): Remove unused 'autologin' variable in APITabsComponent ♻️ (global-variable-modal.tsx): Simplify GeneralGlobalVariableModal component by removing unused props definition * 📝 (biome.json): Remove 'debug' from allowed console methods to improve code quality 🔧 (index.tsx): Replace console.debug with console.log for better logging consistency ♻️ (index.tsx): Refactor UpdateAllComponents function signature to remove unnecessary empty object parameter * fix console rules * 📝 (biome.json): update a11y rule to warn for noStaticElementInteractions to improve accessibility compliance. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
This commit is contained in:
parent
f07f0e26b7
commit
0f89e39da1
680 changed files with 2232 additions and 2671 deletions
|
|
@ -66,8 +66,8 @@ test(
|
|||
);
|
||||
|
||||
await page.getByText("Exit Anyway", { exact: true }).click();
|
||||
} catch (error) {
|
||||
console.log("Warning text not visible, skipping dialog confirmation");
|
||||
} catch (_error) {
|
||||
console.error("Warning text not visible, skipping dialog confirmation");
|
||||
}
|
||||
|
||||
await page.getByText("Untitled document").first().click();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
test.describe(
|
||||
"Auto_login tests",
|
||||
{ tag: ["@release", "@api", "@database"] },
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ async function waitForInstallButton(page) {
|
|||
await button.waitForElementState("stable");
|
||||
return button;
|
||||
} catch (error) {
|
||||
console.log("Install button not found, retrying...");
|
||||
console.error("Install button not found, retrying...");
|
||||
// Optional: Add custom retry logic here
|
||||
throw error;
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ async function waitForSuccessMessage(page) {
|
|||
// Click the message when it's ready
|
||||
await page.getByText("Flow Installed Successfully.").first().click();
|
||||
} catch (error) {
|
||||
console.log("Success message not found");
|
||||
console.error("Success message not found");
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { expect, test } from "@playwright/test";
|
|||
import { readFileSync } from "fs";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { simulateDragAndDrop } from "../../utils/simulate-drag-and-drop";
|
||||
|
||||
test(
|
||||
"user should be able to drag and drop an old collection without crashing the application",
|
||||
{ tag: ["@release"] },
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { renameFlow } from "../../utils/rename-flow";
|
||||
|
||||
test(
|
||||
"user should be able to edit flow name by clicking on the header or on the main page",
|
||||
{ tag: ["@release", "@workspace", "@components"] },
|
||||
|
|
@ -16,7 +17,7 @@ test(
|
|||
|
||||
await renameFlow(page, { flowName: randomName });
|
||||
|
||||
let { flowName } = await renameFlow(page);
|
||||
const { flowName } = await renameFlow(page);
|
||||
|
||||
expect(flowName).toBe(randomName);
|
||||
|
||||
|
|
@ -37,7 +38,7 @@ test(
|
|||
|
||||
await renameFlow(page, { flowName: randomName2 });
|
||||
|
||||
let { flowName: flowName2 } = await renameFlow(page);
|
||||
const { flowName: flowName2 } = await renameFlow(page);
|
||||
|
||||
expect(flowName2).toBe(randomName2);
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ test(
|
|||
|
||||
await renameFlow(page, { flowName: randomName3 });
|
||||
|
||||
let { flowName: flowName3 } = await renameFlow(page);
|
||||
const { flowName: flowName3 } = await renameFlow(page);
|
||||
|
||||
expect(flowName3).toBe(randomName3);
|
||||
|
||||
|
|
@ -79,7 +80,7 @@ test(
|
|||
|
||||
await renameFlow(page, { flowName: randomName4 });
|
||||
|
||||
let { flowName: flowName4 } = await renameFlow(page);
|
||||
const { flowName: flowName4 } = await renameFlow(page);
|
||||
|
||||
expect(flowName4).toBe(randomName4);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
test(
|
||||
"user should be able to edit tools",
|
||||
{ tag: ["@release", "@components"] },
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { expect, Page, test } from "@playwright/test";
|
||||
import { expect, type Page, test } from "@playwright/test";
|
||||
import * as dotenv from "dotenv";
|
||||
import path from "path";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
|
@ -128,7 +128,7 @@ async function tryConnectNodes(page: Page) {
|
|||
await page.getByTestId("handle-prompt-shownode-prompt-right").click({
|
||||
timeout: 500,
|
||||
});
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
numberOfEdges = await page.locator(".react-flow__edge-path").count();
|
||||
expect(numberOfEdges).toBe(0);
|
||||
}
|
||||
|
|
@ -141,7 +141,7 @@ async function tryConnectNodes(page: Page) {
|
|||
.click({
|
||||
timeout: 500,
|
||||
});
|
||||
} catch (e) {
|
||||
} catch (_e) {
|
||||
numberOfEdges = await page.locator(".react-flow__edge-path").count();
|
||||
expect(numberOfEdges).toBe(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ test(
|
|||
.getByTestId("handle-parsercomponent-shownode-parsed text-right")
|
||||
.click();
|
||||
|
||||
const loopItemInput = await page
|
||||
const _loopItemInput = await page
|
||||
.getByTestId("handle-loopcomponent-shownode-item-left")
|
||||
.first()
|
||||
.click();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ test(
|
|||
|
||||
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
||||
try {
|
||||
console.log(`Attempt ${attempt} of ${maxRetries}`);
|
||||
console.warn(`Attempt ${attempt} of ${maxRetries}`);
|
||||
|
||||
await awaitBootstrapTest(page);
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ test(
|
|||
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
let count = 0;
|
||||
const count = 0;
|
||||
|
||||
while (
|
||||
elementText !==
|
||||
|
|
@ -177,7 +177,7 @@ test(
|
|||
/"args":\s*\[\s*"\/c"\s*,\s*"uvx"\s*,\s*"mcp-proxy"\s*,\s*"([^"]+)"/,
|
||||
);
|
||||
expect(sseUrlMatch).not.toBeNull();
|
||||
const sseUrl = sseUrlMatch![1];
|
||||
const _sseUrl = sseUrlMatch![1];
|
||||
|
||||
await page.getByText("macOS/Linux", { exact: true }).click();
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ test(
|
|||
await page.getByText("Add MCP Server", { exact: true }).click({
|
||||
timeout: 5000,
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
await page
|
||||
.getByTestId("mcp-server-dropdown")
|
||||
.click({ timeout: 3000 });
|
||||
|
|
@ -271,14 +271,16 @@ test(
|
|||
expect(fetchOptionCount).toBeGreaterThan(0);
|
||||
|
||||
// If we get here, the test passed
|
||||
console.log(`Test passed on attempt ${attempt}`);
|
||||
console.warn(`Test passed on attempt ${attempt}`);
|
||||
return;
|
||||
} catch (error) {
|
||||
error = error as Error;
|
||||
console.log(`Attempt ${attempt} failed:`, error);
|
||||
console.error(`Attempt ${attempt} failed:`, error);
|
||||
|
||||
if (attempt === maxRetries) {
|
||||
console.log(`All ${maxRetries} attempts failed. Last error:`, error);
|
||||
console.error(
|
||||
`All ${maxRetries} attempts failed. Last error:`,
|
||||
error,
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ test(
|
|||
await page.getByText("Add MCP Server", { exact: true }).click({
|
||||
timeout: 5000,
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
await page.getByTestId("mcp-server-dropdown").click({ timeout: 3000 });
|
||||
await page.getByText("Add MCP Server", { exact: true }).click({
|
||||
timeout: 5000,
|
||||
|
|
@ -74,7 +74,7 @@ test(
|
|||
|
||||
await page.getByTestId("dropdown_str_tool").click();
|
||||
|
||||
let fetchOptionCount = await page.getByTestId("fetch-0-option").count();
|
||||
const fetchOptionCount = await page.getByTestId("fetch-0-option").count();
|
||||
|
||||
expect(fetchOptionCount).toBeGreaterThan(0);
|
||||
|
||||
|
|
@ -89,13 +89,13 @@ test(
|
|||
timeout: 30000,
|
||||
});
|
||||
|
||||
let maxLengthOptionCount = await page
|
||||
const maxLengthOptionCount = await page
|
||||
.getByTestId("int_int_max_length")
|
||||
.count();
|
||||
|
||||
expect(maxLengthOptionCount).toBeGreaterThan(0);
|
||||
|
||||
let urlOptionCount = await page
|
||||
const urlOptionCount = await page
|
||||
.getByTestId("anchor-popover-anchor-input-url")
|
||||
.count();
|
||||
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ test("user must be able to update outdated components by update all button", asy
|
|||
timeout: 30000,
|
||||
});
|
||||
|
||||
let outdatedComponents = await page.getByTestId("update-button").count();
|
||||
const outdatedComponents = await page.getByTestId("update-button").count();
|
||||
expect(outdatedComponents).toBe(1);
|
||||
|
||||
let outdatedBreakingComponents = await page
|
||||
const outdatedBreakingComponents = await page
|
||||
.getByTestId("review-button")
|
||||
.count();
|
||||
expect(outdatedBreakingComponents).toBe(4);
|
||||
|
|
@ -130,10 +130,10 @@ test("user must be able to update outdated components by each outdated component
|
|||
timeout: 30000,
|
||||
});
|
||||
|
||||
let outdatedComponents = await page.getByTestId("update-button").count();
|
||||
const outdatedComponents = await page.getByTestId("update-button").count();
|
||||
expect(outdatedComponents).toBe(1);
|
||||
|
||||
let outdatedBreakingComponents = await page
|
||||
const outdatedBreakingComponents = await page
|
||||
.getByTestId("review-button")
|
||||
.count();
|
||||
expect(outdatedBreakingComponents).toBe(4);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { expect, Page, test } from "@playwright/test";
|
||||
import { expect, type Page, test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
test(
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ test(
|
|||
await newPageStore2.waitForSelector('[data-testid="icon-Group"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
let iconGroup = await newPageStore2.getByTestId("icon-Group")?.count();
|
||||
const iconGroup = await newPageStore2.getByTestId("icon-Group")?.count();
|
||||
expect(iconGroup).not.toBe(0);
|
||||
await newPageStore2.getByText("icon-ToyBrick").last().isHidden();
|
||||
await newPageStore2.waitForSelector(
|
||||
|
|
@ -159,7 +159,7 @@ test(
|
|||
await newPageStore2.waitForSelector('[data-testid="icon-ToyBrick"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
let toyBrick = await newPageStore2.getByTestId("icon-ToyBrick")?.count();
|
||||
const toyBrick = await newPageStore2.getByTestId("icon-ToyBrick")?.count();
|
||||
expect(toyBrick).not.toBe(0);
|
||||
await newPageStore2.waitForSelector('[data-testid="all-button-store"]', {
|
||||
timeout: 100000,
|
||||
|
|
@ -171,11 +171,11 @@ test(
|
|||
await newPageStore2.waitForSelector('[data-testid="icon-ToyBrick"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
let iconGroupAllCount = await newPageStore2
|
||||
const iconGroupAllCount = await newPageStore2
|
||||
.getByTestId("icon-Group")
|
||||
?.count();
|
||||
await newPageStore2.waitForTimeout(500);
|
||||
let toyBrickAllCount = await newPageStore2
|
||||
const toyBrickAllCount = await newPageStore2
|
||||
.getByTestId("icon-ToyBrick")
|
||||
?.count();
|
||||
await newPageStore2.waitForTimeout(500);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ test(
|
|||
|
||||
// Get URL node ID
|
||||
const urlNode = await page.locator(".react-flow__node").first();
|
||||
const urlNodeId = await urlNode.getAttribute("data-id");
|
||||
const _urlNodeId = await urlNode.getAttribute("data-id");
|
||||
|
||||
// Add two chat outputs
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ test(
|
|||
|
||||
await page.getByTestId("code-button-modal").click();
|
||||
|
||||
let code = await extractAndCleanCode(page);
|
||||
let updatedCode = code!.replace("tool_mode=True", "tool_mode=False");
|
||||
const code = await extractAndCleanCode(page);
|
||||
const updatedCode = code!.replace("tool_mode=True", "tool_mode=False");
|
||||
|
||||
expect(updatedCode).not.toBe(code);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { expect, Page, test } from "@playwright/test";
|
||||
import { expect, type Page, test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
async function toggleNodeState(page: Page, action: "minimize" | "expand") {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { expect, Page, test } from "@playwright/test";
|
||||
import { expect, type Page, test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { renameFlow } from "../../utils/rename-flow";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { zoomOut } from "../../utils/zoom-out";
|
||||
|
||||
// TODO: This test might not be needed anymore
|
||||
test(
|
||||
"should be able to select all with ctrl + A on advanced modal",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue