From 556d6fc1b323d629af41f36f083118fcaad0cd1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Fri, 30 Aug 2024 13:49:40 +0200 Subject: [PATCH] fix(#1866): fix wrong test condition --- .../stories/GovernanceActionDetailsCard.stories.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/govtool/frontend/src/stories/GovernanceActionDetailsCard.stories.ts b/govtool/frontend/src/stories/GovernanceActionDetailsCard.stories.ts index d6804b122..ae7eebf34 100644 --- a/govtool/frontend/src/stories/GovernanceActionDetailsCard.stories.ts +++ b/govtool/frontend/src/stories/GovernanceActionDetailsCard.stories.ts @@ -3,7 +3,11 @@ import { GovernanceActionDetailsCard } from "@organisms"; import { expect, jest } from "@storybook/jest"; import type { Meta, StoryObj } from "@storybook/react"; import { screen, userEvent, waitFor, within } from "@storybook/testing-library"; -import { formatDisplayDate, getProposalTypeNoEmptySpaces } from "@/utils"; +import { + formatDisplayDate, + getFullGovActionId, + getProposalTypeNoEmptySpaces, +} from "@/utils"; import { GovernanceActionType } from "@/types/governanceAction"; const meta = { @@ -50,7 +54,10 @@ const commonArgs = { } satisfies ProposalData, }; -const govActionId = commonArgs.proposal.index + commonArgs.proposal.txHash; +const govActionId = getFullGovActionId( + commonArgs.proposal.txHash, + commonArgs.proposal.index, +); async function assertTooltip(tooltip: HTMLElement, expectedText: RegExp) { await userEvent.hover(tooltip);