Skip to content

Commit

Permalink
Update proposalActionsItemDecodedView.test.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
cgero-eth committed Nov 28, 2024
1 parent 6e3afb6 commit 888de24
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { render, screen } from '@testing-library/react';
import type * as coreModule from '../../../../../../core';
import { modulesCopy } from '../../../../../assets';
import { generateProposalActionTokenMint } from '../../proposalActionsList';
import {
type IProposalActionsItemDecodedViewProps,
Expand Down Expand Up @@ -28,15 +27,6 @@ describe('<ProposalActionsItemDecodedView /> component', () => {
return <ProposalActionsItemDecodedView {...completeProps} />;
};

it('renders action value correctly', () => {
const action = generateProposalActionTokenMint({ value: '100' });
render(createTestComponent({ action }));

expect(screen.getByText('Value')).toBeInTheDocument();
expect(screen.getByText(modulesCopy.proposalActionsItemDecodedView.valueHelper)).toBeInTheDocument();
expect(screen.getByDisplayValue('100')).toBeInTheDocument();
});

it('renders action parameters correctly', () => {
const action = generateProposalActionTokenMint({
inputData: {
Expand Down Expand Up @@ -73,16 +63,4 @@ describe('<ProposalActionsItemDecodedView /> component', () => {
expect(param2Input).toBeInTheDocument();
expect(param2Input).toBeDisabled();
});

it('renders correctly with no parameters', () => {
const action = generateProposalActionTokenMint({
inputData: { function: 'myFunction', contract: 'myContract', parameters: [] },
value: '200',
});
render(createTestComponent({ action }));

expect(screen.getByText('Value')).toBeInTheDocument();
expect(screen.getByText(modulesCopy.proposalActionsItemDecodedView.valueHelper)).toBeInTheDocument();
expect(screen.getByDisplayValue(action.value)).toBeInTheDocument();
});
});

0 comments on commit 888de24

Please sign in to comment.