From b5892cbf6793f7bf330c6911811534ddb8ab012e Mon Sep 17 00:00:00 2001 From: Spandan Datta <141906406+spandan972@users.noreply.github.com> Date: Wed, 24 Apr 2024 22:09:02 -0500 Subject: [PATCH] make sure active pots are being shown on pot page (#542) * make sure active pots are being shown on pot page * Formated code with npm run fmt --------- Co-authored-by: Spandan Datta Co-authored-by: Elliot Braem <16282460+elliotBraem@users.noreply.github.com> --- apps/potlock/widget/Pots/Card.jsx | 5 ++- playwright-report/index.html | 68 +++++++++++++++++++++++++++++ playwright-tests/tests/pots.spec.js | 11 ++++- 3 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 playwright-report/index.html diff --git a/apps/potlock/widget/Pots/Card.jsx b/apps/potlock/widget/Pots/Card.jsx index bbd1a9f..2734f30 100644 --- a/apps/potlock/widget/Pots/Card.jsx +++ b/apps/potlock/widget/Pots/Card.jsx @@ -259,7 +259,10 @@ const Tag = (props) => ( ); return ( - + {title} diff --git a/playwright-report/index.html b/playwright-report/index.html new file mode 100644 index 0000000..afaffa6 --- /dev/null +++ b/playwright-report/index.html @@ -0,0 +1,68 @@ + + + + + + + + + Playwright Test Report + + + + +
+ + + \ No newline at end of file diff --git a/playwright-tests/tests/pots.spec.js b/playwright-tests/tests/pots.spec.js index ee9bac1..fac5849 100644 --- a/playwright-tests/tests/pots.spec.js +++ b/playwright-tests/tests/pots.spec.js @@ -53,7 +53,16 @@ test("clicking learn more button should...", async ({ page }) => { }); test("should show active pots", async ({ page }) => { - // TODO: + await page.goto(`${ROOT_SRC}?tab=pots`); + + const activePots = page.locator('[data-testid="active-pot"]'); + + await activePots.first().waitFor(); + + const count = await activePots.count(); + for (let i = 0; i < count; i++) { + await expect(activePots.nth(i)).toBeVisible(); + } }); test("should show completed pots", async ({ page }) => {