sforkowany z mirror/soapbox
Fix CtaBanner and UI tests
rodzic
0bff56a9a8
commit
d64f4edf61
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||
import { Route, Switch } from 'react-router-dom';
|
||||
|
||||
import { render, screen, waitFor } from '../../../jest/test-helpers';
|
||||
import { normalizeAccount } from '../../../normalizers';
|
||||
import { normalizeAccount, normalizeInstance } from '../../../normalizers';
|
||||
import UI from '../index';
|
||||
import { WrappedRoute } from '../util/react-router-helpers';
|
||||
|
||||
|
@ -33,6 +33,7 @@ describe('<UI />', () => {
|
|||
avatar: 'test.jpg',
|
||||
}),
|
||||
}),
|
||||
instance: normalizeInstance({ registrations: true }),
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -7,7 +7,9 @@ import CtaBanner from '../cta-banner';
|
|||
|
||||
describe('<CtaBanner />', () => {
|
||||
it('renders the banner', () => {
|
||||
render(<CtaBanner />);
|
||||
const store = { instance: normalizeInstance({ registrations: true }) };
|
||||
|
||||
render(<CtaBanner />, undefined, store);
|
||||
expect(screen.getByTestId('cta-banner')).toHaveTextContent(/sign up/i);
|
||||
});
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue