Skip to content

Commit

Permalink
make sure active pots are being shown on pot page (#542)
Browse files Browse the repository at this point in the history
* make sure active pots are being shown on pot page

* Formated code with npm run fmt

---------

Co-authored-by: Spandan Datta <[email protected]>
Co-authored-by: Elliot Braem <[email protected]>
  • Loading branch information
3 people authored Apr 25, 2024
1 parent 4b7d2a1 commit b5892cb
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/potlock/widget/Pots/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,10 @@ const Tag = (props) => (
);

return (
<Card href={props.hrefWithParams(`?tab=pot&potId=${potId}`)}>
<Card
href={props.hrefWithParams(`?tab=pot&potId=${potId}`)}
data-testid={applicationOpen ? "active-pot" : "inactive-pot"}
>
<CardSection>
<Title>{title}</Title>
<Description>
Expand Down
68 changes: 68 additions & 0 deletions playwright-report/index.html

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion playwright-tests/tests/pots.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down

0 comments on commit b5892cb

Please sign in to comment.