Skip to content

Commit d473ad7

Browse files
committed
Merge branch 'other' into tests
2 parents 9ecead9 + 00785cd commit d473ad7

File tree

5 files changed

+563
-22
lines changed

5 files changed

+563
-22
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { render } from '../../test-utils';
2+
import React from 'react';
3+
import SetTierAdminPage from '../../components/AdminPage/SetTierAdminPage';
4+
import Constants from '../../test-utils/constant';
5+
6+
describe('SetTierAdminPage', () => {
7+
it('should render nothing if bounty type is 0', () => {
8+
const { asFragment } = render(<SetTierAdminPage bounty={Constants.bounty0} />);
9+
expect(asFragment()).toMatchSnapshot();
10+
});
11+
it('should render nothing if bounty type is 1', () => {
12+
const { asFragment } = render(<SetTierAdminPage bounty={Constants.bounty1} />);
13+
expect(asFragment()).toMatchSnapshot();
14+
});
15+
it('should match DOM and render "Weight per Tier (%)", "1st place winner" etc. if bounty type is 2', () => {
16+
const { asFragment } = render(<SetTierAdminPage bounty={Constants.bounty2} />);
17+
expect(asFragment()).toMatchSnapshot();
18+
});
19+
it('should match DOM and render "Which token?", "Volumes:" if bounty type is 3', () => {
20+
const { asFragment } = render(<SetTierAdminPage bounty={Constants.bounty3} />);
21+
expect(asFragment()).toMatchSnapshot();
22+
});
23+
});

0 commit comments

Comments
 (0)