diff --git a/tests/disconnected/homepage/desktop.spec.ts b/tests/disconnected/homepage/desktop.spec.ts index 39f65c569..19557f87a 100644 --- a/tests/disconnected/homepage/desktop.spec.ts +++ b/tests/disconnected/homepage/desktop.spec.ts @@ -30,4 +30,20 @@ test.describe('homepage desktop', () => { test('two', async ({ page }) => { // ... }); + + // TODO: count proposals and check something more + + // TODO: think about this and how to handle navigation to another page + // const tenantExpectedTextMapping: { [key: string]: string } = { + // optimism: "Optimism voters", + // ens: "ENS voters", + // etherfi: "EtherFi voters", + // lyra: "Lyra voters", + // }; + + // const expectedText = tenantExpectedTextMapping[tenant]; + + // await page.getByRole("link", { name: "Voters" }).click(); + // await page.waitForURL("**/delegates"); + // await expect(page.locator("h1")).toContainText(expectedText); }); \ No newline at end of file diff --git a/tests/proposals.spec.ts b/tests/proposals.spec.ts deleted file mode 100644 index e5ca2d90e..000000000 --- a/tests/proposals.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { test, expect } from "@playwright/test"; - -// Playwright tests for the Proposals Page. -// Includes tests for initial proposal load, infinite scroll loading, and filter functionality. - -const BASE_URL = - process.env.PLAYWRIGHT_TEST_BASE_URL || "http://localhost:3000"; - -test.describe("Proposals Page", () => { - test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); - }); - - test("initially displays relevant proposals", async ({ page }) => { - const initialProposalCount = await page - .locator('div[class*="proposal_row"]') - .count(); - expect(initialProposalCount).toBeGreaterThan(0); - }); -}); diff --git a/tests/smoke.spec.ts b/tests/smoke.spec.ts deleted file mode 100644 index 05038b65f..000000000 --- a/tests/smoke.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { test, expect } from "@playwright/test"; - -const BASE_URL = - process.env.PLAYWRIGHT_TEST_BASE_URL || "http://localhost:3000"; -const validTenants = ["optimism", "ens", "etherfi", "lyra"]; -const tenant: string = process.env.NEXT_PUBLIC_AGORA_INSTANCE_NAME || ""; - -if (!validTenants.includes(tenant)) { - throw new Error( - `NEXT_PUBLIC_AGORA_INSTANCE_NAME must be one of ${validTenants.join( - ", " - )}, but got '${tenant}'` - ); -} - -test.describe("Smoke test", () => { - test.beforeEach(async ({ page }) => { - await page.goto(BASE_URL); - }); - - test("should navigate to the Delegates page via Voters link", async ({ - page, - }) => { - const tenantExpectedTextMapping: { [key: string]: string } = { - optimism: "Optimism voters", - ens: "ENS voters", - etherfi: "EtherFi voters", - lyra: "Lyra voters", - }; - - const expectedText = tenantExpectedTextMapping[tenant]; - - await page.getByRole("link", { name: "Voters" }).click(); - await page.waitForURL("**/delegates"); - await expect(page.locator("h1")).toContainText(expectedText); - }); -});