Fix CtaBanner and UI tests

This commit is contained in:
Alex Gleason 2023-01-11 19:38:05 -06:00
parent 0bff56a9a8
commit d64f4edf61
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 5 additions and 2 deletions

View file

@ -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 }),
};
});

View file

@ -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);
});