Fix CtaBanner and UI tests

environments/review-redirect-r-ks3942/deployments/2273
Alex Gleason 2023-01-11 19:38:05 -06:00
rodzic 0bff56a9a8
commit d64f4edf61
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

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

Wyświetl plik

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