Fix status test
This commit is contained in:
parent
a8792f9a02
commit
64df93f5a0
1 changed files with 6 additions and 4 deletions
|
@ -1,12 +1,14 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { render, screen, rootState } from '../../jest/test-helpers';
|
import { buildAccount } from 'soapbox/jest/factory';
|
||||||
import { normalizeStatus, normalizeAccount } from '../../normalizers';
|
import { render, screen, rootState } from 'soapbox/jest/test-helpers';
|
||||||
|
import { normalizeStatus } from 'soapbox/normalizers';
|
||||||
|
|
||||||
import Status from '../status';
|
import Status from '../status';
|
||||||
|
|
||||||
import type { ReducerStatus } from 'soapbox/reducers/statuses';
|
import type { ReducerStatus } from 'soapbox/reducers/statuses';
|
||||||
|
|
||||||
const account = normalizeAccount({
|
const account = buildAccount({
|
||||||
id: '1',
|
id: '1',
|
||||||
acct: 'alex',
|
acct: 'alex',
|
||||||
});
|
});
|
||||||
|
@ -34,7 +36,7 @@ describe('<Status />', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('is not rendered if status is under review', () => {
|
it('is not rendered if status is under review', () => {
|
||||||
const inReviewStatus = normalizeStatus({ ...status, visibility: 'self' });
|
const inReviewStatus = status.set('visibility', 'self');
|
||||||
render(<Status status={inReviewStatus as ReducerStatus} />, undefined, state);
|
render(<Status status={inReviewStatus as ReducerStatus} />, undefined, state);
|
||||||
expect(screen.queryAllByTestId('status-action-bar')).toHaveLength(0);
|
expect(screen.queryAllByTestId('status-action-bar')).toHaveLength(0);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue