From 1c25b32ad0c870f003e1787308a7ea03f27a9fbb Mon Sep 17 00:00:00 2001 From: Nicholas Tindle Date: Sun, 26 Jan 2025 14:11:23 +0000 Subject: [PATCH] fix: formatting --- .../frontend/src/tests/marketplace.spec.ts | 8 ++- .../src/tests/pages/marketplace.page.ts | 62 +++++++++---------- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/autogpt_platform/frontend/src/tests/marketplace.spec.ts b/autogpt_platform/frontend/src/tests/marketplace.spec.ts index 2c08e391dc..6d641a6048 100644 --- a/autogpt_platform/frontend/src/tests/marketplace.spec.ts +++ b/autogpt_platform/frontend/src/tests/marketplace.spec.ts @@ -79,7 +79,9 @@ test.describe("Marketplace", () => { await marketplacePage.navbar.clickMarketplaceLink(); await test.expect(page).toHaveURL(new RegExp("/.*marketplace")); // Search for the agent - const results = await marketplacePage.searchAgent(`test-agent-${testAttachName}`); + const results = await marketplacePage.searchAgent( + `test-agent-${testAttachName}`, + ); test.expect(results.length).toBe(1); }); @@ -97,7 +99,9 @@ test.describe("Marketplace", () => { // Check that the agent is not in the marketplace await marketplacePage.navbar.clickMarketplaceLink(); await test.expect(page).toHaveURL(new RegExp("/.*marketplace")); - const results = await marketplacePage.searchAgent(`test-agent-${testAttachName}`); + const results = await marketplacePage.searchAgent( + `test-agent-${testAttachName}`, + ); test.expect(results.length).toBe(0); }); diff --git a/autogpt_platform/frontend/src/tests/pages/marketplace.page.ts b/autogpt_platform/frontend/src/tests/pages/marketplace.page.ts index 327c83a0af..5d4dc732ba 100644 --- a/autogpt_platform/frontend/src/tests/pages/marketplace.page.ts +++ b/autogpt_platform/frontend/src/tests/pages/marketplace.page.ts @@ -24,46 +24,46 @@ export class MarketplacePage extends BasePage { // async listAgents(): Promise { // console.log(`listing agents in marketplace`); - // Wait for table rows to be available - // const rows = await this.page.locator("tbody tr[data-testid]").all(); + // Wait for table rows to be available + // const rows = await this.page.locator("tbody tr[data-testid]").all(); - // const agents: Agent[] = []; + // const agents: Agent[] = []; - // for (const row of rows) { - // // Get the id from data-testid attribute - // const id = (await row.getAttribute("data-testid")) || ""; + // for (const row of rows) { + // // Get the id from data-testid attribute + // const id = (await row.getAttribute("data-testid")) || ""; - // // Get columns - there are 3 cells per row (name, run count, last run) - // const cells = await row.locator("td").all(); + // // Get columns - there are 3 cells per row (name, run count, last run) + // const cells = await row.locator("td").all(); - // // Extract name from first cell - // const name = (await row.getAttribute("data-name")) || ""; + // // Extract name from first cell + // const name = (await row.getAttribute("data-name")) || ""; - // // Extract run count from second cell - // const runCountText = (await cells[1].textContent()) || "0"; - // const runCount = parseInt(runCountText, 10); + // // Extract run count from second cell + // const runCountText = (await cells[1].textContent()) || "0"; + // const runCount = parseInt(runCountText, 10); - // // Extract last run from third cell's title attribute (contains full timestamp) - // // If no title, the cell will be empty indicating no last run - // const lastRunCell = cells[2]; - // const lastRun = (await lastRunCell.getAttribute("title")) || ""; + // // Extract last run from third cell's title attribute (contains full timestamp) + // // If no title, the cell will be empty indicating no last run + // const lastRunCell = cells[2]; + // const lastRun = (await lastRunCell.getAttribute("title")) || ""; - // agents.push({ - // id, - // name, - // runCount, - // lastRun, - // }); - // } + // agents.push({ + // id, + // name, + // runCount, + // lastRun, + // }); + // } - // agents.reduce((acc, agent) => { - // if (!agent.id.includes("flow-run")) { - // acc.push(agent); - // } - // return acc; - // }, [] as Agent[]); + // agents.reduce((acc, agent) => { + // if (!agent.id.includes("flow-run")) { + // acc.push(agent); + // } + // return acc; + // }, [] as Agent[]); - // return agents; + // return agents; // } async clickAgent(id: string) {