Skip to content

Commit

Permalink
fix(#1866): fix wrong test condition
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Aug 30, 2024
1 parent e1366e8 commit 556d6fc
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 556d6fc

Please sign in to comment.