Skip to content

Commit

Permalink
mock fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gouravmpk committed Jan 17, 2024
1 parent 916a721 commit 1a0ea10
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ describe('MobileView component', () => {
assignee: undefined as any,
title: ''
};

it('should render titleString on the screen', () => {
render(<MobileView {...defaultProps} titleString="Test Title" />);
const titleElement = screen.getByText('Test Title');
Expand Down Expand Up @@ -144,12 +145,14 @@ describe('MobileView component', () => {
});
describe('MobileView Component Payment Status', () => {
it('renders unpaidString when paidStatus is false', () => {
render(<MobileView {...defaultProps} paid={false} />);
const testProps = {...defaultProps, org: { owner_pubkey: 'UserPubKey' }, paid: false};
render(<MobileView {...testProps} />);
expect(screen.getByText(unpaidString)).toBeInTheDocument();
});

it('renders paidString when paidStatus is true', () => {
render(<MobileView {...defaultProps} paid={true} />);
const testProps = {...defaultProps, org: { owner_pubkey: 'UserPubKey' }, paid: true};
render(<MobileView {...testProps} />);
expect(screen.getByText(paidString)).toBeInTheDocument();
});
});
Expand Down

0 comments on commit 1a0ea10

Please sign in to comment.